goodboy88 Posted May 12, 2013 Share Posted May 12, 2013 (edited) I have fresh installation of prestashop 1.5.4.1. After i install send to friend module thats come with prestashop then i try to use it on front office but cannot. Once i put my email address on it and I didn't receive any email after click send. Is there anything that i need to configure? Edited May 12, 2013 by goodboy88 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 12, 2013 Share Posted May 12, 2013 Hello You installed your prestashop on remote server or on localhost? Link to comment Share on other sites More sharing options...
goodboy88 Posted May 12, 2013 Author Share Posted May 12, 2013 (edited) Hello You installed your prestashop on remote server or on localhost? Hi Vekia, I just use the one click install on the server using Softaculous. Edited May 13, 2013 by goodboy88 (see edit history) Link to comment Share on other sites More sharing options...
goodboy88 Posted May 13, 2013 Author Share Posted May 13, 2013 Anyone can help? Link to comment Share on other sites More sharing options...
vekia Posted May 13, 2013 Share Posted May 13, 2013 Well, you use Softaculous, in my opinion it isn't great idea. But of course we can try to fix it. For the first you should turn error reporting in your prestashop, after that - try to use the Send to friend module if any error appear - paste it here Link to comment Share on other sites More sharing options...
goodboy88 Posted May 14, 2013 Author Share Posted May 14, 2013 Well, you use Softaculous, in my opinion it isn't great idea. But of course we can try to fix it. For the first you should turn error reporting in your prestashop, after that - try to use the Send to friend module if any error appear - paste it here Hi Vekia, There is no error appear. I try to turn on the report by: going to config/config.inc.php line 29 (actually there is nothing there) then i add @ini_set('display_errors', 'on'); on line 29 but still there is no error come out. Or is there anyway to turn the error report on on prestashop 1.5.4.1? Link to comment Share on other sites More sharing options...
vekia Posted May 14, 2013 Share Posted May 14, 2013 Ok, so everything is fine, i suppose. have you checked SPAM folder in your mailbox? Link to comment Share on other sites More sharing options...
goodboy88 Posted May 14, 2013 Author Share Posted May 14, 2013 I had try to send to 2 email address and i check both in the spam box also didn't found anything. What should be the problem? Link to comment Share on other sites More sharing options...
desudura Posted May 27, 2013 Share Posted May 27, 2013 ok, so i solved this by adding the language file and language folder in the modules/sendtoafriend/mails & ..../translations/ the problem was that by default this module didn't have the romanian language (ro), so i copy paste the english one and renamed the folder into ro and translated the content of the files in that folders + created the ro.php in the translation folder and that's it. hope it will help you Link to comment Share on other sites More sharing options...
zbyszekz10 Posted June 13, 2013 Share Posted June 13, 2013 I have exactly same problem. SendToAFrient doesn't send mail and there is no error (even when error display is enabled). Shop is after upgrade from 1.4.10 installation (module was working). I have all mentioned langauge files and folders. Any idea what how/where look for solution? Link to comment Share on other sites More sharing options...
plaza24 Posted July 24, 2013 Share Posted July 24, 2013 i have the same trouble with this module, it doesnt send emails at all. in server log show this error: mod_fcgid: stderr: PHP Notice: Undefined property: stdClass::$value in .../public_html/modules/sendtoafriend/sendtoafriend_ajax.php on line 43 mod_fcgid: stderr: PHP Notice: Undefined property: stdClass::$value in .../public_html/modules/sendtoafriend/sendtoafriend_ajax.php on line 45 and it is : 43 line - $friendName = $entry->value; 45 line - $friendMail = $entry->value; Fresh copy PS 1.5.4.1 without any modifications. pls help solve this. Link to comment Share on other sites More sharing options...
Generaal Posted August 3, 2013 Share Posted August 3, 2013 Hello PS Folks, I have the same prob. When I look in dev tools, alle things going ok, but no sending the email. I use v1.5.4.1, one language. Someone told me that these email to a friend module a risico are for spamming. And on The moment, I have disable them. Best Regards, Generaal Link to comment Share on other sites More sharing options...
Artunj Posted August 9, 2013 Share Posted August 9, 2013 in prestashop nothing with email function working. Why it is like that. send to friend not working, order confirm, discount mails anything not working Link to comment Share on other sites More sharing options...
vekia Posted August 9, 2013 Share Posted August 9, 2013 cases like this are strictly related to the hosting configuration may i know what kind of mail method you use? smtp or just simple mail() function ? Link to comment Share on other sites More sharing options...
Artunj Posted August 9, 2013 Share Posted August 9, 2013 my hosting provide is godaddy I want install gmail Link to comment Share on other sites More sharing options...
vekia Posted August 9, 2013 Share Posted August 9, 2013 so in this case you want to use SMTP method. go to the adv. preferneces > e-mail tab in your back office select the option: Set my own SMTP parameters. For advanced users ONLY then use this: remember to use correct SMTP user (your e-mail addres) and SMTP password value Link to comment Share on other sites More sharing options...
plaza24 Posted August 9, 2013 Share Posted August 9, 2013 Vekia, do you know solution regarding send to friend mail sending issue - as i wrote before here? all other email functions are working correctly in my presta, exception this module. Link to comment Share on other sites More sharing options...
vekia Posted August 9, 2013 Share Posted August 9, 2013 hello @plaza24 it looks like problem with the ajax query to the sendtoafriend_ajax.php file located in the module directory. there is a foreach loop: foreach ($friend_infos as $entry) { if ($entry->key == "friend_name") $friendName = $entry->value; else if ($entry->key == "friend_email") $friendMail = $entry->value; else if ($entry->key == "id_product") $id_product = $entry->value; } and the most important variable is a $friend_infos ($friend_infos = Tools::jsonDecode(Tools::getValue('friend'));) it's strictly related to the ajax post call and to the form: <form method="post" action="{$request_uri}" class="std"> <fieldset> <div class="product clearfix"> <a href="{$productLink}" class="img_link"><img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'small_default')}" alt="" title="{$cover.legend}" /></a> <a href="{$productLink}" class="product_desc"><br />{$product->name}</a> </div> <div id="send_friend_form_content"> <p class="text"> <label for="friend-name">{l s='Friend\'s name' mod='sendtoafriend'}</label> <input type="text" id="friend-name" name="name" value="{if isset($smarty.post.name)}{$smarty.post.name|escape:'htmlall':'UTF-8'|stripslashes}{/if}" /> </p> <p class="text"> <label for="friend-address">{l s='Friend\'s email' mod='sendtoafriend'}</label> <input type="text" id="friend-address" name="email" value="{if isset($smarty.post.name)}{$smarty.post.email|escape:'htmlall'|stripslashes}{/if}" /> </p> <p class="submit"> <input type="submit" name="submitAddtoafriend" value="{l s='send' mod='sendtoafriend'}" class="button" /> </p> </div> </fieldset> </form> (part of the sendtoafriend.tpl file) sorry for the boring introduction what to do now? well, you should compare this form code with code that you've got in your own module. values of the fields must be the same as the field names in the ajax .php file in the foreach loop. can i test your website? if so, please share the url Link to comment Share on other sites More sharing options...
plaza24 Posted August 11, 2013 Share Posted August 11, 2013 vekia, sorry a can't share now my site duet that it is under construction and it is closed, so you can test in other server where is PS1.5.4.1, i think it is this version bug in this module. Link to comment Share on other sites More sharing options...
vekia Posted August 11, 2013 Share Posted August 11, 2013 well, this is not bug at all, because in my several installations this module works well. The problem is a bit different, i've got some workaround, but i'm not sure what's goin on in your store, so i can't say something more... everything depends on it Link to comment Share on other sites More sharing options...
plaza24 Posted August 11, 2013 Share Posted August 11, 2013 well, this is not bug at all, because in my several installations this module works well. The problem is a bit different, i've got some workaround, but i'm not sure what's goin on in your store, so i can't say something more... everything depends on it you are sure that it is not bug ? why this bag present on others servers and configurations too? Link to comment Share on other sites More sharing options...
vekia Posted August 11, 2013 Share Posted August 11, 2013 that's the question. i've got several installations which works very well without any fix i suppose that everything depends on many aspects like shop configuration and server conf. may i ask you for something? are you able to check the ajax query (especially result of it) when you're trying to "send" to a friend ? after that i will know everything what's goin on Link to comment Share on other sites More sharing options...
lukkos Posted August 20, 2013 Share Posted August 20, 2013 I don't know why, but it starting when remove: .replace(/u/g, '%u') from sendtoafriend-extra.tpl then value is value instead val Why author replace the char? 1 Link to comment Share on other sites More sharing options...
vekia Posted August 20, 2013 Share Posted August 20, 2013 that's right, this is the solution i suppose that this is some kind of "escaping" but really poor Link to comment Share on other sites More sharing options...
plaza24 Posted August 20, 2013 Share Posted August 20, 2013 that's right, this is the solution i suppose that this is some kind of "escaping" but really poor vekia, after removing this .replace(/u/g, '%u'), it is really start working! so if you think that it is really poor, how to solve this ? Link to comment Share on other sites More sharing options...
vekia Posted August 20, 2013 Share Posted August 20, 2013 no no, i mean that original file has got "poor" code for "encoding" and solution above is the only way to fix this issue. Link to comment Share on other sites More sharing options...
KSteele Posted September 9, 2013 Share Posted September 9, 2013 I am having a similar issue using PS 1.5.5.0 and "Send to a Friend" module v.1.2 - However, the mod looks great but is non-functional. When I fill in the fields and hit the "Send" button I get an error stating "You did not fill required fields" at the top in a red font and nothing happens. But, clearly I have filled these fields in..... any help??? I have included a screenshot as well. Link to comment Share on other sites More sharing options...
vekia Posted September 9, 2013 Share Posted September 9, 2013 it isn't similar issue... can you share url to your website? Link to comment Share on other sites More sharing options...
KSteele Posted September 9, 2013 Share Posted September 9, 2013 hi Vekia, thanks for responding. Here ya go: http://theatomicalley.com Link to comment Share on other sites More sharing options...
MacRoy Posted September 12, 2013 Share Posted September 12, 2013 I have the same problem. Is there a newer module or a fix for this? Regards MacRoy Link to comment Share on other sites More sharing options...
vekia Posted September 12, 2013 Share Posted September 12, 2013 hi Vekia, thanks for responding. Here ya go: http://theatomicalley.com i can't open your website because it isn't available for my country I have the same problem. Is there a newer module or a fix for this? Regards MacRoy have you followed suggestions above? there is working solution for this issue Link to comment Share on other sites More sharing options...
KSteele Posted September 12, 2013 Share Posted September 12, 2013 i can't open your website because it isn't available for my country have you followed suggestions above? there is working solution for this issue LMK what country that is and I will enable it. Thanks Link to comment Share on other sites More sharing options...
vekia Posted September 12, 2013 Share Posted September 12, 2013 LMK what country that is and I will enable it. Thanks add Poland country please Link to comment Share on other sites More sharing options...
KSteele Posted September 12, 2013 Share Posted September 12, 2013 ok, I believe we use "Localization" for this... if yes, this has been enabled. Please try again. Link to comment Share on other sites More sharing options...
MacRoy Posted September 13, 2013 Share Posted September 13, 2013 (edited) Can you share your module, or file sendtoafriend-extra.tpl vekia? Edited September 13, 2013 by MacRoy (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 13, 2013 Share Posted September 13, 2013 hi Vekia, thanks for responding. Here ya go: http://theatomicalley.com still the same: Link to comment Share on other sites More sharing options...
vekia Posted September 13, 2013 Share Posted September 13, 2013 Can you share your module, or file sendtoafriend-extra.tpl vekia? have you tried fix mentioned several posts above? Link to comment Share on other sites More sharing options...
KSteele Posted September 13, 2013 Share Posted September 13, 2013 DO I have to add translations before this will work? Also, I was just looking to PM you admin info... but probably won't work if you still cannot access the site. Do you know where I can enable your country? Link to comment Share on other sites More sharing options...
KSteele Posted September 13, 2013 Share Posted September 13, 2013 Ok, I see that I enabled your country but did not add the zone.... please try again. Link to comment Share on other sites More sharing options...
MacRoy Posted September 13, 2013 Share Posted September 13, 2013 have you tried fix mentioned several posts above? Yes, I have. Link to comment Share on other sites More sharing options...
luisgalvan Posted September 17, 2013 Share Posted September 17, 2013 that's right, this is the solution i suppose that this is some kind of "escaping" but really poor I made the changes recommended above, remove ".replace(/u/g, '%u')" from the sendtoafriend-extra.tpl module and still is not working. I have version 1.5.4.1 Link to comment Share on other sites More sharing options...
vekia Posted September 17, 2013 Share Posted September 17, 2013 other email messages works in your store? what mail method you use - mail() function or SMTP ? have you tried to switch mail method? Link to comment Share on other sites More sharing options...
KSteele Posted September 19, 2013 Share Posted September 19, 2013 Vekia, when you have a moment can you please revisit my site: http://www.theatomicalley.com - I am having a hard time sorting this error out. Link to comment Share on other sites More sharing options...
luisgalvan Posted September 19, 2013 Share Posted September 19, 2013 other email messages works in your store? what mail method you use - mail() function or SMTP ? have you tried to switch mail method? I am using PHP mail () function. And sending other mail is working properly (ex. contact), including the test message. Link to comment Share on other sites More sharing options...
mcleoduk Posted September 22, 2013 Share Posted September 22, 2013 Hi I using the send to a friend module V1.2 with Prestashop 1.5.5.0 and am getting the same message "You did not fill the required fields " when the form has been filled out, any ideas ? I managed to get the comments sorted with the fix on this page http://www.prestashop.com/forums/topic/240868-product-comments-error/page-2 but this solution i cannot find. Thanks in Advance Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 27, 2013 Share Posted September 27, 2013 Hello all, please check this Github fix and let me know if this fixes the issue with the module. https://github.com/PrestaShop/PrestaShop/commit/9d94337c9b6d1c808381f8181de1efc58e6c14e7 Link to comment Share on other sites More sharing options...
luisgalvan Posted September 27, 2013 Share Posted September 27, 2013 Hello all, please check this Github fix and let me know if this fixes the issue with the module. https://github.com/PrestaShop/PrestaShop/commit/9d94337c9b6d1c808381f8181de1efc58e6c14e7 Although I have the Version: 1.2 Send to a friend the module. I made the changes and when you click on the link "send to a friend" does absolutely nothing. sendtoafriend-extra.tpl: $('#sendEmail').click(function(){ var datas = []; $('#fancybox-content').find('input').each(function(index){ var o = {}; o.key = $(this).attr('name'); o.value = $(this).val(); if (o.value != '') datas.push(o); }); if (datas.length >= 3) { $.ajax({ Link to comment Share on other sites More sharing options...
vekia Posted September 28, 2013 Share Posted September 28, 2013 Although I have the Version: 1.2 Send to a friend the module. I made the changes and when you click on the link "send to a friend" does absolutely nothing. sendtoafriend-extra.tpl: $('#sendEmail').click(function(){ var datas = []; $('#fancybox-content').find('input').each(function(index){ var o = {}; o.key = $(this).attr('name'); o.value = $(this).val(); if (o.value != '') datas.push(o); }); if (datas.length >= 3) { $.ajax({ you downloaded latest package from github? can you check your browser console log? what happens there after clickin on "send to a friend" button Link to comment Share on other sites More sharing options...
andreaxc Posted September 28, 2013 Share Posted September 28, 2013 Same problem, I have also updated version of the module to github. Link to comment Share on other sites More sharing options...
vekia Posted September 28, 2013 Share Posted September 28, 2013 wierdy because i downloaded latest version to my demo store and everything works well. can you share url? i will inspect it Link to comment Share on other sites More sharing options...
andreaxc Posted September 28, 2013 Share Posted September 28, 2013 http://goo.gl/Xa0iBo and mod https://github.com/PrestaShop/PrestaShop/tree/development/modules/sendtoafriend Link to comment Share on other sites More sharing options...
lukkos Posted September 30, 2013 Share Posted September 30, 2013 OMG ... now you have to remove ".replace(/u/g, '%u')" and replace "#fancybox-content" to "#send_friend_form" what will be next 1 Link to comment Share on other sites More sharing options...
andreaxc Posted October 4, 2013 Share Posted October 4, 2013 Where is ? What file replace? Link to comment Share on other sites More sharing options...
vekia Posted October 5, 2013 Share Posted October 5, 2013 hello it's a part of file: sendtoafriend-extra.tpl (located in module directory) Link to comment Share on other sites More sharing options...
luisgalvan Posted October 6, 2013 Share Posted October 6, 2013 OMG ... now you have to remove ".replace(/u/g, '%u')" and replace "#fancybox-content" to "#send_friend_form" what will be next Very good!, Is working properly. excellent support Link to comment Share on other sites More sharing options...
csboucher Posted October 23, 2013 Share Posted October 23, 2013 (edited) PS 1.5.4.1 courtepointeclaire.ca/prestashop I install the module. The invite appears below the product picture. I click on it and a window appears in which I can enter the friends name and email. Nothing happens Can anybody help Edited October 23, 2013 by csboucher (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 24, 2013 Share Posted October 24, 2013 i cant open your website: http://i.imgur.com/1T2mYfv.png Link to comment Share on other sites More sharing options...
TToxis Posted October 25, 2013 Share Posted October 25, 2013 For "You did not fill required fields" problem.. http://forge.prestashop.com/browse/PNM-1724 Link to comment Share on other sites More sharing options...
Nikolas Reissis Posted November 17, 2013 Share Posted November 17, 2013 Hello, I also had this problem and no solution from the above worked for me. My setup: Version 1.5.6.0, Greek language, English language disabled, my-theme a modified default theme In my-theme folder themes/my-theme/modules/sendtoafriend/mails there was only a folder "el" for the Greek languageNo English folder. This seemed to be the problem. I coppied the en folder from modules/sendtoafriend/mails to themes/my-theme/modules/sendtoafriend/mails Uninstalled and reinstalled the module sendtoafriend And miracle! Everything works fine. 1 Link to comment Share on other sites More sharing options...
vekia Posted November 18, 2013 Share Posted November 18, 2013 Hello, I also had this problem and no solution from the above worked for me. My setup: Version 1.5.6.0, Greek language, English language disabled, my-theme a modified default theme In my-theme folder themes/my-theme/modules/sendtoafriend/mails there was only a folder "el" for the Greek language No English folder. This seemed to be the problem. I coppied the en folder from modules/sendtoafriend/mails to themes/my-theme/modules/sendtoafriend/mails Uninstalled and reinstalled the module sendtoafriend And miracle! Everything works fine. thank you for information how you solved it, im convinced that this post will help other merchants here so in my opinion this post should be pinned somewhere 1 Link to comment Share on other sites More sharing options...
pienzu Posted November 30, 2013 Share Posted November 30, 2013 I don't know why, but it starting when remove: .replace(/u/g, '%u') from sendtoafriend-extra.tpl then value is value instead val Why author replace the char? I tried loads of things then had to uninstall, reinstall etc etc but finally found solution. I use PS 1.5.4.1 and Sendtofriend 1.2. The only thing I changed after reinstall was to remove .replace(/u/g, '%u') from sendtoafriend-extra.tpl, as Lukkos had said. And that worked. Hope it helps someone. Link to comment Share on other sites More sharing options...
omine Posted January 26, 2014 Share Posted January 26, 2014 (edited) file: themes\THEME_NAME\modules\sendtoafriend\sendtoafriend-extra.tpl <form id="f_send_friend_form" onsubmit="return false"> //the fields must be here... </form> and $('#f_send_friend_form').find(':input').each(function(index){ the reason to add <form> tag is some browsers cannot recognizes the script $('#send_friend_form').find(':input').each(function(index){ when "send_friend_form" id not <form> tag.. causing datas.length == 0 Edited January 26, 2014 by omine (see edit history) 1 Link to comment Share on other sites More sharing options...
confiachat Posted March 6, 2014 Share Posted March 6, 2014 (edited) Tried the solution of Nikolas Reissis but nothing is solved for me. I'm using PrestaShop 1.5.6.1. <script text="javascript">{literal}$('document').ready(function(){ $('#sendEmail').click(function(){ var datas = []; $('.send_friend_form_content').find('input').each(function(index){ var o = {}; o.key = $(this).attr('name'); o.value = $(this).val(); if (o.value != '') datas.push(o); }); if (datas.length >= 3) { $.ajax({ {/literal}url: "{$module_dir}sendtoafriend_ajax.php",{literal} post: "POST", data: {action: 'sendToMyFriend', secure_key: '{/literal}{$stf_secure_key}{literal}', friend: JSON.stringify(datas)},{/literal}{literal} dataType: "json", success: function(result){ $('#send_friend_form').modal('hide'); } }); } else $('#send_friend_form_error').text("{/literal}{l s='You did not fill required fields' mod='sendtoafriend' js=1}{literal}"); });});{/literal}</script><li class="sendtofriend"> <a class="btn-send-friend" href="#send_friend_form" role="button" data-toggle="modal" ><i class="icon-envelope"></i>{l s='Send to a friend' mod='sendtoafriend'}</a></li> <div id="send_friend_form" class="modal hide fade" tabindex="-1" data-width="760"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h1 id="myModalLabel"><span>{l s='Send to a friend' mod='sendtoafriend'}</span></h1> </div> <div class="modal-body"> <div class="row-fluid "><div class="span6 titled_box"> <h2><span>{$stf_product->name}</span></h2> <img src="{$link->getImageLink($stf_product->link_rewrite, $stf_product_cover, 'small_default')}" alt="{$stf_product->name|escape:html:'UTF-8'}" /> <div class="product_desc"> <span class="send-desc">{$stf_product->description_short}</span> </div> </div> <div class="send_friend_form_content span6"><div id="send_friend_form_error" ></div> <div class="form_container titled_box"> <h2><span>{l s='Recipient' mod='sendtoafriend'} :</span></h2> <p class="text"> <label for="friend_name">{l s='Name of your friend' mod='sendtoafriend'} <sup class="required">*</sup> :</label> <input id="friend_name" name="friend_name" type="text" value=""/> </p> <p class="text"> <label for="friend_email">{l s='E-mail address of your friend' mod='sendtoafriend'} <sup class="required">*</sup> :</label> <input id="friend_email" name="friend_email" type="text" value=""/> </p> <p class="txt_required"><sup class="required">*</sup> {l s='Required fields' mod='sendtoafriend'}</p> </div> </div> </div></div> <div class="modal-footer"> <input id="id_product_comment_send" name="id_product" type="hidden" value="{$stf_product->id}" /> <button class="btn btn-inverse" data-dismiss="modal" aria-hidden="true">Close</button> <input id="sendEmail" class="btn btn-inverse" name="sendEmail" type="submit" value="{l s='Send' mod='sendtoafriend'}" /> </div></div> Edited March 6, 2014 by confiachat (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted March 6, 2014 Share Posted March 6, 2014 any chance to see your website? if so, please share url Link to comment Share on other sites More sharing options...
confiachat Posted March 6, 2014 Share Posted March 6, 2014 Hi Vekia, Nice to meet u. here is my website: www.confiachat.com Link to comment Share on other sites More sharing options...
vekia Posted March 6, 2014 Share Posted March 6, 2014 you have to change javascript part of code: $('.send_friend_form_content').find('input') to $('#send_friend_form').find('input') 1 Link to comment Share on other sites More sharing options...
confiachat Posted March 6, 2014 Share Posted March 6, 2014 Thanks Vekia, it worked perfectly. Link to comment Share on other sites More sharing options...
confiachat Posted March 6, 2014 Share Posted March 6, 2014 Solved the fields part, but tried to send to several email-addresses but no reception of any mail. Any ideas?? Link to comment Share on other sites More sharing options...
vekia Posted March 6, 2014 Share Posted March 6, 2014 other mails from your shop works well? Link to comment Share on other sites More sharing options...
confiachat Posted March 7, 2014 Share Posted March 7, 2014 Yes, checked them and they work. Link to comment Share on other sites More sharing options...
confiachat Posted March 9, 2014 Share Posted March 9, 2014 Yes they work. Link to comment Share on other sites More sharing options...
AInet Posted March 21, 2014 Share Posted March 21, 2014 (edited) HI. I had problem with this module as well. (PS 1.5.6.2) Module on front didn’t work – after filling (correctly) the form instead sending msg, gave me an alert ”You did not fill required fields” and I could do nothing. I checked and compare 2 file: shop/themes/my-theme/modules/ sendtoafriend /sendtoafriend-extra.tpl and shop/modules/ sendtoafriend /sendtoafriend-extra.tplin first the javascript code was: <script text="javascript"> {literal} $('document').ready(function(){ $('#sendEmail').click(function(){ var datas = []; $('.send_friend_form_content').find('input').each(function(index){ var o = {}; o.key = $(this).attr('name'); o.value = $(this).val(); if (o.value != '') datas.push(o); }); if (datas.length >= 3) { $.ajax({ {/literal}url: "{$module_dir}sendtoafriend_ajax.php",{literal} post: "POST", data: {action: 'sendToMyFriend', secure_key: '{/literal}{$stf_secure_key}{literal}', friend: JSON.stringify(datas)},{/literal}{literal} dataType: "json", success: function(result){ $('#send_friend_form').modal('hide'); } }); } else $('#send_friend_form_error').text("{/literal}{l s='You did not fill required fields' mod='sendtoafriend' js=1}{literal}"); }); }); {/literal} </script> in second: <script type="text/javascript"> {literal} $('document').ready(function(){ $('#send_friend_button').fancybox({ 'hideOnContentClick': false }); $('#sendEmail').click(function(){ var name = $('#friend_name').val(); var email = $('#friend_email').val(); var id_product = $('#id_product_comment_send').val(); if (name && email && !isNaN(id_product)) { $.ajax({ {/literal}url: "{$module_dir}sendtoafriend_ajax.php",{literal} type: "POST", headers: {"cache-control": "no-cache"}, data: {action: 'sendToMyFriend', secure_key: '{/literal}{$stf_secure_key}{literal}', name: name, email: email, id_product: id_product},{/literal}{literal} dataType: "json", success: function(result) { $.fancybox.close(); var msg = result ? "{/literal}{l s='Your e-mail has been sent successfully' mod='sendtoafriend'}{literal}" : "{/literal}{l s='Your e-mail could not be sent. Please check the e-mail address and try again.' mod='sendtoafriend'}{literal}"; var title = "{/literal}{l s='Send to a friend' mod='sendtoafriend'}{literal}"; fancyMsgBox(msg, title); } }); } else $('#send_friend_form_error').text("{/literal}{l s='You did not fill required fields' mod='sendtoafriend' js=1}{literal}"); }); }); {/literal} </script> I just copy-paste the javascript code from 2 into 1 and everything working just fine. Hope it will help someone Edited March 21, 2014 by AInet (see edit history) 1 Link to comment Share on other sites More sharing options...
thrillmetoo Posted April 2, 2014 Share Posted April 2, 2014 dear Alnet, your sollution worked wonders! You made my day. Where would we be without people like you on this forum. Thanks very much! Link to comment Share on other sites More sharing options...
confiachat Posted May 31, 2014 Share Posted May 31, 2014 Thanks Alnet, it worked!!!!!! Link to comment Share on other sites More sharing options...
Masvitri Posted June 3, 2014 Share Posted June 3, 2014 Hi, I have the same problem, when i click the button send nothing happen and i alredy try all, can someone help me please, here's the link of my site www.masvitrinastore.com Link to comment Share on other sites More sharing options...
damocles Posted September 16, 2014 Share Posted September 16, 2014 Hi, I face to the same issue. Using Firebug, I can check that my browser transforms the following code if (name && email && !isNaN(id_product)) into if (name && email && !isNaN(id_product)) Then I modify the code using Firebug, it works correctly. But this is not the good answer for my customers. Link to comment Share on other sites More sharing options...
pianjielol Posted October 2, 2014 Share Posted October 2, 2014 hello..i have problem with the social share bottons. when i press share, facebook, no display my picture product...what happen.. can anyting help me..??im use Social sharing v1.2.7 in prestashop 1.6.0.6this is problem link:https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fdoti-mamasa.com%2Fid%2Fhome%2F26-dresses-18.html Link to comment Share on other sites More sharing options...
pianjielol Posted October 2, 2014 Share Posted October 2, 2014 hello..i have problem with the social share bottons. when i press share, facebook, no display my picture product...what happen.. can anyting help me..??im use Social sharing v1.2.7 in prestashop 1.6.0.6this is problem link:https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fdoti-mamasa.com%2Fid%2Fhome%2F26-dresses-18.html Link to comment Share on other sites More sharing options...
prerana Posted October 21, 2014 Share Posted October 21, 2014 For "You did not fill required fields" problem.. http://forge.prestashop.com/browse/PNM-1724 This helped me. Thanks. Link to comment Share on other sites More sharing options...
Vitazzz Posted December 20, 2014 Share Posted December 20, 2014 (edited) Hi, I'm using the latest version of presta and this thing does not send any mail. All existing solutions do not make any sense because they are already implemented in the latest version of presta.Though other mails from my shop work perfectly. Could someone try to inspect my website if I share the link? Edited December 20, 2014 by Vitazzz (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts