Jim McGill Posted August 10, 2013 Share Posted August 10, 2013 (edited) Hi All, I installed the above module and tried sending test emails to my accounts. So far I have failed to receive any email generated from this module. Does anybody know how to make this module work as intended??? Thanks. Edited August 13, 2013 by vekia (see edit history) Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 10, 2013 Share Posted August 10, 2013 wat error u r getting? its a module send to a friend.. Link to comment Share on other sites More sharing options...
vekia Posted August 10, 2013 Share Posted August 10, 2013 hello 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: <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"> {$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> (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...
Jim McGill Posted August 10, 2013 Author Share Posted August 10, 2013 wat error u r getting? its a module send to a friend.. Hi Jiten rash, There is no error message. The pop-up screen will ask for friend's name and email. After entering the information and pressing the send button, it will close by itself. Everything seems to work EXCEPT my friend or the email address did not receive anything at all. Link to comment Share on other sites More sharing options...
Jim McGill Posted August 10, 2013 Author Share Posted August 10, 2013 hello 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: [url="{$productLink}"][img={$link->getImageLink($product->link_rewrite, $cover.id_image, ][/url] [url="{$productLink}"] {$product->name}[/url] {l s='Friend\'s name' mod='sendtoafriend'} {l s='Friend\'s email' mod='sendtoafriend'} (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 Thanks vekia for the big lump of information which I am totally unfamiliar with! Haha.. It is strange why it is not working as intended as I did not meddle with the module at all. Just a direct installation only. Ok I will PM you the URL for troubleshooting as the website is currently not ready for the public eye. Thanks. Link to comment Share on other sites More sharing options...
Jim McGill Posted August 13, 2013 Author Share Posted August 13, 2013 Many thanks to vekia for correcting the bug in "Send to a friend" module! He has been a very helpful and reliable contributor to this forum! I suggest the developer of the module, ie. Prestashop, should do more backtesting of its modules before releasing these to the public. In this case, the module is obviously not ready but still uploaded for use. Link to comment Share on other sites More sharing options...
vekia Posted August 13, 2013 Share Posted August 13, 2013 glad to hear that my solution works many thanks Jim for confirmation, i really appreciate it i marked this topic as [solved] best regards 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 know that you're looking for help urgently, but it's enough to write it in one thread 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