how do I add a percentage increase to all product prices in Magento 1.4?

how do I add a percentage increase to all product prices in Magento 1.4?

September 6, 2026 · Illustrated author avatarBy Stefan Bogdanescu
how do I add a percentage increase to all product prices in Magento 1.4?

Updating Product Prices by Percentage in Magento 1.4

Are you looking to increase your product prices on your Magento store by a specific percentage? While it’s possible to manually adjust each price individually, this can be time-consuming and error-prone, especially for large catalogs.

In this blog post, we’ll walk through the process of updating all product prices in Magento 1.4 by a fixed percentage using SQL queries and PHP scripts. Let’s dive into the solution step-by-step:

Using SQL Queries to Update Product Prices

Magento stores product prices in the catalog_product_entity_decimal table. To update these prices, you can use an SQL query similar to this one:

UPDATE catalog_product_entity_decimal val
SET  val.value = (val.value * 1.03) -- Increase by 3%
WHERE  val.entity_id IN (
    SELECT entity_id FROM catalog_product_entity
);

This query multiplies the current price value (val.value) by 1.03 to increase it by 3%. The IN clause ensures that only product rows are updated.

Updating Prices Programmatically in Magento

If you prefer a more automated approach, you can use PHP scripts within your Magento installation. Here’s an example of how to update prices programmatically:

<?php require 'app/Mage.php'; Mage::app();

$products = Mage::getModel('catalog/product')->getCollection()
    ->addAttributeToSelect('price');

foreach ($products as $product) {
    $newPrice = $product->getPrice() * 1.03; // Increase by 3%
    $product->setPrice($newPrice);
    $product->save();
}

This script retrieves all products using the getCollection method and then loops through each product. It calculates the new price, sets it using the setPrice method, and saves the changes using the save method.

Rounding Up Prices

If you want to round up the updated prices to the nearest cent or higher, you can modify the script as follows:

<?php require 'app/Mage.php'; Mage::app();

$products = Mage::getModel('catalog/product')->getCollection()
    ->addAttributeToSelect('price');

foreach ($products as $product) {
    $newPrice = ceil($product->getPrice() * 1.03); // Increase by 3% and round up
    $product->setPrice($newPrice);
    $product->save();
}

The ceil function is used to round up the new price value before setting it.

Remember that running these scripts requires careful consideration, as they can significantly affect your revenue. Always test them thoroughly in a staging environment before deploying them on your live store.

For more advanced pricing strategies and customizations, consider exploring Magento’s enterprise-level features or third-party extensions available at LaravelCompany. These tools provide more sophisticated options for dynamic pricing rules and promotional discounts.

Magento 1 Catalog Database Pricing

Our network