thelia
thelia copied to clipboard
Can't delete a Payment/Delivery module referenced by an order.
A payement or delivery module can't be deleted as long as it has been used in a order.
The cryptic message ``Propel\Runtime\ActiveQuery\ModelCriteria::delete is unable to delete.` ìs displayed to the end-user when he/she's trying to delete the module.
The quick way to solve this issue is to display a meaningful error message.
However, we have to find a better solution, so that modules could be deleted even if they are currently referenced in some orders, as during the life of an e-shop, payment and delivery modules may change several times, leaving the module list stuffed with obsolete modules.
Maybe something like an order_module table
?
We should add the possibility to deactivate a delivery/payment module when customers place orders, but keep it activated everywhere else. Because modules can use hooks and add information in the invoice, customer account, ...
I agree with @roadster31 , we should have a new table to store the payment choose and do the link between order and order_payment. Same for delivery.