0

I am using Magento version 1.9.3.4 and having around 6000 products in my stores with varies categories. Now I need to change the product Price by increasing 8% for all products.

I have tried adding excel sheet and importing it and its taking very longer time to import.

Is there any other options to change the Price for all products at same time?

0

Try this:

ini_set('memory_limit', '8024M');

error_reporting(E_ALL);
require_once './app/Mage.php';

umask(0);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

$collection = Mage::getResourceModel('catalog/product_collection');

foreach($collection as $product) {

    $_product = Mage::getModel('catalog/product')->load($product->getId());
    $price = ($_product->getPrice() * 1.02);
    $_product->setPrice($price);
    $_product->save();

}

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.