Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Removing product from store
 
seldon
Sr. Member
 
Total Posts:  92
Joined:  2007-11-08
 

If i add a product to a store and then remove it again from that store, the the product is no longer visible in the manage products admin area. I would expect that the product should be added to ‘all stores’ (ie, store id=0 in catalog_product_store) when a product is removed from any particular store. This however is not the case.

Is this a bug? Or intended behaviour (which would be very weird, since the product can then no longer be accessed) ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
YoavKutner
Guru
 
Avatar
Total Posts:  491
Joined:  2007-08-08
 

Can you please give us more information on how you got to this?

Did you use the import tool?

Thanks

yoav

 
Magento Community Magento Community
Magento Community
Magento Community
 
seldon
Sr. Member
 
Total Posts:  92
Joined:  2007-11-08
 

Ok,
My mistake. I imported the product into the English store, and after the import i removed it from the Egnlish store. And then it disappears because it was never coupled to ‘All stores’ (store_id = 0). So I would suggest, to make sure this problem never occurs, that when importing a product to a store, it will always be added to ‘All stores’, even when a specific store is specified in the import.

I also wonder how to manually add a product to multiple stores via the csv import ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

In catalog/convert_parser_product on line 77 there should be a mechanism for importing into store 0 if product does not exist - is it commented out for you?

The catalog/convert_adapter_product parser works so that you can put in “store” column store codes separated by comma. Meaning if you have “base,german” it will import this row’s data into 2 stores.

 
Magento Community Magento Community
Magento Community
Magento Community
 
seldon
Sr. Member
 
Total Posts:  92
Joined:  2007-11-08
 

I dont see anything like that on line 77. I do see in Mage_Eav_Model_Convert_Parser_Abstract that a product is only added to store 0 if no stores are passed. This means that when a user passes stores by setting the store var in the csv the product is NOT added to store 0 if the user does not specify this. I think it’s wise to *always* add the product to store 0, irrespective to what the user adds in the csv. (the reason being to make sure the above described problem can never occur).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Sorry, by “catalog/convert_parser_product” i meant Mage_Catalog_Model_Convert_Adapter_Product class - see what you have there on line 77

The logic should be that *only if* the product doesn’t exist, the default values (store 0) are filled with new values.
When I’m importing for specific store i’m expecting the values to be updated only for this store, keeping *default values* untouched.

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