How to delete duplicate tier price for all products in magento

How to delete duplicate tier price for all products in magento

September 30, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to delete duplicate tier price for all products in magento

Deleting Duplicate Tier Prices in Magento

Are you facing issues with multiple duplicate tier prices for your products in Magento? This can happen due to various reasons such as incorrect setup or third-party extensions. In this post, we’ll guide you through the process of deleting these duplicate tier prices using code.

Understanding Tier Prices in Magento

Magento allows you to set tier prices that offer discounts based on quantity purchased by a customer. These are usually defined for each product and customer group separately.

However, sometimes due to system errors or manual mistakes, you may end up with the same tier price being duplicated multiple times, cluttering your database and potentially causing issues in pricing calculations.

Identifying Duplicate Tier Prices

Before proceeding with deletion, it’s crucial to identify which prices are duplicates. You can do this by navigating to Catalog > Products in your Magento admin panel. Click on each product and go to the ‘Prices’ tab under the ‘Inventory’ section.

Look for any duplicate entries that have the same price value but different IDs or customer group assignments.

Deleting Duplicate Tier Prices

To delete these duplicates, you’ll need to use SQL queries directly in your Magento database. This approach is the most efficient way of bulk deleting data across multiple products.

Here’s a step-by-step guide:

  1. Open MySQL Workbench or any other MySQL client that supports executing raw SQL commands.

  2. Ensure you have backup your entire Magento database before proceeding with any changes to prevent data loss.

  3. Execute the following query:

    DELETE FROM catalog_product_entity_int WHERE attribute_id = (SELECT entity_id FROM eav_attribute WHERE attribute_code = 'tier_price')
    

This query deletes all entries from the catalog_product_entity_int table where the attribute ID corresponds to the ‘tier_price’ attribute.

  1. Refresh your products in Magento to ensure the changes are reflected across the entire system.

  2. Clear cache and reindex data using the following commands in your terminal:

    php bin/magento cache:flush
    php bin/magento indexer:reindex
    

Best Practices for Tier Pricing

To avoid such issues in the future, always ensure that you use Magento’s built-in functionality to set tier prices and avoid manual database modifications. Regularly review your product pricing settings to catch any anomalies early.

Remember, modifying core Magento files or database tables directly can lead to compatibility issues with updates and may void your warranty.

Conclusion

Deleting duplicate tier prices in Magento requires a careful approach using SQL queries. Always ensure you have proper backups and test these changes on a staging environment before applying them to your live store.

For more advanced Magento customizations and troubleshooting, consider reaching out to professional developers or services like those offered by Laravel Company.

Regular maintenance and careful data management are key to keeping your e-commerce platform running smoothly.

Catalog Database Extensions Admin

Our network