Melinda Posted September 13, 2010 Share Posted September 13, 2010 Hi,Is there a way you can add the store owner's company name, address, city, state, zip, phone, fax, and email address to the top of the contact form using the php variables?I have used for the address as an example in the themes/*/contact-form.tpl file but thought variables might be better:{l s='4132 E. 12th St.'}I want each variable on a separate line if possible.Thanks! This code in the thread no longer works in 1.4.0.12. Is there a way to add these contact variables in 1.4.0.12?Thanks. Link to comment Share on other sites More sharing options...
rocky Posted September 14, 2010 Share Posted September 14, 2010 Add the following after line 4 of contact-form.tpl in your theme's directory to get all the address information from the Preferences > Contact tab: {php} echo Configuration::get('PS_SHOP_NAME') . ' ' . Configuration::get('PS_SHOP_ADDR1') . ' ' . Configuration::get('PS_SHOP_ADDR2') . ' ' . Configuration::get('PS_SHOP_CITY') . ', ' . Configuration::get('PS_SHOP_STATE') . ', ' . Configuration::get('PS_SHOP_CODE') . ' ' . Configuration::get('PS_SHOP_COUNTRY') . ' '; {/php} {l s='Phone:'} {php}echo Configuration::get('PS_SHOP_PHONE');{/php} {l s='Fax:'} {php}echo Configuration::get('PS_SHOP_FAX');{/php} Link to comment Share on other sites More sharing options...
Melinda Posted September 14, 2010 Author Share Posted September 14, 2010 Thanks Rocky! I wonder why prestashop doesn't put these variables in as the default. I get requests for this all the time.I added:{l s='Email:'} {php}echo Configuration::get('PS_SHOP_EMAIL')for the email but how would you make it a live link? I don't think this is needed because customer can fill out the form which they should do...just wanted it for my notes.Thanks! Link to comment Share on other sites More sharing options...
rocky Posted September 14, 2010 Share Posted September 14, 2010 Try the following: {l s='Email:'} {php}echo '<a href="mailto:' . Configuration::get('PS_SHOP_EMAIL') . '">' . Configuration::get('PS_SHOP_EMAIL') . '';{/php} Link to comment Share on other sites More sharing options...
Melinda Posted September 14, 2010 Author Share Posted September 14, 2010 Perfect! Thank you so much! Link to comment Share on other sites More sharing options...
rocky Posted September 14, 2010 Share Posted September 14, 2010 Please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
Melinda Posted February 4, 2011 Author Share Posted February 4, 2011 This code in the thread no longer works in 1.4.0.12. Is there a way to add these contact variables in 1.4.0.12?Thanks. Link to comment Share on other sites More sharing options...
PS User Posted April 10, 2011 Share Posted April 10, 2011 Hello, good information, but not too much useful when it comes to PrestaShop 1.3.6 or 1.3.7 version, the above code will not work, any suggestion will be welcome, we refuse to upgrade to the 1.4 version due to way too much bugs and errors, 1.3.6 is the way to go until PrestaShop roll out with 1.4.1 down the road.Thanks again for fast reply in advance. Link to comment Share on other sites More sharing options...
vladyn Posted April 18, 2011 Share Posted April 18, 2011 Yeah - this code no longer works, but I'm very curious about the thread as I have same issue with my online shop Link to comment Share on other sites More sharing options...
rajbasnet Posted July 5, 2011 Share Posted July 5, 2011 this is the reason prestashop is not heading well, Even the small problem will have to wait a Year to be solved. I don't know why these days Open source are converting to Source Of Money. They are more focused on their own commercial add ons. Link to comment Share on other sites More sharing options...
PS User Posted July 5, 2011 Share Posted July 5, 2011 I've found a way, by using the {literal} code, and add whatever you want to add below it, then close it with {/literal}, legit, and works for me, you can put contact info before the form or after..Thanks for the developer "responding" to this thread, by ignoring it ugh... I agree, with Open Source, you're on your own. Like me, have to spent weeks customize the mistake and bugs before I can deply the store to production... Link to comment Share on other sites More sharing options...
rajbasnet Posted July 7, 2011 Share Posted July 7, 2011 Thank you apprentice, it was really a great help. Link to comment Share on other sites More sharing options...
Lilly Clark Posted September 22, 2011 Share Posted September 22, 2011 these codes doesn't works on 1.4.4.1, can anyone post a solution? 1 Link to comment Share on other sites More sharing options...
JJ Choo Posted October 18, 2011 Share Posted October 18, 2011 I tried on PS 1.4.4.0, it doesn't work either... anyone can help ? Link to comment Share on other sites More sharing options...
norseman Posted November 2, 2011 Share Posted November 2, 2011 Yes, this is crazy... modding a contact form is a very BASIC part of creating a website from a template... why is this so difficult with Prestashop????? I am using 1.4.4.1 and I havent found ANY modding for the contact form... thats just bad form... Link to comment Share on other sites More sharing options...
cagdas Posted November 9, 2011 Share Posted November 9, 2011 I tried on PS 1.4.4.1, too. But it doesn't work either. How can i make up it ? Link to comment Share on other sites More sharing options...
cosmicfrog Posted January 16, 2012 Share Posted January 16, 2012 Hi, This worked for me: extend the contactcontrollercore, that means create a new file override\controllers\ContactController.php with the code: <?php class ContactController extends ContactControllerCore { public function process() { parent::process(); self::$smarty->assign('shopaddress',Configuration::get('PS_SHOP_ADDR1')); self::$smarty->assign('shopphone',Configuration::get('PS_SHOP_PHONE')); self::$smarty->assign('shopemail',Configuration::get('PS_SHOP_EMAIL')); self::$smarty->assign('shopfax',Configuration::get('PS_SHOP_FAX')); } } ?> then you can use the smarty variables inside the tpl files, for example in the contact-form.tpl: <p>{l s='Phone'}: {$shopphone}</p> Link to comment Share on other sites More sharing options...
optizyme Posted January 23, 2012 Share Posted January 23, 2012 Hello, I used all the solutions but no chance to work. I use 1.4.6.2 and i have 1 theme installed. I couldn't make the codes work. cosmicfrog, i also tried your solution but no work. Can you just upload fies please? Maybe i missed sth. TIA Link to comment Share on other sites More sharing options...
Smiles Posted February 27, 2012 Share Posted February 27, 2012 Would be good if you could combine this easy with a klik! Looking forward to a solution.... Link to comment Share on other sites More sharing options...
Online Sports Shop Posted March 10, 2012 Share Posted March 10, 2012 this is the reason prestashop is not heading well, Even the small problem will have to wait a Year to be solved. I don't know why these days Open source are converting to Source Of Money. They are more focused on their own commercial add ons. this is the reason prestashop is not heading well, Even the small problem will have to wait a Year to be solved. I don't know why these days Open source are converting to Source Of Money. They are more focused on their own commercial add ons. You are right all other open source carts provide these information on contact us page but PS not added yet. Link to comment Share on other sites More sharing options...
Smiles Posted March 10, 2012 Share Posted March 10, 2012 Maybe they can make and sell a module converter to magento ;-) Link to comment Share on other sites More sharing options...
kidnkorner Posted January 4, 2013 Share Posted January 4, 2013 bump for a definitive answer! Ive searched high and low and edited the tpl file, cleared cache and the info still doesn't show. Link to comment Share on other sites More sharing options...
marronne Posted February 26, 2013 Share Posted February 26, 2013 (edited) I have version 1..4.4.1 loaded. After some fiddling around with the code .... that didn't work for me, I did this: I went to Themes > Prestashop > contact-form.tpl and opened it to edit I copied the line (about line 16 - I don't have numbers in the side margin of my ftp client) : <p class="bold">{l s='For questions about an order or for more information about our products'}.</p> And I pasted it directly underneath. I added some more text and my mobile number at the end of the first line (above) and then, as my site is in French and English, I rewrote the second (pasted) line in French. Uploaded it back to the erver, cleared the cache and voilà - job done ! You can see how it looks by going to www.selleriestpierre.com and clicking on the Contact icon at the top. Hope this helps someone. Edited February 26, 2013 by marronne (see edit history) Link to comment Share on other sites More sharing options...
Chrisz Posted March 4, 2013 Share Posted March 4, 2013 Hi I added a post to another topic that will helps with this question : Post #15 http://www.prestasho...-fonts-and-why/ it shows how I add the contact details to the contact page using the default theme in PS1.5.3 HTH Chris 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