Insertion contact form into category pages

Volmark

Avatar: Volmark

2008-06-29 21:45

I need to insert contact form (mail form) in one of the category pages. If I’m doing it by directly inserting form code (see below) to the page, the contact form works fine but afterwards I’m not able to save new changes in category page. There are some controls appear below “Long description” text aria of administrative interface. It seems the contact form code is spread out of the administrative interface of category page.
Is there standard way to insert contact form to category pages without direct code insertion???

» Quick.Cart v2.x

Makaron

Avatar: Makaron

2008-06-30 08:48

I don't know is that solution which I give You now is optimum but it should works. In file config/lang_en.php add this line:

$config['contact_page2']    = here_id_of_category_page;


And in index.php add code like this:

if( $iCategory == $config['contact_page2'] ){
      if( isset( 
$_POST['sSend'] ) )
        
$sContactContent sendEmail$_POST'contact.tpl' );
      else
        
$sContactContent $tpl->tbHtml'contact.tpl''FORM' );

      
$sData1 $tpl->tbHtml'contact.tpl''CONTACT' );
    }


In place where is similar code but to variable $config['contact_page'].

Back to top
about us | contact