Jump to content

import date_add nouveauté -- AdminImport changes


Recommended Posts

Hi,

I modified a very few code in order to import a 'new product' flag, the date_add field

Salut, vla mes chtites modifs pour l'import du flag nouveauté basé sur la date de création
(tu parles comme c'est facile à gérer après, m'enfin bon)

admin/tabs/AdminImport.php
119:
           case $this->entities[$this->l('Products')]:

               self::$validators['image'] = array('AdminImport', 'split');

               $this->available_fields = array(
               'no' => $this->l('Ignore this column'),
[....]
               'feature' => $this->l('Feature'),                                        
               'date_add' => $this->l('Date (yyyy-mm-dd)'), /* clic-france gk */
               );

627:
           if ($product->validateFields(UNFRIENDLY_ERROR) AND $product->validateFieldsLang(UNFRIENDLY_ERROR))
           {
               // If id product AND id product already in base, trying to update
               if ($product->id AND $product->productExists(intval($product->id)))
                   $res = $product->update();
               // If no id_product or update failed
               if (!$res)
                   $res = $product->add(false);//clic-france gk no autodate
           }


add a new column in imported CVS

date_add
2008-12-29
2009-01-14

Link to comment
Share on other sites

×
×
  • Create New...