I have custom price attribute called wholesale_price.

The wholesale_price is only needed for one of the store view. So i choose specific store view, then update the wholesale_price.

The problem is:
    I can get the wholesale_price variable through $_product->getWholesalePrice() in product view page but not in product listing page.
In product listing page, the $_product->getWholesalePrice() is empty.

Eventually, after i tried to save it from default store view. The wholesale_price is available in the product listing page.

So everytime i need to update the price, i need to go by saving from default store, and it is annoying.

Could you please tell me what is the code difference between saving from default store view and the others store view?

Thank you!

  • what is scope of your attribute ? and it should be Used in Product Listing selected as "Yes" Mar 2, 2016 at 3:59
  • I cannot set price scope, and i have set the Product Listing to 'Yes' Mar 2, 2016 at 4:29
  • i am asking for your custom attribute scope read here and here Mar 2, 2016 at 4:39
  • My bad for not writing it clearly. When you set the attribute type to Price then the scope attributes is hidden. I am running magento 1.9 Mar 2, 2016 at 5:52
  • have you tried indexing ? Mar 2, 2016 at 6:14

1 Answer 1


The solution I get is using the saveAfter event and explicitly set default store WholesalePrice to be updated.

Mage::getSingleton('catalog/product_action')->updateAttributes(array($product->getId()), $attributes , 0);

Thank you guys for your help.

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.