Debug product comments reminder module

Hi! I have some trouble with the coment reminders module. When I first run the cron job it started sending email to all the orders from the shop without taking into account the purchase date limitation in the settings. I temporarely hardcoded a minimum order id so that I can skip older orders but I need a fix so that I don't lose future updates.

Case requires inspection because it is not a default behaviour of the module.
Firstly please let me know:
  • the version of the module you currently use (i need full number)
  • prestashop version that you currently use (i also need full number)
based on these informations i will provide inspection in clean environment.
(If this will not help, i will need to check it directly in your shop)


Thank you for your reply! Here are the details requested:
Prestashop 1.7.6.0
Voucher code for product comments + reminders 1.7.1

These are the settings:

The date highlighted in red is not taken into account.



Okay, so i provided inspection,
the sql query that module runs to get the orders is:
SELECT `id_order` FROM `ps_orders` WHERE DATE_ADD(date_upd, INTERVAL -1 DAY) <= '2019-08-27' AND date_upd >= '2019-07-01' AND id_shop IN (1)
From technical point of view - everything is okay. Query is formatted properly. So i went to adv. preferences > sql manager and created a new entry with this query:
SELECT * FROM `ps_orders` WHERE DATE_ADD(date_upd, INTERVAL -1 DAY) <= '2019-08-27' AND date_upd >= '2019-07-01' AND id_shop IN (1)
to review the database entries for "orders" and i found the problem.

Order date parameters

Each order in shop has two "data" parameters:
- date when order was placed
- date when order was updated

Module to send reminders and voucher codes uses order update date.
Order is updated when - for example - you update the order status (for example from "pending bankwire payment" to "shipped" etc.)

In your shop all orders have "update date" set to: 2019-08-16 14:XX.XX 
Something in your shop updated all orders in bulk on 2019-08-16 (some module, maybe?)

The only one thing that i can offer in this case is a new feature in the module that will allow you to decide what date type to use to get orders from database
  • date of order
    Some of users will not receive the reminders due to the fact that:
    - order placed in shop can be paid after several days
    - you set option to send reminders after 7 days
    - reminders delivery is based on order status (so only customers that paid for order will receive the reminder)

    possible scenario:
    - customer placed an order (order has status "pending payment")
    - customer paid for order after 10 days (order has new status "Livrata")
    - module sends reminders, but this order will be skipped
  • date of order update
    - as it works now
Debug product comments reminder module Debug product comments reminder module Reviewed by VEKIA on Monday, September 02, 2019 Rating: 5

No comments