Jump to content

<SOLVED> Send to a friend on ps 1.5.6 does not work.


Recommended Posts

Hello,

Opened this new thread as the one I already replied on is marked as solved and no one seems to have interest in replying on that thread so I hope this will help to solve my problem.
Seems a lot off people still have the same issue that I also have.
When I try to send this to friend I got the message "Your e-mail could not be sent. Please check the e-mail address and try again."
I already try and replace my modules files with the latest from github and does not solve my problems.
I cleared cache and installed the module over and over again.
So what can be done more to fix this issue ??

Regards,

ysco..

Edited by ysco (see edit history)
Link to comment
Share on other sites

Hello Radu and Nemo1,

 

Thanks for replying ;-)

 

@Radu

 

Yes other emails are working ( except I noticed that the blocknewsletter module does not send the email after someone registered for newsletter) all email template files are there.

Contact, order confirmation, and all others working just fine.

 

@Nemo

 

I tried the github package but also the module files from original version 1.5.6.1 and still no go.

 

Regards.

 

ysco..

Edited by ysco (see edit history)
Link to comment
Share on other sites

If you already use "send to a friend" module version 1.2 from prestashop v.1.5.6.1, it should be no problem.

If your prestashop use multiple languages, You might try to check the email template send_to_a_friend.html and send_to_a_friend.txt to make sure this files are available in :

../modules/sendtoafriend/mails/LANG_ISO_CODE/

Link to comment
Share on other sites

Hello Gonebdg,

 

I do not use multi language, and my email template is there.

I have NL and the default EN folders so that can not be the problem, strange is that more people are struggling with this issue.

Try't several things and can not understand what is the problem.

 

Regards,

 

ysco..

Link to comment
Share on other sites

the javascript within your file sendtoafriend-extra.tpl look different
it should be like this (sendtoafriend module v.1.2)

<script type="text/javascript">
{literal}
$('document').ready(function(){
    $('#send_friend_button').fancybox({
        'hideOnContentClick': false
    });

    $('#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}
                type: "POST",
                headers: {"cache-control": "no-cache"},
                data: {action: 'sendToMyFriend', secure_key: '{/literal}{$stf_secure_key}{literal}', friend: unescape(JSON.stringify(datas).replace(/\\u/g, '%u'))},{/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>
Link to comment
Share on other sites

Hello Gonebdg,

 

I downloaded your package and replaced the current send to a friend module but it still not works.

I Disabled cache and cleared smarty cache, i also uninstalled the module and then reinstalled it again and still no go.

 

Regards,

 

ysco..

Link to comment
Share on other sites

Well i solved this strange issue myself.

 

The problem is in the php mailer from prestashop that is not working correct.

Orders emails/ contact emails/ and others working with php mail enabled but the module send to a friend and the block newsletter module fails and does not send any emails.

Solved this by change php mail to smtp mail and now all is working correct.

 

Regards,

 

ysco..

Link to comment
Share on other sites

×
×
  • Create New...