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.