ppyra Posted June 24, 2019 Share Posted June 24, 2019 (edited) Hello, I' m new user here. Sorry if I ask in invalid category, but I think that my question is "new nodule - no default". I Try to create web for product containing button "Contact us". By this button client can send email to seller (example ask about specific details of product). Could You know if is avaible some module which can help me fix this problem? I would like get result like in attachment. By click button shall open dialog or textarea to send message. I really don' t know how I can do this. I'd like a suggestion. Thank you in advance. Edited June 24, 2019 by ppyra (see edit history) Link to comment Share on other sites More sharing options...
Prestashop Addict Posted June 24, 2019 Share Posted June 24, 2019 (edited) Hi, very simple, just add few lines in product template. Are you usiing PS 1.6 or 1.7 ? Edited June 25, 2019 by Prestashop Addict (see edit history) Link to comment Share on other sites More sharing options...
ukbaz Posted June 25, 2019 Share Posted June 25, 2019 I would like this code too - using Prestashop 1.7 Thanks Baz Link to comment Share on other sites More sharing options...
Prestashop Addict Posted June 25, 2019 Share Posted June 25, 2019 (edited) @Ukbaz, for 1.7 just add the following code in the template themes/yourtheme/templates/catalog/product.tpl where you want the button to appear. <div class="contact"> <a class="btn btn-primary add-to-cart" href="{$urls.pages.contact}">{l s='Contact us' d='Shop.Theme.Catalog'}</a> </div> And then add css style for the div .contact if needed or change the add-to-cart style if you want a different style rendering for the button. ie: #product .contact { padding-top: 25px; } Don't forget also to translate the sentence "Contact us" if you use a different language than english. Edited June 25, 2019 by Prestashop Addict (see edit history) 1 Link to comment Share on other sites More sharing options...
ukbaz Posted June 25, 2019 Share Posted June 25, 2019 Ace Prestashop Addict - works like a charm Thanks!! Is there a way to set email subject according to product page as well? Maybe pushing my luck here Thanks again Baz Link to comment Share on other sites More sharing options...
ppyra Posted June 25, 2019 Author Share Posted June 25, 2019 Thank You so much Prestashop Addict I planning new project and before being work I would like to find fix issue which I don't resolve using easy tutorial. I don't choosen version yet. I found example resolve here but not tested yet. I will try all suggestions because I have no experience in php Link to comment Share on other sites More sharing options...
Prestashop Addict Posted June 25, 2019 Share Posted June 25, 2019 Il y a 2 heures, ukbaz a dit : Ace Prestashop Addict - works like a charm Thanks!! Is there a way to set email subject according to product page as well? Maybe pushing my luck here Thanks again Baz For email subjet in contact form, no solution so easy than the previous. There is an easy simple way but not safe (because user can change content of the message) is to initiate the message content with the page HTTP_REFERRER. See sample here 1 Link to comment Share on other sites More sharing options...
ukbaz Posted June 25, 2019 Share Posted June 25, 2019 Hi - that works for me! Where do I put the HTTP_Referrer in the code to display it in the message content submitted? Thanks again Baz Link to comment Share on other sites More sharing options...
ppyra Posted June 26, 2019 Author Share Posted June 26, 2019 I using Prestashop 1.7 installed module from my last post Contact form on product page and button is display ok, I click on this and open contact form. Fill area and try send email. Show message "success" but email don' t coming 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