title: How to import products with multiple descriptions into magento
body: <p>I am importing products from a 3rd party database into my magento site.  I have found a great tutorial online for doing this in PHP.</p>
  
  <p>However, the tutorial does not describe how to assign multiple descriptions to a single product based on the store.</p>
  
  <p>In my example I have a product that has both an english and french description.  One for my French store and one for the english, how can I import both into magento.</p>
  
  <p>I also need to do this for the title, urlkey and have different categories assigned per store.</p>
  
  <p>Here is the code given on the tutorial.</p>
  
  <pre><code>&lt;?php
  require_once('/path/to/magento/app/Mage.php');
  umask(0);
  
  // Set an Admin Session
  Mage::app()-&gt;setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
  Mage::getSingleton('core/session', array('name'=&gt;'adminhtml'));
  $userModel = Mage::getModel('admin/user');
  $userModel-&gt;setUserId(1);
  $session = Mage::getSingleton('admin/session');
  $session-&gt;setUser($userModel);
  $session-&gt;setAcl(Mage::getResourceModel('admin/acl')-&gt;loadAcl());
  
  // Then we see if the product exists already, by SKU since that is unique to each    product
  $product = Mage::getModel('catalog/product')
  -&gt;loadByAttribute('sku',$_product['sku']);
  
  if(!$product){
  // product does not exist so we will be creating a new one.
  
  $product = new Mage_Catalog_Model_Product();
  
  $product-&gt;setTypeId('simple');
  $product-&gt;setWeight(1.0000);
  $product-&gt;setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
  $product-&gt;setStatus(1);
  $product-&gt;setSku('UNIQUESKUHERE');
  $product-&gt;setTaxClassId(0);
  $product-&gt;setWebsiteIDs(array(0)); // your website ids
  $product-&gt;setStoreIDs(array(0));  // your store ids
  $product-&gt;setStockData(array(
      'is_in_stock' =&gt; 1,
      'qty' =&gt; 99999,
      'manage_stock' =&gt; 0,
  ));
  }
  
  // set the rest of the product information here that can be set on either new/update
  $product-&gt;setAttributeSetId(9); // the product attribute set to use
  $product-&gt;setName('Product Title');
  $product-&gt;setCategoryIds(array(0,1,2,3)); // array of categories it will relate to
  $product-&gt;setDescription('Description');
  $product-&gt;setShortDescription('Short Description');
  $product-&gt;setPrice(9.99);
  
  // set the product images as such
  // $image is a full path to the image. I found it to only work when I put all the images I wanted to import into the {magento_path}/media/catalog/products - I just created my own folder called import and it read from those images on import.
  $image = '/path/to/magento/media/catalog/products/import/image.jpg';
  
  $product-&gt;setMediaGallery (array('images'=&gt;array (), 'values'=&gt;array ()));
  $product-&gt;addImageToMediaGallery ($image, array ('image'), false, false);
  $product-&gt;addImageToMediaGallery ($image, array ('small_image'), false, false);
  $product-&gt;addImageToMediaGallery ($image, array ('thumbnail'), false, false);
  
  // setting custom attributes. for example for a custom attribute called special_attribute
  // special_attribute will be used on all examples below for the various attribute types
  $product-&gt;setSpecialAttribute('value here');
  
  // setting a Yes/No Attribute
  $product-&gt;setSpecialField(1);
  
  // setting a Selection Attribute
  $product-&gt;setSpecialAttribute($idOfAttributeOption); //specify the ID of the attribute   option, eg you creteated an option called Blue in special_attribute it was assigned an ID of some number. Use that number.
  
  // setting a Mutli-Selection Attribute
  $data['special_attribute'] = '101 , 102 , 103'; // coma separated string of option IDs. As ID , ID (mind the spaces before and after coma, it worked for me like that)
  $product-&gt;setData($data);
  
  try{
  $product-&gt;save();
  } catch(Exception $e){
  echo $e-&gt;getMessage();
  //handle your error
  }
  ?&gt;
  </code></pre>