0

I want to increase the price of all products
And if I want to edit each one
It's very time consuming
Is there a way to group?

3
  • You may do it programmatically. Do you want to increase the price by a fixed amount or by a certain percentage? Or Do you have the updated prices in a CSV file ? Please clarify, I will provide a shell script to update the prices programmatically based on your needs.
    – nikin
    Jul 25, 2018 at 8:19
  • If your products have the same price (I don't think so) you can use the massAction via admin to do that otherwise, you have to it manually
    – PЯINCƎ
    Jul 25, 2018 at 8:20
  • I want to raise all the products for a certain amount Jul 25, 2018 at 9:44

2 Answers 2

1
  1. Export all products from admin

enter image description here enter image description here

  1. Then copy complete sku column from this export csv.

  2. Create new csv with 2 columns (sku , price ). paste all sku on that new csv and add updated price on price column and make import that csv .

4.Import from admin->system->importexport->import enter image description here

0

You can alternately use this solution. A bit of programming is required .Create this file in your Magento root folder

require_once('/app/Mage.php'); //path to mage bootstrapper

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

$csvObject = new Varien_File_Csv();

$pathtoCSV = '/path/products.csv';
$data =  $csvObject->getData($pathtoCSV);

foreach ($data as $lines => $line) {
    $sku = trim($line[0]);
    $price = trim($line[1]);

    $product = Mage::getModel('catalog/product');
    $product->load($product->getIdBySku($sku));

    $product->setPrice($price);
    $product->getResource()->saveAttribute($product, 'price');

 }
2
  • What's the file name؟ Jul 25, 2018 at 9:47
  • You can give any name as it is just a php file accessing core magento functions through the Mage.php Jul 25, 2018 at 9:58

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.