pskeeda Posted January 25, 2015 Share Posted January 25, 2015 (edited) PS Version: 1.6.0.11 I have to import around 1000 products. I have created all the categories with CSV import successfully and currently my category tree looks like below; Home -Category X --SubCategory A ---SubSubCategory P ---SubSubCategory Q --SubCategory B --SubCategory C -Category Y --Subcategory L --SubCategory M -Category Z --SubCategory N --SubCategory O Now when i add Category X,SubCategory A,SubSubCategory P in category column of CSV of particular product, and after importing the CSV, apart from the categories mentioned in category column in CSV, the products get also assigned to Home category automatically. I have searched a lot through forums, google, but didnt found any solution. Anyone please help me with this. Edited February 3, 2015 by madhurna (see edit history) Link to comment Share on other sites More sharing options...
pskeeda Posted January 26, 2015 Author Share Posted January 26, 2015 so many views,but no reply? is there anybody who can help me please! Link to comment Share on other sites More sharing options...
pskeeda Posted January 28, 2015 Author Share Posted January 28, 2015 still awaiting for the solution guys Link to comment Share on other sites More sharing options...
tcshad Posted January 29, 2015 Share Posted January 29, 2015 I have noticed the exact same behaviour. It essentially makes the importer unusable for me. I may have to just write an sql query for the import. I have : Home Category - Subcategory - - SubSubCategory1 - - SubSubcategory2 Then I manually created over 400 products and for example added Product A into Association to SubSubCategory1 and SubSubcategory2. (it is a consumable that works in both these category items) When I do an import with just product ID and price, which is all I really need to update, the importer wipes my associations. Which is very silly. It should simply update the data in the csv I'm importing and leave everything else as is. 1 Link to comment Share on other sites More sharing options...
pskeeda Posted January 31, 2015 Author Share Posted January 31, 2015 Prestashop team do you have any solution for this or not?????? Link to comment Share on other sites More sharing options...
Schrikkema Posted February 1, 2015 Share Posted February 1, 2015 Same problem her .. anyone a solution? Link to comment Share on other sites More sharing options...
pskeeda Posted February 2, 2015 Author Share Posted February 2, 2015 mods please help, this is still unresolved. Link to comment Share on other sites More sharing options...
pskeeda Posted February 3, 2015 Author Share Posted February 3, 2015 finally found the solution, file in controllers/admin/AdminImportController.php with the attached file AdminImportController.php 1 Link to comment Share on other sites More sharing options...
parsifal Posted February 3, 2015 Share Posted February 3, 2015 Hi madhurna. Did you fix the controller file yourself or is there a fixed/patched version in PrestaShop Forge or Github? Link to comment Share on other sites More sharing options...
pskeeda Posted February 3, 2015 Author Share Posted February 3, 2015 the fix is on prestashop forge Link to comment Share on other sites More sharing options...
gibalspam Posted February 4, 2015 Share Posted February 4, 2015 finally found the solution, file in controllers/admin/AdminImportController.php with the attached file I think there is another bug in this file on line 0669 - should it be $this->addJS(_PS_JS_DIR_.'adminImport.js'); ?? Link to comment Share on other sites More sharing options...
Schrikkema Posted February 5, 2015 Share Posted February 5, 2015 Worked for us with the the line 669 : $this->addJS(_PS_JS_DIR_.'adminImport.js'); Thankx Link to comment Share on other sites More sharing options...
dformica Posted February 10, 2015 Share Posted February 10, 2015 I'm not able to set default category during CSV import. I'm currently on 1.6.0.11 with latest githup https://github.com/PrestaShop/PrestaShop/blob/b9437bf7cb07eac86fb3bd5a7b54df13027f617f/controllers/admin/AdminImportController.php My category looks like this 11|12||23|24|25|54 I'm expecting (12) to be the default category since it's the last subcategory in the 1st group separeted by (||). This is how 1.5 used to work. Then I tried placing the subcategory that I want to be default (12) first E.g: 12||11|12||23|24|25|54 but nope it doesn't work it still records (11). Please advice. Link to comment Share on other sites More sharing options...
jasonvillage Posted February 10, 2015 Share Posted February 10, 2015 Worked for us with the the line 669 : $this->addJS(_PS_JS_DIR_.'adminImport.js'); Thankx Yes, need to make the above correction to work. Confirmed in 1.6.0.11 Link to comment Share on other sites More sharing options...
gibalspam Posted February 10, 2015 Share Posted February 10, 2015 I'm not able to set default category during CSV import. I'm currently on 1.6.0.11 with latest githup https://github.com/PrestaShop/PrestaShop/blob/b9437bf7cb07eac86fb3bd5a7b54df13027f617f/controllers/admin/AdminImportController.php My category looks like this 11|12||23|24|25|54 I'm expecting (12) to be the default category since it's the last subcategory in the 1st group separeted by (||). This is how 1.5 used to work. Then I tried placing the subcategory that I want to be default (12) first E.g: 12||11|12||23|24|25|54 but nope it doesn't work it still records (11). Please advice. I'm using comma to separate two categories f.e. 13,14 or 1,15 first number is default category id You can also replace line 669 to : $this->addJS(_PS_JS_DIR_.'adminImport.js'); (javaScript and import buttons working) in file that You use Link to comment Share on other sites More sharing options...
dformica Posted February 10, 2015 Share Posted February 10, 2015 (edited) I'm using comma to separate two categories f.e. 13,14 or 1,15 first number is default category id You can also replace line 669 to : $this->addJS(_PS_JS_DIR_.'adminImport.js'); (javaScript and import buttons working) in file that You use In my case I have in AdminImportController.php public function renderView() { $this->addJS(_PS_JS_DIR_.'admin/import.js'); Edited February 10, 2015 by dformica (see edit history) Link to comment Share on other sites More sharing options...
kiteboarder Posted February 11, 2015 Share Posted February 11, 2015 In my case I have in AdminImportController.php public function renderView() { $this->addJS(_PS_JS_DIR_.'admin/import.js'); Just download the file from "madhurna" and change this line to 669 : $this->addJS(_PS_JS_DIR_.'adminImport.js'); For me works fine, thank you team for fast reaction, I was scared little bit when i saw it first time..)) Link to comment Share on other sites More sharing options...
Zalps Posted June 28, 2016 Share Posted June 28, 2016 Why solved? It still makes id_category_default the home category.... Link to comment Share on other sites More sharing options...
musicmaster Posted June 28, 2016 Share Posted June 28, 2016 It doesn't solve the problem, but it may help to know that with Prestools you can easily mass-remove this superfluous assignment to the home category. Link to comment Share on other sites More sharing options...
Zalps Posted June 28, 2016 Share Posted June 28, 2016 Thanks for the response but I think that everyone's problem is that we would like to have the ability to keep our initial id_category_default. Removing massively the superfluous assignment to the home category, is something that could be also be done with a query in the database. Link to comment Share on other sites More sharing options...
vucumbra Posted December 26, 2016 Share Posted December 26, 2016 this problem not is solved 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