stuffedhippo Posted February 27, 2012 Share Posted February 27, 2012 I have been looking for this for a while but can not find a details instruction. As you can see from my attacment I have set up a few custom fields for me products. Thiese are working on the backend/front end as I wish. The problem I have is the customer hase around 9500 products and wants to upload this data in the CSV file. I am sure this is possible and did come accrsss this posthttp://www.prestasho...uestion/#307274 but have not been able to get it to work. Has anyone got a more in-depth explanation? Thanks stuffedhippo Link to comment Share on other sites More sharing options...
mathis Posted February 28, 2012 Share Posted February 28, 2012 I think you only need classes/product.php admin/tabs/AdminImport.php In AdminImport.php you need to add your fields at line 184: Just Like: 'condition' => array('label' => $this->l('Condition'))); At Line 936 $id_product_attribute = $product->addProductAttribute((float)($info['price']), (float)($info['weight']), 0, (float)($........ you have to add your fields with ...(int)($info['default_on']), ($info['YOURFIELDNAME'])... Watch out that you fit the addProductAttribute function in Product.php. In Product.php go to line ~920 public function addProductAttribute... and add your parameters in the right position .., $yourfieldname, ... Now edit the Array in the function array('id_product' =>..... add your field with ..., 'yourfieldname' => pSQL($yourfieldname),... This works for me. At the csv import your have to choose your fields at import step 2 manually. Wrote this down in 5 minutes, hope it helps anyway.. 2 Link to comment Share on other sites More sharing options...
stuffedhippo Posted March 1, 2012 Author Share Posted March 1, 2012 Works at treat. Thanks for your help. Now I just have to get the client to produce the csv!!! Link to comment Share on other sites More sharing options...
ember1205 Posted August 3, 2012 Share Posted August 3, 2012 Seriously? This is the "fix"? Modify the base code to support more fields? The more I look into PrestaShop the less impressed I become. ALL fields available to a product or category should be available at the time of import. Period. The fact that I have a "Ignore this column" setting means that I'm already 90% of the way there. Instead of defining each individual attribute that is "available" to be imported in bulk, the system should recursively read the attribute list based on the kind of import I'm doing (product versus category) and let me choose ALL of them. Additionally, being able to label the fields in the import process means that I can have them OUT OF ORDER or not include all of them if I don't want to. Modifying the base code of the product is a TERRIBLE solution. Link to comment Share on other sites More sharing options...
cleatus Posted October 16, 2012 Share Posted October 16, 2012 is this still the case with 1.5.1.0? i'm in admin creating features and attributes fuilly expecting them to show up in import list but they are not. I never expected in a million years that attributes i create for a product would not be importable. that's just common sense! am i missing something or do we still not have full import functionality even though we've got multi store? what is the point of csv import if i still have to go through the product admin filling in blanks. please tell me i'm missing something! if not, how soon can this be implemented? Link to comment Share on other sites More sharing options...
Ebin Sebastian Posted November 27, 2012 Share Posted November 27, 2012 But in the case of prestashop1.5.2 the files are classes/product.php controllers/admin/AdminImportcontroller.php Link to comment Share on other sites More sharing options...
Watchaa Posted May 15, 2014 Share Posted May 15, 2014 does anyone how to proceed for prestashop 1.6x ?! thanks Link to comment Share on other sites More sharing options...
Mykhailo Posted June 4, 2014 Share Posted June 4, 2014 Hi! I'm using PS 1.6 and can't find $id_product_attribute = $product->addProductAttribute((float)($info['price']), (float)($info['weight']), 0, (float)($........ controllers/admin/AdminImportcontroller.php So I just adde my fields like 'condition' => array('label' => $this->l('Condition'))); but had no luck - CSV import in admin panel stopped working, Any ideas how to customize csv import in PS 1.6? Link to comment Share on other sites More sharing options...
aboutthelettera Posted December 31, 2014 Share Posted December 31, 2014 Hi, Need help for 1.6 as well. Thanks! Link to comment Share on other sites More sharing options...
pskeeda Posted February 17, 2015 Share Posted February 17, 2015 Why this is marked as solved, when its not. 1 Link to comment Share on other sites More sharing options...
rsnemesis Posted February 24, 2015 Share Posted February 24, 2015 Hi! I'm using PS 1.6 and can't find $id_product_attribute = $product->addProductAttribute((float)($info['price']), (float)($info['weight']), 0, (float)($........ controllers/admin/AdminImportcontroller.php So I just adde my fields like 'condition' => array('label' => $this->l('Condition'))); but had no luck - CSV import in admin panel stopped working, Any ideas how to customize csv import in PS 1.6? Your field is wrong, it should be: 'condition' => array('label' => $this->l('Condition')); and then my best guess is that you need to change public function productImport() adding some lines to accept that field to populate the database... but i never managed to get it to work for instance i did the following in productImport() if (isset($product->your_custom_field)){ $product->your_custom_field = $product->your_custom_field; } maybe i done it wrong but it seems to me that it would insert into database... well it didn't, so any help would be apreciated. Link to comment Share on other sites More sharing options...
lucasdemenezes Posted August 4, 2015 Share Posted August 4, 2015 soes anyone know how to use it to import carriers associated to products? please, help me. i have products that can be send by carrier 1, but i dont want to send by carrier 2. are you understanding me? import products with carriers. Link to comment Share on other sites More sharing options...
[email protected] Posted September 23, 2015 Share Posted September 23, 2015 Importing custom fields and also having the customfields go into the right tabs is what would make me happy with Prestashop Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now