We have right now three store views with different locales and plan to extend their quantity in a future.

We encountered issue when some attributes (price, name, etc) are properly received when we saving them with storeId = 0, then, according to


the sql query like this is used to get these attributes:

 SELECT `attr_table`.* FROM `catalog_product_entity_text` AS `attr_table`
 INNER JOIN `eav_entity_attribute` AS `set_table`
 ON attr_table.attribute_id = set_table.attribute_id AND set_table.attribute_set_id = '4' 
 WHERE (attr_table.entity_id = '50') AND (attr_table.store_id IN (0, 2))

As you can see, these is actually works for admin store if attr_table.store_id = 0. But in some cases, like with setting default image for product (image, small_image and thumbnail attributes) or using tag/tag model it is impossible to use storeid = 0.

So, the question is - how in this cases it is possible to update product attributes for all store ids at once without iterating over all store ids like this :

foreach ($stores as $store) {
        $product = Mage::getModel('catalog/product')->load($product->getId());
                                        $attributes, $store); 

and how if I have for example product with some $id:

    $product = Mage::getModel('catalog/product')->load($id);
    // how to save this model for all store views  at once, without using setStoreId(0) ?

Thanks !

1 Answer 1


I'm not sure if I understand you correctly, but I'll try with explaining how the loading of the EAV Attributes actually (should) work(s).

If you save a Product in the Admin without choosing a Store View, the Attributes should all get stored with the default store id = 0.

An attribute in Magento has a Scope, which defines if it can be overridden on website or storeview level.

If you load a Product in the frontend, the values for the attributes are loaded from the current store view / website with a fallback to the default store.

So, if you want to save an attribute with the same value for all store views, you only have to save it with the store id = 0, or just do this in the admin context without setting a store id.

You do not have to save the attribute for every store view (if it does not change between them).

If you have to, you are probably not in the admin context or you have a module installed which messes sth up

  • Thank you for reply, It seems logical me, although I have some difficulties with saving tag/tag model and thumbnail and image attributes. Can I ask you as an experienced developer to share piece of code for saving tag/tag for all store views and/or image attribute of a product?
    – Ilja
    Apr 25, 2016 at 7:39

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.