tozi Posted January 8, 2014 Share Posted January 8, 2014 (edited) Hi all, i have problem with modul Send to a friend in detail of product. Look in page http://simplydesign.sk/arris/index.php?id_product=10&controller=product&id_lang=1 Any idea? Edited January 8, 2014 by tozi (see edit history) Link to comment Share on other sites More sharing options...
walidon Posted January 8, 2014 Share Posted January 8, 2014 try to install the latest version and not the one by default. you can have a look here too https://github.com/PrestaShop/PrestaShop/commit/9d94337c9b6d1c808381f8181de1efc58e6c14e7 tell the result Link to comment Share on other sites More sharing options...
tozi Posted January 8, 2014 Author Share Posted January 8, 2014 Nothing... My modul in attachment. sendtoafriend.zip Link to comment Share on other sites More sharing options...
vekia Posted January 8, 2014 Share Posted January 8, 2014 your module is well coded. the problem is a bit different. some of the script that you use has got this error: because of this all <scripts> attached to <body> will not work. send to a friend is a part of "body" Link to comment Share on other sites More sharing options...
tozi Posted January 8, 2014 Author Share Posted January 8, 2014 Thanks Milos. So what is the solution? Link to comment Share on other sites More sharing options...
tozi Posted January 9, 2014 Author Share Posted January 9, 2014 (edited) I tried copy and paste the script from "sendtoafriend-extra.tpl" into the header.tpl but it did not work. Any other ideas? This script: <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> Edited January 9, 2014 by tozi (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 9, 2014 Share Posted January 9, 2014 your problem is not related to this module, you've got error somewhere else. can you try with: go to modules > positions search for displayHeader module list and move send to a friend module to the top of the list Link to comment Share on other sites More sharing options...
tozi Posted January 9, 2014 Author Share Posted January 9, 2014 I moved it in the first place. Still does not work. Link to comment Share on other sites More sharing options...
tozi Posted January 10, 2014 Author Share Posted January 10, 2014 Any idea? Link to comment Share on other sites More sharing options...
vekia Posted January 10, 2014 Share Posted January 10, 2014 as i said problem is somewhere in other scripts. for example: http://simplydesign.sk/arris/js/jquery/jquery-migrate-1.2.1.js for what purposes this file is attached? can you temporary remove it? Link to comment Share on other sites More sharing options...
tozi Posted January 10, 2014 Author Share Posted January 10, 2014 I dont know why is there. I deleted it. But still does not work. Link to comment Share on other sites More sharing options...
tozi Posted January 13, 2014 Author Share Posted January 13, 2014 (edited) Hi all, i remove all js script from folder js. Upload js scripts from default installation prestashop. But still didnt work...any idea please? My version of prestashop is 1.5.6.1 Also i uninstall all modules which not used... Edited January 13, 2014 by tozi (see edit history) 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