Page 1 of 1

PrestaShop 1.5x - Digital product download emails not sent?

PostPosted: Tue Mar 26, 2013 5:51 am
by shokinro
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...