Withdrawal window based on order creation date

  • Posts: 41
  • Thank you received: 6
3 days 5 hours ago #371882

-- HikaShop version -- : 6.3.0
-- Joomla version -- : 5.4.5
-- PHP version -- : 8.3.6
-- Browser(s) name and version -- : Firefox 150.0.1 (64-bit)

Hi,
in the configuration there is a setting called 'Number of days after delivery for withdrawal window' which (I assume) starts counting after an order has its status set to 'Delivered'.

How would I go about changing this to start counting from order creation instead?

Cheers.

Please Log in or Create an account to join the conversation.

  • Posts: 85609
  • Thank you received: 14016
  • MODERATOR
2 days 23 hours ago #371888

Hello,

You can do this entirely from the backend with a mass action, no code change needed. The withdrawal window is calculated from the reference date stored on the order ("order_shipped" for the Shipped status, "order_delivered" for the Delivered status, "order_invoice_created" for the Confirmed status). HikaShop only writes those date columns once, when the order first reaches each status (see back/classes/order.php:168, the assignments are guarded by an empty() check). So if you pre-fill them with the order creation date before the order ever reaches those statuses, HikaShop will leave them alone afterwards and the withdrawal window will naturally start from order creation.

Steps to set this up:

1. Go to HikaShop > System > Mass actions and click New.
2. Give it a name (e.g. "Align shipping/delivery dates to order creation"), make sure it is published and set Trigger to "After an order is created".
3. Set the table to Order. You can leave the filters empty so it applies to every order, or add a "Filter on a specific order field" if you want to scope it (for example only orders below a given order id, etc.).
4. Add two actions of type "Update values":
- Field: order_delivered = (operation) order.order_created
- Field: order_shipped = (operation) order.order_created
The "operation" type tells HikaShop to evaluate the right side as a column reference rather than a literal value, so each new order gets its own creation timestamp copied over.
5. Save the mass action.

After that, the system will compute the 14-day window from the value of order_delivered (or order_shipped), which is now the order creation timestamp. The standard "Number of days after delivery for withdrawal window" setting in HikaShop > Configuration > Main keeps working as the duration of the window, only its starting point shifts.

One legal note worth flagging, in case it is relevant to your shop: the EU Directive 2023/2673 (and the older 2011/83/EU it replaces) sets the 14-day withdrawal window to start when the consumer takes physical possession of the goods, not when the order is placed. Starting the window from the order creation date can give EU consumers less than 14 days of actual withdrawal time after delivery, which would not be compliant with the directive for physical goods. If you are selling digital goods or services only, or if you are outside the EU, the rule is different and this approach is fine. Worth double-checking against your jurisdiction before pushing it live.

The following user(s) said Thank You: NTV

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 6
2 days 5 hours ago #371896

Hi nicolas,

got it set up, should be working now - thanks!

Next step:
What about digital goods, is there a way to set the 'no_refund' value automatically once a product is downloaded?

Please Log in or Create an account to join the conversation.

  • Posts: 85609
  • Thank you received: 14016
  • MODERATOR
2 days 1 hour ago #371902

Hi,

There is no no_refund field as such, but we just pushed an update that does exactly what you describe automatically, no configuration needed. The new behaviour:

For fully-digital orders (no shipping method on the order), the "Withdraw from contract" button now disappears as soon as the customer downloads one of the files attached to a product of the order. This matches the EU Directive 2023/2673 rule that the withdrawal right on digital content is lost as soon as the consumer starts the download. Orders with a shipping method keep their existing withdrawal window unchanged, since the physical part of the order may still be returned.

Please download the latest 6.4.1 build from your member area and reinstall it. The download log HikaShop has been keeping for every frontend download is what the check reads, so this also retroactively closes the withdrawal window on orders whose customers had already downloaded before the update.

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum