Jump to content

[Solved] Order customization is lost after reorder -> delete product from cart


Recommended Posts

So I have some special customizations in my shop, like images that need to be printed with a specific product.


In the unlikely scenario (happened for the first time today...) that a customer orders a customized product, then reorders it through the "my orders" menu and then realizes "oh crap i need to customize it differently, lets remove it from the cart", the customization is deleted from the upload folder... 


I guess the function responisble is the "deleteProduct" in Cart.php, but i don't know what to do since , anyone have an idea?


*edit* To keep the uploaded customization pictures, just comment out the 

if (isset($cust_data['type']) && $cust_data['type'] == 0)
              $result &= (@unlink(_PS_UPLOAD_DIR_.$cust_data['value']) && @unlink(_PS_UPLOAD_DIR_.$cust_data['value'].'_small'));

              $result &= Db::getInstance()->execute(
              'DELETE FROM `'._DB_PREFIX_.'customized_data`
              WHERE `id_customization` = '.(int)$id_customization

in  _deleteCustomization function in Cart.php Class

Edited by defuzed (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...