modification contact page

aquasyl

No avatar

2007-11-13 13:39

Hello,
i want to have the zip code to my client in contact page.
How i can do this.

This is my code in contact.tpl:

<!-- BEGIN FORM -->
<script type="text/javascript" src="$config[dir_js]checkForm.js"></script>
<script type="text/javascript">
<!--
if( !aCheckFormContact ){
var aCheckFormContact = Array(
Array( 'sName' )
,Array( 'sSender', 'email' )
,Array( 'sTopic', 'simple', '$lang[write_topic]' )
,Array( 'sMailContent', 'simple' )
);
}
//-->
</script>
</p>

<form action="?p=$p" method="post" onsubmit="return checkForm( this, aCheckFormContact );">
<fieldset>
<input type="hidden" name="sSend" value="true" />
<dl>
<dt>$lang[First_last_name]:</dt>
<dd><input type="text" name="sName" class="input" /></dd>
<dt>$lang[Your_email]:</dt>
<dd><input type="text" name="sSender" class="input" /></dd>
<dt>Téléphone:</dt>
<dd><input type="text" name="sTelephone" class="input" /></dd>

I try to do this, but don't work in the mail :
<dt>Code postal:</dt>
<dd><input type="text" name="sZipCode" class="input" /></dd>

Please, say me what i must make to have the zip code in the mail.

Thanks

» Quick.Cart v2.x

merci

No avatar

2007-11-14 09:37

aquasyl - open file core/other.php and in function sendEmail ( ) above following code:

$sMailContent changeCharset$sMailContent );

add this code:


if( !empty( $sZipCode ) )
        
$sMailContent 'Zip code: '.$sZipCode."\n".$sMailContent;

aquasyl

No avatar

2007-11-14 12:56

Thanks ypu very much all is ok, i di this to make more :

<?php
 
if( !empty( $sTelephone ) )
        
$sMailContent $GLOBALS['lang']['Telephone'].': '.$sTelephone."\n".$sMailContent;
     if( !empty( 
$sCity ) )
        
$sMailContent $GLOBALS['lang']['City'].': '.$sCity."\n".$sMailContent;

if( !empty( 
$sZipCode ) )
        
$sMailContent $GLOBALS['lang']['Zip_code'].': '.$sZipCode."\n".$sMailContent;
if( !empty( 
$sStreet ) )
        
$sMailContent $GLOBALS['lang']['Street'].': '.$sStreet."\n".$sMailContent;

 if( !empty( 
$sName ) )
        
$sMailContent $GLOBALS['lang']['First_last_name'].': '.$sName."\n".$sMailContent;
    
     

      
$sMailContent changeCharset$sMailContent );
      
$sTopic       changeCharset$sTopic );

      if( !isset( 
$sTargetEmail ) )
        
$sTargetEmail $GLOBALS['config']['email'];

      if( @
mail$sTargetEmail$sTopic$sMailContent'From: '.$sSender ) ){
        
$content $tpl->tbHtml$sFile'SEND_GOOD' );
      }
      else
        
$content $tpl->tbHtml$sFile'SEND_ALERT' );
    }
    else
      
$content $tpl->tbHtml$sFile'WRONG_WORD' );
    return 
$content;
  } 
// end function sendEmail
?>



So i want another thing :

I want to have in my mail a title to the awnser of client.
So to have this in my mail :

Nom et Prénom: MR merci
Adresse: street of opensolution
CP: 59175
Ville: NY
Téléphone: 030963629

And i want here the title of the question so :

Your question is :

Hello i want to have a new aquarium .........

Where i can give this title in code to have it in my mail?

Thanks

hamid2days

No avatar

2007-11-14 15:58

ERROR :

Parse error: parse error, unexpected $ in /home/shahri44/public_html/shop/core/products-admin.php on line 1

site:
http://shop.shahriariha.com/index.php

http://shop.shahriariha.com/index.php

merci

No avatar

2007-11-15 08:50

aquasyl - but in standard version you have field for title, if you want to add another one add it to templates/contact.tpl and also to core/other.php - the same as is added sTopic.

hamid2days - I don't see any errors on site you have send.

Back to top
about us | contact