worldwidebusiness Posted December 28, 2010 Share Posted December 28, 2010 Good Evening,I have a simple question, how to add in a file TPL Smarty (contact-form.tpl) a pictures over the Form?Best Regards,S. Link to comment Share on other sites More sharing options...
rocky Posted December 29, 2010 Share Posted December 29, 2010 It's quite difficult to do. Luckily, PrestaShop v1.4 has the option to upload an image on the contact form. Link to comment Share on other sites More sharing options...
worldwidebusiness Posted December 29, 2010 Author Share Posted December 29, 2010 Dear rocky,Thank you for the Email!Please can you just copy me the php code do we have to put inside the file?The Image: The Code: >{capture name=path}{l s='Contact'}{/capture} {include file=$tpl_dir./breadcrumb.tpl} {l s='Contact us'} {if isset($confirmation)} {l s='Your message has been successfully sent to our team.'} </pre> <ul> {l s='Home'} </ul> <br>{else}<br><p>{l s='For questions about an order or for information about our products'}.</p> <br> {include file=$tpl_dir./errors.tpl}<br> <form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std"><br><br><h3>{l s='Send a message'}</h3> <br><p> {l s='Subject'} {l s='-- Choose --'} {foreach from=$contacts item=contact} {$contact.name|escape:'htmlall':'UTF-8'} {/foreach} </p> <br><p> </p> <br> {foreach from=$contacts item=contact}<br><p> {$contact.description|escape:'htmlall':'UTF-8'}</p> <br> {/foreach}<br><p> {l s='E-mail address'} <input type="text" id="email" name="from" value="{$email}" /> </p> <br><p> {l s='Message'} <textarea id="message" name="message" rows="7" cols="35">{if isset($smarty.post.message)}{$smarty.post.message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea> </p> <br><p> <input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send'}" class="button_large" /> </p> <br><br></form><br Link to comment Share on other sites More sharing options...
rocky Posted December 30, 2010 Share Posted December 30, 2010 I thought you meant you want customers to be able to upload images on the contact form. Simply adding an image to the contact form is easy. Try: >{capture name=path}{l s='Contact'}{/capture} {include file=$tpl_dir./breadcrumb.tpl} {l s='Contact us'} {if isset($confirmation)} {l s='Your message has been successfully sent to our team.'} </pre> <ul> {l s='Home'} </ul> <br>{else}<br><p></p> <br><p>{l s='For questions about an order or for information about our products'}.</p> <br> {include file=$tpl_dir./errors.tpl}<br> <form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std"><br><br><h3>{l s='Send a message'}</h3> <br><p> {l s='Subject'} {l s='-- Choose --'} {foreach from=$contacts item=contact} {$contact.name|escape:'htmlall':'UTF-8'} {/foreach} </p> <br><p> </p> <br> {foreach from=$contacts item=contact}<br><p> {$contact.description|escape:'htmlall':'UTF-8'}</p> <br> {/foreach}<br><p> {l s='E-mail address'} <input type="text" id="email" name="from" value="{$email}" /> </p> <br><p> {l s='Message'} <textarea id="message" name="message" rows="7" cols="35">{if isset($smarty.post.message)}{$smarty.post.message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea> </p> <br><p> <input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send'}" class="button_large" /> </p> <br><br></form><br Link to comment Share on other sites More sharing options...
worldwidebusiness Posted December 30, 2010 Author Share Posted December 30, 2010 Good Morning,Thank you for the answer!Unfortunately this code doesnt work, the situation is not changed...Maybe is something wrong?regards,S. Link to comment Share on other sites More sharing options...
rocky Posted December 30, 2010 Share Posted December 30, 2010 Can you provide a link to your site so I can see what is going wrong? Link to comment Share on other sites More sharing options...
worldwidebusiness Posted December 30, 2010 Author Share Posted December 30, 2010 Hello, thank you for the answer.I have upload a screenshot.The Ps is the 1.3.3.2Thank you very much!PS:Are you a Prestashop Web Developer? Link to comment Share on other sites More sharing options...
rocky Posted December 30, 2010 Share Posted December 30, 2010 The image link must be broken. Did you change "xxxxxxx.jpg" to the real image's name? Link to comment Share on other sites More sharing options...
worldwidebusiness Posted December 30, 2010 Author Share Posted December 30, 2010 Yes, sure ;-) Link to comment Share on other sites More sharing options...
rocky Posted December 30, 2010 Share Posted December 30, 2010 It should be working then. If you PM me a link to your site, I'll have a look to see what is going wrong. Link to comment Share on other sites More sharing options...
DarrenF Posted January 13, 2011 Share Posted January 13, 2011 Can this be done for hook.tpl also?Example: >{if $hook_position == 'extraLeft'} {l s='Send to a friend' mod='sendtoafriend'} {else} </pre> <ul> {l s='Send to a friend' mod='sendtoafriend'} </ul> <br Changing {l s='Send to a friend' mod='sendtoafriend'} to {l s='xxxxxxx.jpg' mod='sendtoafriend'} Link to comment Share on other sites More sharing options...
rocky Posted January 13, 2011 Share Posted January 13, 2011 Change: <a href="{$content_dir}modules/sendtoafriend/sendtoafriend-form.php?id_product={$smarty.get.id_product}">{l s='Send to a friend' mod='sendtoafriend'} to: <a href="{$content_dir}modules/sendtoafriend/sendtoafriend-form.php?id_product={$smarty.get.id_product}"><img src="{$img_dir}send_to_a_friend.jpg" alt="{l s='Send to a friend' mod='sendtoafriend'}" /> This will replace the "Send to a friend" text with send_to_a_friend.jpg in the img directory inside your theme. Link to comment Share on other sites More sharing options...
DarrenF Posted January 13, 2011 Share Posted January 13, 2011 Brilliant! Thanks rocky Link to comment Share on other sites More sharing options...
DarrenF Posted January 14, 2011 Share Posted January 14, 2011 Just a last thought, is there any way to swap the image for the translation? Link to comment Share on other sites More sharing options...
rocky Posted January 14, 2011 Share Posted January 14, 2011 Use: <a href="{$content_dir}modules/sendtoafriend/sendtoafriend-form.php?id_product={$smarty.get.id_product}"><img src="{$img_dir}send_to_a_friend_{$lang_iso}.jpg" alt="{l s='Send to a friend' mod='sendtoafriend'}" /> Then create images send_to_a_friend_en.jpg, send_to_a_friend_fr.jpg, etc. Link to comment Share on other sites More sharing options...
connectcase Posted May 14, 2013 Share Posted May 14, 2013 It's not that hard in version 1.5. I added a HTML contentmodule and explained how over here: http://www.laatuwwebsitewerken.nl/2013/05/14/bewerk-het-contactformulier-in-prestashop/ The explanation is in Dutch, but if you want a translation, just let me know.... Link to comment Share on other sites More sharing options...
Recommended Posts