Defects and improvements of the Importer

  • Posts: 7
  • Thank you received: 0
13 years 9 months ago #7270

Hi,

i found following defect:
- white spaces are not removed in image lists "image1.jpg;    image2.jpg;   image3.jpg "
- no checks for douplicates. The importer don't import all products if i have records with the same product_code in the list

improvements
- removing of white spaces everywhere


Kind Regards
Markus

Last edit: 13 years 9 months ago by Markus.

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
13 years 9 months ago #7271

Hi,

Unfortunately, we can't just remove white spaces everywhere...
Imagine if your product is called "my product". You don't want it to become myproduct during the import.
How come your CSV has HTML spaces in the middle of images lists ? That's clearly not normal...

Duplicates are checked. If you import a CSV with products which already exists, the information of these products are updated with the new CSV information.

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
13 years 9 months ago #7284

sorry just a trim() not in the middle ;)

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
13 years 9 months ago #7286

nicolas wrote:

Duplicates are checked. If you import a CSV with products which already exists, the information of these products are updated with the new CSV information.


For duplicates in the list it self. That you can't overwrite your own settings by accident.
I tried also to import a list with 1 duplicate product_code like:

product_code;product_name;categories
ABC;Test Product1;10
CDE;Test Product2;10
ABC;Test Product3;10

Then for example the category was not written into the database. The category exists already in the db.
The import was ok and i could find the product in the database but not in the UI because of the missing link to a category.

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
13 years 9 months ago #7287

nicolas wrote:

How come your CSV has HTML spaces in the middle of images lists ? That's clearly not normal...


I have a customer and he is creating the import list currently manually. For none technical people it's really easy with copy&paste to append a white space at the end/beginning of the image name. With a leading/trailing white space hikashop can't find the image and shows the barcode.

Last edit: 13 years 9 months ago by Markus.

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
13 years 9 months ago #7291

I tried to import the CSV:
product_code;product_name;categories
ABC;Test Product1;10
CDE;Test Product2;10
ABC;Test Product3;10

and it imported properly.
As expected, the product2 and product3 were inserted. The product1 is missing and that's normal. HikaShop uses the code of the product to import the product or update it. So hikashop inserts product 1 and product2. When, it reaches product3, the product with the code ABC already exists, so the information of the product is updated with the new information.

I understand your concerns with white spaces, but suppose that your user also adds a space at the beginning of the real image name... He will never be able to set the correct image name in the CSV since the space will be removed...I'm sure that if we add such trim function, someone else will complain that they can't add images with a space a the beginning...

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
13 years 9 months ago #7402

Ok if the white spaces are working as intended then it's ok B)

The other problem with the importer and double product_codes i wanted to import these records

