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?
-
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.– nikinJul 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– Mojtaba AnsariJul 25, 2018 at 9:44
2 Answers
- Export all products from admin
Then copy complete sku column from this export csv.
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 .
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');
}
-
-
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