0

Running CE 1.8.1.0, using Simple Configurable Products (SCP) extension, running 2 stores in Magento, using prices of simple products to be the price for options (size, color, etc...).

Normally an upload is done without explicitly defining a storeid for pricing, but a bad upload was performed and storeids were listed for pricing. This has now caused the system to not allow the price to be updated via admin backend for the simple products in each store view (the price reverts to the original for that store view, but the default price does get updated). The prices on catalog pages and in cart reflect the per-store prices however. No easy way now to make pricing changes via admin now.

Beyond this being a bug / conflict between the setup and extension, my question is: Is it safe to manually delete the entries in the MySQL table "catalog_product_entity_decimal" that are using attribute_id of 75 (price) and have a storeid greater than zero (i.e. not the default). This would fix the issue in the quickest way besides deleting products and re-uploading them.

Are there any drawbacks to doing this? Will it cause db corruption / conflicts with any other tables / relationships?

  • In a dev environment, I went ahead and deleted any entries in catalog_product_entity_decimal with a attribute_id of 75 (i.e. price) and a storeid greater than zero. All products had a storied of 0 with a price. After this, I did a full reindex, and the prices were working fine on catalog and in cart, and I was able to adjust pricing in backend. I didn't see any other bad side effects (ERD did not show any dependencies). If anyone can confirm this is a safe to do, I would appreciate it before we roll out to live. – Rob Mangiafico Mar 28 '14 at 14:17
1

Here is what we found and what we did:

There was definitely a conflict between the simple products, use of the SCP extension, and the bad uploads performed where pricing was set for the default view and the store views separately. This caused a major issue with being able to update pricing in the admin panel, and resulted in odd behavior.

First we made use that there were no duplicates in the catalog_product_entity_decimal table:

SELECT cpe.sku, cped.entity_id, cped.attribute_id, cped.value
FROM catalog_product_entity_decimal cped,
catalog_product_entity cpe
WHERE cpe.entity_id = cped.entity_id
AND cped.attribute_id = 75
AND cped.store_id in (1,2)
AND NOT EXISTS
( select 'x' FROM catalog_product_entity_decimal cped1 WHERE cped1.entity_id = cped.entity_id AND cped1.store_id = 0)

Then we deleted the extra storeid prices in the table, leaving only the default prices:

DELETE *
FROM catalog_product_entity_decimal
WHERE cped.attribute_id = 75
AND cped.store_id in (1,2)

Then we performed a full reindex and cleared all caches. This has corrected the issue, and we have not seen any side effects from these actions.

  • feel free to accept the answer if this is now working, other than that I can suggest contacting the extension provider for support :) – David Manners May 24 '14 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.