0

I had a customer order a product on my website and noticed that it was sold for bellow my cost. The store has 2 views for languages. When I went to update the price on the English store view (to force it to the correct price), I hit save, it then showed the original incorrect price 49.50$ - it will not update even though it says the price is [GLOBAL]

Default Store View: enter image description here

English (Problem) Store View: enter image description here

But when you look in the Manage Products view and select English as the store view, the correct price is shown.

enter image description here

I'm tempted to edit the database directly but I'm sure there is a method that will update this pricing and I hope that someone has come across this before.

How can I update the price of this problem product?

and

How can I verify that all my products are using the default store view value?

2
  • Is your base currency different than the English store's currency? If so, do you have the proper conversion rates setup? Also, does reindexing the prices change anything? – Adi Aug 2 '15 at 12:33
  • It's not different, no conversions - nothing complicated. Indexing doesn't change anything. Random checks of other products show OK. So far it's just this product. – SR_Magento Aug 2 '15 at 12:41
1

Did you change recently the Price scope? (See admin, System -> Configuration -> Catalog -> Price -> Catalog Price Scope) When you change the price scope, products' price attribute storage is not updated, so, if before you had a price at the website scope for the product, that row in the database still exists and, although not so obvious it will overwrite the value on the default scope. If you have access to the DB you can check with the following query:

SELECT cpe.entity_id, cpe.sku, cped.value as price, cped.store_id
FROM catalog_product_entity cpe
JOIN catalog_product_entity_decimal cped ON cpe.entity_id=cped.entity_id
JOIN eav_attribute ea ON cped.attribute_id=ea.attribute_id AND ea.attribute_code='price' -- omitting entity type for brevity
WHERE cped.store_id!=0

If your price policy is set to Global, then this query should return 0 results.


First, start by doing a full backup of the database; better safe than sorry. You can also do a backup of the table with CREATE TABLE catalog_product_entity_decimal_20150802 AS SELECT * FROM catalog_product_entity_decimal;.

Then, check the products that don't have price at all on the default scope and fix them, as well as those that have incorrect price.

SELECT cpe.entity_id, cpe.sku, cped.value as price, cped.store_id
FROM catalog_product_entity cpe
LEFT JOIN catalog_product_entity_decimal cped ON cpe.entity_id=cped.entity_id
LEFT JOIN eav_attribute ea ON cped.attribute_id=ea.attribute_id AND ea.attribute_code='price' -- omitting entity type for brevity
WHERE cped.store_id=0 AND cped.value IS null
GROUP BY cpe.entity_id;

Once you're confident that the prices on the default scope are correct, just delete the other prices:

DELETE cped
FROM catalog_product_entity_decimal cped
JOIN eav_attribute ea ON cped.attribute_id=ea.attribute_id AND ea.attribute_code='price'
WHERE cped.store_id!=0

Reindex and clear cache from the admin and that's about it.

4
  • Okay so I have 35k products that showed up, they have the same issue as the problem product described in my question. Store is set to Global for price. Now what? – SR_Magento Aug 2 '15 at 14:19
  • Backup your database, make sure you have the correct prices on the default scope (store_id=0), then delete the entries for the English store (and any other stores you might have). After that, do refresh the price index and maybe clear the cache and you should be all set. – Adi Aug 2 '15 at 14:22
  • What do you want me to delete? I need a technical answer. Please update your answer on what exactly needs to be completed. You've only answered 1/2 of my question. – SR_Magento Aug 2 '15 at 19:44
  • l'll give this a try tomorrow morning - Its a VM so can revert back quickly thanks for the update. SR – SR_Magento Aug 2 '15 at 20:19

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.