Support is offline. We are back Monday 23 November, 09:00.

Missing CSV fields are overwritten with default values during J2Commerce product updates #86549

Open piekielko opened this topic Thursday, 06 August 2026 · 2 replies
Author

PS. I'm logged in here, but I can't write anything... I can't log in here using the Edge browser. I keep getting an “invalid token” message. I was able to log in using Firefox.

RO CSVI 9.11.0 incorrectly overwrites existing J2Commerce product data when performing a partial CSV update based on SKU.

My CSV contained only:
sku, price, taxprofile_id, manage_stock

However, the importer changed fields that were not included in the CSV:
the existing stock quantity was deleted and replaced with 0;
visibility was set to 0, hiding all imported products;
other missing product fields were also updated with default values.

When quantity and visibility are explicitly included in the CSV, their values are imported correctly. The problem occurs only when these fields are missing or empty.
Using default values when updating existing products makes partial imports unsafe and can unintentionally destroy stock data and hide the entire catalogue.

Author

Deprecated: number_format(): Passing null to parameter #1 ($num) of type float is deprecated in /plugins/csviaddon/j2commerce/com_j2commerce/model/export/product.php on line 1136

This code

$fieldValue,

Change to

(float) ($fieldValue ?? 0),
Support

Hello Chris,

However, the importer changed fields that were not included in the CSV:
the existing stock quantity was deleted and replaced with 0;
visibility was set to 0, hiding all imported products;
other missing product fields were also updated with default values.

I see quantity updated to default value but visibility will update only when it is a new product. Please post import debug log to check. This will also help me to understand other fields as well. To get the debug log read How to collect debug information? document.

Deprecated: number_format(): Passing null to parameter #1 ($num) of type float is deprecated in /plugins/csviaddon/j2commerce/com_j2commerce/model/export/product.php on line 1136

Will look into this. Thank you for reporting.

Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Log in to reply to this topic.