the_el_man Posted October 25, 2012 Share Posted October 25, 2012 Hi, Using 1.5, I am have created several CMS sub categories. I wanted to add the Contact Us page to one of these, how would I go around doing this? All I really want to do is add the contact us page inside one of these CMS categories on the top bar. I figure this would be the easiest way of doing it. Any ideas? Thanks Link to comment Share on other sites More sharing options...
benjamin utterback Posted October 25, 2012 Share Posted October 25, 2012 Hello the_el_man, can you look at this link, and let me know if this helps. Thank you! Link to comment Share on other sites More sharing options...
rturner Posted October 26, 2012 Share Posted October 26, 2012 Here's another link you can try. Contact us isn't a regular cms page, so you actually have to enter it in your blockcms.tpl file in the blockcms module. I'm not sure about the CMS subcategories. Maybe you could adjust the path in the code and get it to work. Link to comment Share on other sites More sharing options...
ajensen27 Posted October 26, 2012 Share Posted October 26, 2012 Is there anyway to get the CMS pages to open up in a fancybox popup? Link to comment Share on other sites More sharing options...
the_el_man Posted October 26, 2012 Author Share Posted October 26, 2012 Hello the_el_man, can you look at this link, and let me know if this helps. Thank you! Thanks, but it does not help. I know how to add a normal CMS page, but not how to make the Contact Page a CMS page Link to comment Share on other sites More sharing options...
the_el_man Posted October 26, 2012 Author Share Posted October 26, 2012 Here's another link you can try. Contact us isn't a regular cms page, so you actually have to enter it in your blockcms.tpl file in the blockcms module. I'm not sure about the CMS subcategories. Maybe you could adjust the path in the code and get it to work. Thanks for the reply, however that does not work in my situation. The problem is in the CMS page editor you cannot put php/.tpl style code in, only html. The only way around it I can think of is to use a third party html contact form, however I would rather use the clean Prestashop one and have everything integrated. Link to comment Share on other sites More sharing options...
rturner Posted October 26, 2012 Share Posted October 26, 2012 (edited) I did that. I needed an integrated form where I could put the link to it anywhere. example: You'll see that it looks just like a cms page. Basically I created a typical form using php and put it in my main Prestashop directory. I called it email_form.php. Then I created a basic tpl file called showappointment.tpl with a line of code that called the email_form.php. I put that in my theme main directory. Then I created showappointment.php with a line of code that called showappointment.tpl. I put that in both my main theme directory and my main prestashop directory (because overkill usually works). Both showappointment.php and showappointment.tpl have 4 or 5 lines of code in them. The only big file is the php form. I can show you the small php and tpl files. The email_form.php is just any php form you want to make up. Actually, for others. 1 - Create any php form, call it email_form.php and put it in your main Prestashop Directory 2 - Create a basic tpl file and put it in your main Theme directory (email_form.tpl) <h2>{l s='Custom Form'}</h2> <h3>{l s='Custom Form. Please fill this out.'}</h3> <div> <p>Thank you, Your Friends at Anywhere. </p> </div> <div><?php include "email_form.php"; ?></div> <p><a href="{$base_dir}" title="{l s='Home'}"><img src="{$img_dir}icon/home.gif" alt="{l s='Home'}" class="icon" /></a><a href="{$base_dir}" title="{l s='Home'}">{l s='Home'}</a></p> 3 - Create custom_form.php and include it in either your theme main directory or your Prestashop main directory (I put it in both). <?php include(dirname(__FILE__).'/config/config.inc.php'); include(dirname(__FILE__).'/header.php'); $smarty->display(_PS_THEME_DIR_.'email_form.tpl'); include(dirname(__FILE__).'/email_form.php'); include(dirname(__FILE__).'/footer.php'); ?> 4 - Your resulting link is: http://www.yourdomain.com/yourprestashopdirectory/en/email_form.php Edited October 26, 2012 by rturner (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now