Recently a developer imported all products prices as without VAT. Problem is the prices are including VAT.

We want to remove 25% VAT from all products in our Magento shop. My first thought is to export all the products, open it in Excel and correct the prices, save it and import the prices.

Do you have an easy/better way to do it?

  • You want to add price for all product right
    – Magento 2
    Dec 3 '15 at 12:30

You need to have the correct settings in your configuration.

Look under System/Configuration/Sales/Tax/Calculation

If you write your product prices including taxes, then these options should be set to yes.

  • Also I added VAT settings under "Sales" in the menu.
    – Cudos
    Dec 3 '15 at 19:56

Add bellow script in file (test.php) on magento root and run your browser


class ABDUL
    public function index()    
        echo '<pre>';
        $collection = Mage::getResourceModel('catalog/product_collection');
        if(count($collection)) {
            foreach($collection as $product) {
                try {
                    $odlPrice = $product->getPrice();
                    $newPrice = $odlPrice -($odlPrice*25/100);
                    Mage::log('product sku: '.$product->getSku().' old price : '.$odlPrice.'new price : '.$newPrice,'product_price_update.log');
                } catch (Mage_Core_Exception $e) {

$obj = new ABDUL();

Note : take your database backup first

  • I can use your code for another problem I have, thanks!
    – Cudos
    Dec 3 '15 at 19:57

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.