PrestaShop 1.5x - Digital product download emails not sent?

In this board, we will periodically list various tips and tricks we find that may help in your use of PrestaShop. This will also include tips on the use of Agile modules. If you have a great tip, fix, or workaround for a PrestaShop feature, feel free to post it here...

PrestaShop 1.5x - Digital product download emails not sent?

Postby shokinro » Tue Mar 26, 2013 5:51 am

If you are using prestaShop 1.5x (at time of this post, the latest version is 1.5.3.1) to sell downloadable virtual products (such as music, tutorials, audio books, etc.), you might have noticed that the product download email was not being sent to customers. Even though the customer has paid for the product, the order has been validated, and the order status has been changed to "Payment Accepted", the customer does not receive any emails containing links to download the products.

Of course the customer is always able to download the virtual product from their Order History details page, but many customers do not realize that or have trouble understanding the process, so they will usually contact the store owner to inquire about receiving an email with download links.

There is apparently a bug in the PrestaShop file "/classes/order/OrderHistory.php", and the logic for sending the product download emails does not work properly. As quick fix, you can edit this file online as follows to correct this issue.

On line 350 of the file "/classes/order/OrderHistory.php - PrestaShop 1.5.3.1", change from:

Code: Select all
if ($virtual_products && (!$last_order_state || !$last_order_state->logable) && $new_order_state && $new_order_state->logable)


To:

Code: Select all
if ($virtual_products && ($new_order_state->id == _PS_OS_WS_PAYMENT_ OR $new_order_state->id == _PS_OS_PAYMENT_))


This is quick fix, and this assumes that all your orders will go through status "Payment Accepted" or "Payment remotely accepted".
Also, please note that every time you change an order status to "Payment Accepted" or "Payment remotely accepted", it will resend the same product download email. (This can be beneficial if a customer requests seller to resend the email for some reason).

Hope this helps...
Follow us at Twitter Like us on Facebook Watch our Tutorial Videos on YouTube
shokinro
Site Admin
 
Posts: 3091
Joined: Sat Jun 25, 2011 3:08 pm

Return to Tips and Tricks for PrestaShop and Agile Modules

Who is online

Users browsing this forum: No registered users and 4 guests