I am trying to set or update Manufacturer value using code but its not working.Manufacturer is dropdrown on admin side.I am trying code like this :

$productcity = Mage::getModel('catalog/product');

        $loadpro= $productcity->load($id);

What am i doing wrong ? thanks I am adding screenshot for attribute.May be it help enter image description here enter image description here

  • $wholedata['manufacture'] contains id or value (text) ? – Pradeep Sanku Nov 14 '14 at 6:25
  • it is id like 117. – Adda Nov 14 '14 at 6:28
  • check my question.I added screenshots. – Adda Nov 14 '14 at 9:32

Things to check:

  • attribute is of type int or varchar
  • attribute is in same attribute set as the product
  • attribute is allowed for the product type apply_to
  • attribute should be loaded with the product, is this the case?
  • don't save the product in frontend, this is not possible, because orig_data are not set
  • I have added Screenshot of my attribute .May be it help to understand. – Adda Nov 14 '14 at 9:32
  • Did you check the points? Is your product a simple item? – Fabian Blechschmidt Nov 14 '14 at 10:18
  • Yes my product is simple product. – Adda Nov 14 '14 at 10:22
  • Is the attribute set on the product? If the attribute is set before the save, I think it is time for xdebug to dig down into the saving process... – Fabian Blechschmidt Nov 14 '14 at 10:33
  • Yes it is set on the product.I used it and it was working perfect.After changing code on front and trying to update Manufacturer it stop updating.When i print the values it gives me 0 for Manufacturer. – Adda Nov 14 '14 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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