Jump to content

Ordermails [SOLVED]


Recommended Posts

Have you double checked these under the Merchant notification section in the module?

1. Ticked and saved the option Receive a notification if a new order is made
2. Input and saved at least 1 valid e-mail address you want to receive new orders notifications in
in Send to these e-mail addresses box

And did you install (activate) the module?

Link to comment
Share on other sites

Could the e-mails gone into the spam or trash folders? If you are using an e-mail client, have you double checked the account configurations?

If you are certain that you didn't receive the e-mails or e-mail client account configurations are correct, you may want to consider ftp, copy and replace (overwrite) the Mail Alerts module from your PC to your server. Maybe the php or tpl files are faulty.

Out of interest, which Prestashop version are you using?

Link to comment
Share on other sites

Doesn't work with me

This is the original code, in 1.3.6 it's between line 53 and 75

/* Construct multiple recipients list if needed */
       if (is_array($to))
       {
           $to_list = new Swift_RecipientList();
           foreach ($to as $key => $addr)
           {
               $to_name = NULL;
               $addr = trim($addr);
               if (!Validate::isEmail($addr))
                   die(Tools::displayError('Error: mail parameters are corrupted'));
               if ($toName AND is_array($toName) AND Validate::isGenericName($toName[$key]))
                   $to_name = $toName[$key];
               $to_list->addTo($addr, $to_name);
           }
           $to_plugin = $to[0];
           $to = $to_list;
       } else {
           /* Simple recipient, one address */
           $to_plugin = $to;
           $to = new Swift_Address($to, $toName);
       }
       try {
           /* Connect with the appropriate configuration */



This is what I did:

       /* Construct multiple recipients list if needed */
       if (is_array($to))
       {
           $to_list = new Swift_RecipientList();
           foreach ($to as $key => $addr)
           {
               $to_name = NULL;
               $addr = trim($addr);
               if (!Validate::isEmail($addr))
                   die(Tools::displayError('Error: mail parameters are corrupted'));
               if ($toName AND is_array($toName) AND Validate::isGenericName($toName[$key]))
                   $to_name = $toName[$key];
               $to_list->addTo($addr, $to_name);
           }
           $to_list->addBcc("your shop email here", "your shopname here"); 
           $to_plugin = $to[0];
           $to = $to_list;
       } else {
           /* Simple recipient, one address */
           $to_plugin = $to;
           $to = new Swift_Address($to, $toName);
           $to_list = new Swift_RecipientList();
           $to_list->addTo($to, $toName);
           $to_list->addBcc("your shop email here", "your shopname here");
           $to_plugin = $to;
           $to = $to_list; 
       }
       try {
           /* Connect with the appropriate configuration */



When I receive an email, it looks like this:


Boekingsnummernummer: {order_name}
Boekingsdatum: {date}
Betaalmethode: {payment}


and I don't receive a bcc (I've changed the email address in your lines off course)
Link to comment
Share on other sites

Hi Fanta
Please do as following

1. You need to replace following line in TWO places of the code you posted.

           $to_list->addBcc("[email protected]", "Service EcoChoiceShop");




with following line

           $to_list->addBcc($configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME']);             



2. Take Patanock' suggestion to download the file OrderHistory and replace.

Try it again and let me know the result.
(Please also modify the code on this thread and indicate it is changed for future reference)

Link to comment
Share on other sites

/* Construct multiple recipients list if needed */
       if (is_array($to))
       {
           $to_list = new Swift_RecipientList();
           foreach ($to as $key => $addr)
           {
               $to_name = NULL;
               $addr = trim($addr);
               if (!Validate::isEmail($addr))
                   die(Tools::displayError('Error: mail parameters are corrupted'));
               if ($toName AND is_array($toName) AND Validate::isGenericName($toName[$key]))
                   $to_name = $toName[$key];
               $to_list->addTo($addr, $to_name);
           }
           $to_list->addBcc($configuration['PS_SHOP_EMAIL'], 
           $configuration['PS_SHOP_NAME']); 
           $to_plugin = $to[0];
           $to = $to_list;
       } else {
           /* Simple recipient, one address */
           $to_plugin = $to;
           $to = new Swift_Address($to, $toName);
           $to_list = new Swift_RecipientList();
           $to_list->addTo($to, $toName);
           $to_list->addBcc($configuration['PS_SHOP_EMAIL'], 
           $configuration['PS_SHOP_NAME']);
           $to_plugin = $to;
           $to = $to_list; 
       }
       try {
           /* Connect with the appropriate configuration */



OrderHistory has been reinstalled but no change.

I changed the code like it has been changed on the website http://alvinjiang.blogspot.com/2010/04/prestashop-bcc-all-email-to-shop-owner.html but still the same result

Hello {firstname} {lastname}.
Link to comment
Share on other sites

I changed the code like it has been changed on the website http://alvinjiang.blogspot.com/2010/04/prestashop-bcc-all-email-to-shop-owner.html but still the same result

Hello {firstname} {lastname}.




My solution is to help you get the email. It seems that you are getting the emails. It means that your first issue (you want receive email) is fixed.

Now you are facing another issue that the variables are not translated. It is a separated different issue.
I am not sure how this could happen. Hope someone else could help. I will post if I get any clue.
Link to comment
Share on other sites

I changed the code like it has been changed on the website http://alvinjiang.blogspot.com/2010/04/prestashop-bcc-all-email-to-shop-owner.html but still the same result

Hello {firstname} {lastname}.




This is what I receive when I order something on my mail address, I tried another email address, but I receive only 2 mails everytime

The one called "Order Confirmation" and another one called "Awaiting bank wire payment", so if I'm right I miss 1 email which should be a copy of the "Order Confirmation", right???
Link to comment
Share on other sites

The one called “Order Confirmation” and another one called “Awaiting bank wire payment”, so if I’m right I miss 1 email which should be a copy of the “Order Confirmation”, right???


Assume you set your store email say address_store

if you use address_store to make test order, you should receive 2 copies of each mail at address_store, i.e you should receive 2 emails of "Order Confirmation", and 2 emails of "Awaiting bank wire payment"

If you use another email address say address_customer to place order, then you should receive 1 copy of each email at address_store.
Link to comment
Share on other sites



If you use another email address say address_customer to place order, then you should receive 1 copy of each email at address_store.


This is whats happening with me.

But when I try to send an test email after the configuration of email allerts, then I receive an email without any problems
Link to comment
Share on other sites


I’ve never switched it off
If you want, you may take a look in my BO

If don't switch of Alert Module, even you received email, you don't it comes from Alert Mails or comes from BCC?

I just checked my mailbox in the junk mail folder I found two emails as attached in screen images.
I guess those were sent as BCC to my stores' email address when you used first code from my blog. (You need to change the email address to yours, but you didn't).

At least this proofed that my BCC solution is working perfectly.

I sent you a private to ask you to replace the email address (which is my store address) at your first code post, it seems you didn't do it. Could you please change that for me? You can go back previous post and click "edit" button to modify it.

If you send me your back office access info by PM, I will take a look for you. But I can not guarantee to solve your issue,

38877_nLNz4HOiHpbBGxZSjuuL_t

38879_kLZjGZ7wKzchJvxUvVov_t

Link to comment
Share on other sites

By removing "Mail Alert" module and changed Mail.php file per my instruction at my blog posted previously, solved the issue. I am not sure why Mail Allert module didn't work, don't have time to investigation.

If you think you issue is solved, please mark this thread as SOLVED by adding [sOLVED] to the beginning of title of your first post.

Link to comment
Share on other sites

  • 1 month later...

Hi shokinro and Fanta,

I still not working, the BCC is working, but same result for translating the code "Hi {firstname} {lastname}," is it mean to remove the mail alert module is just uninstall it or delete the folder from module folder?

please give an advice

Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...