Import/Export

Phoca Cart - complex e-commerce extension
User avatar
Slava
Phoca Enthusiast
Phoca Enthusiast
Posts: 62
Joined: 07 Nov 2025, 18:39

Import/Export

Post by Slava »

Hello
Joomla ‎6.0.2/Phoca Cart 6.1.0Beta9

My import file contains 4489 products.
import/Upload -> There are products ready to import: 4490
The import is working correctly; 4489 products are being loaded.

The number of products in the imported file has been calculated incorrectly.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49381
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Import/Export

Post by Jan »

It is possible that the first row (the titles) is counted as the product, thank you for the info.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Slava
Phoca Enthusiast
Phoca Enthusiast
Posts: 62
Joined: 07 Nov 2025, 18:39

Re: Import/Export

Post by Slava »

Hello
J‎6.1.0/PC6.1.0Beta12

Microsoft Excel can be used to prepare import files, followed by saving the data in CSV format.
All versions of Excel escape double quotation marks when saving to CSV: if a cell contains the text "Hello, world!", it will be represented as """Hello, world!""" in the resulting file.
Phoca Cart does not support this escaping format and cannot properly process the """ characters. This requires manually editing the file in a text editor (replacing """ with ").

Please consider adding support to the import algorithm for processing CSV files exported from Excel, including correct recognition and conversion of escaped quotation marks (""" → ") without the need for manual editing.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49381
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Import/Export

Post by Jan »

Hi, Phoca Cart does not parse the CSV files, there are parsed by PHP methods. I am testing it in LibreOffice and everything is OK, try to see if MS Excel does not have any additional option for this :idea:

Jan
If you find Phoca extensions useful, please support the project
Net
Phoca Member
Phoca Member
Posts: 41
Joined: 29 Sep 2022, 00:28

Re: Import/Export

Post by Net »

Hi folks,

i am trying to import only two products for testing, and i upload it in backend, phoca cart shows it has detected 2 products, i click import, and it shows message All products imported but when i go to product list and refresh it, these products are not imported.

using Phoca Cart 6.0.0
Joomla 5.4.5
php 8.2.29

Can you check what could be wrong? This is csv file i am importing:

Code: Select all

id;title;alias;sku;ean;price;price_original;price_groups;price_histories;tax;categories;manufacturer;upc;jan;isbn;mpn;serial_number;registration_key;external_id;external_key;external_link;external_text;external_link2;external_text2;access;groups;featured;video;public_download_file;public_download_text;public_play_file;public_play_text;condition;type_feed;type_category_feed;description;description_long;features;image;images;attributes;specifications;discounts;related;stock;stock_calculation;stockstatus_a_id;stockstatus_n_id;min_quantity;min_multiple_quantity;min_quantity_calculation;delivery_date;type;length;width;height;weight;volume;unit_amount;unit_unit;points_needed;points_received;point_groups;Published;language;date;date_update;created_by;created;modified_by;modified;tags;taglabels;metakey;metadesc;metatitle;metadata;sales
ID;Title;Alias;SKU;EAN;Price;Original Price;Price Groups;Price History;Tax Rate;Categories;Manufacturer;UPC;JAN;ISBN;MPN;Serial Number;Registration Key;External Product ID;External Product Key;External Link;External Link Title;External Link (2);External Link Title (2);Access;Groups;Featured;Video URL;Public Download File;Public Download File Title;Public File To Play;Public File To Play Title;Condition;Product Type (XML Feed);Product Category Type (XML Feed);Description;Description (Long);Features;Image;Additional images;Attributes;Specifications;Discounts;Related Products;In Stock;Stock Calculation;Stock Status (Product > 0);Stock Status (Product = 0);Minimum Order Quantity;Minimum Multiple Order Quantity;Minimum Quantity Calculation;Product Delivery Date;Product Type;Length;Width;Height;Weight;Volume;Unit Amount;Unit;Points Needed;Points Received;Point Groups;Published;Language;Date;Update Date;Created By;Created Date;Modified By;Update Date;Tags;Labels;Keywords;Meta Description;Meta Title;Metadata;Sales
4444;probni proizvod 444444;;RD-444444;;0.0000;0.0000;;;;;;;;;;;;;;;;;;1;"[{"id":1,"title":"COM_PHOCACART_DEFAULT","published":1,"display_price":1,"display_addtocart":1,"display_attributes":1}]";0;;;;;;0;;;;;;;;;;;;44;0;0;0;0;0;0;0000-00-00 00:00:00;0;0.0000;0.0000;0.0000;0.0000;0.0000;0.0000;;0;0;;1;*;20.8.2023 2:56;0000-00-00 00:00:00;389;20.8.2023 7:36;389;16.4.2026 6:56;;;;;;"{"robots":""}";0
5555;probni proizvod 555555;uv-3728;RD-555555;;0.0000;0.0000;;;;;;;;;;;;;;;;;;1;"[{"id":1,"title":"COM_PHOCACART_DEFAULT","published":1,"display_price":1,"display_addtocart":1,"display_attributes":1}]";0;;;;;;0;;;;;;;;;;;;55;0;0;0;0;0;0;0000-00-00 00:00:00;0;0.0000;0.0000;0.0000;0.0000;0.0000;0.0000;;0;0;;1;*;20.8.2023 3:30;0000-00-00 00:00:00;389;20.8.2023 15:37;389;16.4.2026 7:30;;;;;;"{"robots":""}";0
User avatar
Slava
Phoca Enthusiast
Phoca Enthusiast
Posts: 62
Joined: 07 Nov 2025, 18:39

Re: Import/Export

Post by Slava »

Net wrote: 06 May 2026, 10:54 Can you check what could be wrong? This is csv file i am importing:
Phoca Cart/Control panel/Options/Main/Import/Import Column -> switch to ID

If id 4444 and 5555 are present in the PC, data will be loaded from the file. Otherwise, leave the id field in the import file blank: the data will still be imported, and id will be created automatically.
User avatar
Slava
Phoca Enthusiast
Phoca Enthusiast
Posts: 62
Joined: 07 Nov 2025, 18:39

Re: Import/Export

Post by Slava »

Jan wrote: 04 May 2026, 13:24 Hi, Phoca Cart does not parse the CSV files, there are parsed by PHP methods. I am testing it in LibreOffice and everything is OK, try to see if MS Excel does not have any additional option for this :idea:

Jan
There is no direct way to disable the escaping of double quotes when saving to CSV in Excel — this is standard behavior that complies with the CSV specification (RFC 4180).

It is likely that a file import validation can be added on the Phoca Cart side: to search for the """ sequence and replace it with ". This solution will improve the user experience.
Net
Phoca Member
Phoca Member
Posts: 41
Joined: 29 Sep 2022, 00:28

Re: Import/Export

Post by Net »

Slava wrote: 06 May 2026, 13:17
Net wrote: 06 May 2026, 10:54 Can you check what could be wrong? This is csv file i am importing:
Phoca Cart/Control panel/Options/Main/Import/Import Column -> switch to ID

If id 4444 and 5555 are present in the PC, data will be loaded from the file. Otherwise, leave the id field in the import file blank: the data will still be imported, and id will be created automatically.
Hi, thank you for the response.
Import column seems to be already set by default, this is how it looks by default on my installation: Image

I am not sure what else could be root cause of not importing properly, this is rly confusing. Phoca cart documentation is very minimal regarding importing products.
User avatar
Slava
Phoca Enthusiast
Phoca Enthusiast
Posts: 62
Joined: 07 Nov 2025, 18:39

Re: Import/Export

Post by Slava »

Slava wrote: 06 May 2026, 13:23 I am not sure what else could be root cause of not importing properly, this is rly confusing. Phoca cart documentation is very minimal regarding importing products.
Keep the id field empty in the import file. Once the file is uploaded, use the assigned id instead of your chosen arbitrary values like 4444 and 5555.

OR: Create two products manually in Phoca Cart: fill in prices, descriptions, specifications, upload images, etc. Then export the data — use the resulting file as a template for catalog scaling.
Last edited by Slava on 06 May 2026, 15:04, edited 3 times in total.
User avatar
Slava
Phoca Enthusiast
Phoca Enthusiast
Posts: 62
Joined: 07 Nov 2025, 18:39

Re: Import/Export

Post by Slava »

Jan.
In the current import process, the Phoca Cart displays the overall progress but does not indicate which ID is being processed at the moment.
If there are no errors in the file, this does not cause any issues. However, if an error is detected in one or more items (for example, if the price field contains non‑numeric data), the import stops at the problematic ID, while all previous items are loaded successfully.
Problem: it is difficult to determine which specific ID contains the error. To locate it, the user has to:
either manually analyze the entire import file;
or sequentially split the import file into parts (in half, then each half in half again, and so on) until narrowing down the search to 1–3 ID.
For large catalogs (4000+ items), this process is extremely time‑consuming and labor‑intensive.
Proposal: display the ID of the last successfully processed item during the import process. This way, the user will immediately see after which ID the import stopped — the next item will be the one containing the error.
Last edited by Slava on 06 May 2026, 15:04, edited 1 time in total.
Post Reply