Product price breaks and group are deleted when removing linked product.

Description

If you link a product (copy to another category) then delete one of the products, the price break and group table entries are also removed.

To fix;
Open /catalog/admin/categories.php

Around line 361 find;
case 'delete_product_confirm':

In that block the following lines should be removed/commented out;
// LINE ADDED: MOD - Separate Price per Customer
tep_db_query("delete from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . tep_db_input($product_id) . "' ");

And;

// BOF QPBPP for SPPC
tep_db_query("delete from " . TABLE_PRODUCTS_PRICE_BREAK . " where products_id = '" . (int)$product_id . "'");
// EOF QPBPP for SPPC

Price brakes and groups are not duplicated with each linked product so only need to be deleted when the final product is removed, which they are when tep_remove_product() is called.

Environment

None

Steps to reproduce

Create a product with price brakes.
Copy that product to another category by choosing the link option.
Delete one of the products.

All price break data will have been lost.

Status

Assignee

Michael Sasek

Reporter

Scott Murphy

Labels

None

Severity

Major

Components

Fix versions

Affects versions

2.5.4

Priority

Configure