Tag Archives: Magento Reindex Data Programmatically

magento 1 update product attribute without reindex programmatically

update your product attribute without reindex programmatically.
Create a file updateAttribute.php on the root directory of your project folder and paste the the below code on your newly created (updateAttribute.php) file.

require_once('app/Mage.php'); 
umask(0);
Mage::app('admin');
// $product_id thhis is your product id(entity_id)
// $attribue_code this is your product attribute code (LIKE magento1 default code staus,description, etc )
// $value this is product code value 


$product = Mage::getModel('catalog/product')->load($product_id); 
$resource = $product->getResource();
$product->setData($attribue_code, $value);
$resource->saveAttribute($product, $attribute_code);