I created a custom attribute in my products page. The attribute is a dropdown list.

The name of the attribute is soldby.

I want to extract the value of that attribute.

I wrote:

$seller= Mage::getModel('catalog/product')->load($item->getProductId()) ->getData('soldby');

This returns me null.

If I do something similar to an attribute which is a textfield, it works fine.

How can I extract the option selected ?

Please help.

2 Answers 2

$product = Mage::getModel('catalog/product')->load($item->getProductId());  

  • From where do I get $product ? Feb 22, 2017 at 11:21
  • $product is the product model - see updated answer. Feb 22, 2017 at 11:24

Please try this:

$seller= Mage::getModel('catalog/product')->load($item->getProductId());

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.