Currently my store has more 1500 products. I want to update my tier prices for each product by one.
Is there any way to directly update database or by a script.
Thanks
magento-1.7tierprice
Currently my store has more 1500 products. I want to update my tier prices for each product by one.
Is there any way to directly update database or by a script.
Thanks
Best Answer
All the tier prices are stored in the table
catalog_product_entity_tier_price
. The columns mean the following:value_id
- table auto incremententity_id
- the product idall_groups
- 0/1 flag that tells if the prices apply to all customer groupscustomer_group_id
- the id of the customer group the prices are applied. Ifall_groups
is 1 this has no value. If you have one price that should apply to only 2 customer groups add 2 different records in the table one for each customer groupqty
- represents the minimum quantity for which the tier price is applied.value
- is the actual price valuewebsite_id
- the id of the website for which the prices are applied. 0 for all websites.I know it's not a good practice to edit the DB directly, but in this case, when there is only one table involved, the risk is minimum. I've done this with success in the past. If you manage to format you data in the same format of the columns described above you can directly insert/update data in this table.
If you plan to take this approach backup your database before starting.
After you are done a price reindex is required.