product_code;product_name;product_description;product_weight;product_width;product_length;product_height;images;parent_category;categories;price_value;product_dimension_unit;product_weight_unit
BK1;Baluster Klassik;;11;11;12;50;"19.jpg;20.jpg;21.jpg;22.jpg;23.jpg;24.jpg;Baluster Klassik.jpg;Baluster Klassik 1.jpg";Balustraden;Balustraden Klassik;12,10084034;cm;kg
BL1;Baluster Luna;;11;12;12;60;"32.jpg;33.jpg:34.jpg;35;jpg;36.jpg;37.jpg;38.jpg;Baluster Luna.jpg;Baluster Luna 1.jpg";Balustraden;Balustraden Luna;13,44537815;cm;kg
BKE1;Baluster Kelch;;14;13;13;60;"12.jpg;13.jpg;14.jpg;15.jpg;Baluster Kelch.jpg;Baluster Kelch 1.jpg";Balustraden;Baluster Kelch;13,44537815;cm;kg
BKV1;Baluster KVATRO;;14;13;14;60;"27.jpg;28.jpg;29.jpg;30.jpg;Baluster Kvatro.jpg;Baluster Kvatro 1.jpg";Balustraden;Baluster Kvatro;13,44537815;cm;kg
BN1;Baluster NEW;;11;13;14;75;"41.jpg;42.jpg;43.jpg;44.jpg;45.jpg;46.jpg;BALUSTER New.jpg;Baluster New 1.jpg";Balustraden;Baluster New;14,78991597;cm;kg
BK1;Baluster KEGEL;;12;12;13;70;"5.jpg;6.jpg;7.jpg;8.jpg;Baluster Kegel.jpg;Baluster Kegel 1.jpg";Balustraden;Baluster Kegel;14,78991597;cm;kg
BR1;Baluster ROKO;;10;14;14;75;"48.jpg;49.jpg;50.jpg;51.jpg;Baluster Roko.jpg;Baluster Roko 1.jpg";Balustraden;Baluster Roko;14,78991597;cm;kg
SL1;Satz  LUNA;;;21;82;85;"59.jpg;60.jpg;Satz Luna.jpg";Balustraden;Satz Luna;72,60504202;cm;kg
SA1;Satz ANTIK;;;18;88;75;"54.jpg;55.jpg;56.jpg;57.jpg;Satz Antik.jpg";Balustraden;Satz Antik;72,60504202;cm;kg
G1;Kugel Klein;;13;13;13;13;;Balustraden;Sockel und Handläufe;10,75630252;cm;kg
TS1;Hauptsaeule ;;23;20;20;50;"Hauptsäulen.jpg;Hauptsäulen 1.jpg";Balustraden;Hauptsäulen;28,23529412;cm;kg
F;Pflanzring BAUM klein;;11;20 x 16;11;36 x 31;"1KP.jpg;2KP.jpg;3KP.jpg";Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;20,33613445;cm;kg
KP2;Pflanzring BAUM mittel;;15;30 x 24;11;45 x 40;"1KP.jpg;2KP.jpg;3KP.jpg";Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;24,03361345;cm;kg
KP3;Pflanzring BAUM groß;;18;35 x 27;11;47 x 43;"1KP.jpg;2KP.jpg;3KP.jpg";Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;27,73109244;cm;kg
NO1;Tritt BAUM;;5,3;;4;30 x 26;"104.jpg;105.jpg;106.jpg";Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;9,243697479;cm;kg
NO2;Tritt BAUM;;7;;4;35 x 27;;Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;11,09243697;cm;kg
NO3;Tritt BAUM;;8,4;;4;39 x 32;;Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;12,94117647;cm;kg
NK1;Tritt BAUM;;10;;5;60 x 40;;Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;12,94117647;cm;kg
OA1;Beeteinfassung    AKAZIE;;10;40;25;6;"62.jpg;63.jpg;64.jpg;65.jpg;66.jpg;67.jpg;68.jpg;69.jpg;70.jpg;71.jpg";Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;10,58823529;cm;kg
DLS1;Gartenplatten WOOD;;12;39;4;39;;Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;9,411764706;cm;kg
OB1;Schwimmbecken Einfassung;;19;32;50;7;"72.jpg;73.jpg;74.jpg;75.jpg";Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;13,61344538;cm;kg
OB2;Ecke außen;;28;50;50;7;;Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;19,66386555;cm;kg
OB3;Ecke innen;;28;50;50;7;"76.jpg;77.jpg;78.jpg";Produktkategorie;Pflanzringe/Gartenplatten/ Beeteinfassungen;19,66386555;cm;kg

There is one product code "BK1" twice in there. The import is ok so the products can be found in the database BUT the no categories are witten and the products are not visible in the UI.
This are real recods out of the shop and the bug is reproduceable

From left to right the images describing the steps:
1) Import the records without doublicate records. Changed one "BK1" to "BK2"
2) Import was successful
3) Changing "BK2" back to "BK1"
4) Importing again and the second import was also successfully
5) Looking in the same product category and the "Baluster Luna" product is missing

I checked the db and there i found the product but without a category entry.


Attachments:
Last edit: 13 years 9 months ago by Markus.

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
13 years 9 months ago #7403

I'm sorry but I just tried to import your CSV on my end and I got your categories and your products in them.

I tried also on our demo website:

Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum