Try the Demo

Magento Forum

   
I can’t set custom attribute that has numbers in the attribute code
 
JJLaird
Jr. Member
 
Total Posts:  10
Joined:  2011-08-09
 

Hello,

I currently have an observer function set up for event catalog_product_save_before and it is working fine however I wish to set a custom attribute before the save. I can achieve this when the attribute code has no numbers in it as below however if there are numbers in the attribute code I cannot. Please can someone help me as to how I set this custom attribute if the attribute code has numbers in it.

$event = $observer->getEvent();
$product = $event->getProduct();
$sku = $product->getEntityId();

$product->setTesting(’88’) //This works for attribute code ‘testing’
$product->setShippingPrice35(’88’) //This doesn’t work for attribute code ‘shipping_price_3_5’ ????

Thanks in advance

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top