Wednesday 12 September 2012

Here are some prestashop modules to download

Product import using CSV

This is the correct format to import product using csv.

For some special drop down attributes you have to use some special attribute values to insert csv

Example:

Shipping (11923 => 24h, 11924 => 48h)

Note: 11923 (Feature id)
24h (Feature value)

Open AdminImport.php ( root/adminfolder/tabs)

Goto line #185 define the array values in function __construct()

,'Shipping' => array('label' => $this->l(' Shipping (11923 => 24h, 11924 => 48h)'))

Go to line #870 to insert the new fields

if(isset($info['Shipping'])){
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'feature_product` (`id_feature`, `id_product`, `id_feature_value`)
VALUES (23, '.$product->id.', '.(int)($info['Shipping']).')
ON DUPLICATE KEY UPDATE `id_feature_value` = '.(int)($info['Shipping']));
}

Note : “23 ” is Shipping's feature id

After uploading csv we should Select from the drop-down list above each column the value you want to attribute to the corresponding value.