0

i had put cost price of product now i want to change price of product based on some multiplication like 2.5, 3 for all products.

How can i do it via magento admin or some custom code , is that possible to do change at one place in admin

3
  • Not from admin, but you can use import->export utility. CSV readers generally provide that kind of multiplication.
    – Prateek
    Commented Oct 13, 2015 at 7:37
  • why you does not tried with change product price at baCKEDN
    – Amit Bera
    Commented Oct 13, 2015 at 7:49
  • where u mean edit each product Commented Oct 13, 2015 at 7:57

1 Answer 1

0

Your question,is not clear in mind.

But may be your want to increase your current product price 2.5 ,3 times.

Best Option:Update product price Import/Export using Csv

So in this case,Better idea to export current products price,sku in csv sheet from System>Import/Export section then increase those by 2.5,3 ,and Import that update sheet.

Using code:

Get Product collection and update product by logic:

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

foreach($collection as $product):
  $CurrntPrice=$product->getPrice();
  // Due some logic
  $tempPrice=2.5*$CurrntPrice
  // below code use for time format 
  $product->setPrice($tempPrice);
  $product->getResource()->saveAttribute($product, 'price');
endforeach;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.