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

default values when importing CSV
 
palmcron
Jr. Member
 
Total Posts:  2
Joined:  2008-09-17
Erlangen, Germany
 

Hi,

I’d like to import CSV-files from external sources, in which no information about (for example) visibility is included, and they and up with visibility none. Is there a way to set the default value, which imported product without this attribute in the import data get assigned?

Greetings
palmcron/Gerhard

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

If you look in the code for the import (at least the one used in Import All Products), you’ll see that it does not look at the imported data to set visibility. It has this code:

if (!$product->getVisibility()) {
        $product
->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE);
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top