thelia icon indicating copy to clipboard operation
thelia copied to clipboard

Can't delete a Payment/Delivery module referenced by an order.

Open roadster31 opened this issue 10 years ago • 2 comments

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 ?

roadster31 avatar Feb 10 '15 16:02 roadster31

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, ...

bibich avatar Jan 07 '16 09:01 bibich

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.

anoziere avatar Feb 09 '24 09:02 anoziere