1. piekielko
  2. RO CSVI
  3. Monday, 29 September 2025
  4.  Subscribe via email
After updating CSVI to version 9, I noticed that price values in the exported data now include thousands separators (e.g. 1,000 instead of 1000).
In the template edition, I have an empty field for these separators, so if it appears, it is a bug.

Not all countries use a separator, and in my case it is unnecessary and even causes issues when parsing prices.

Because of this change I was forced to modify my own code that displays these prices.

In my export template to the merchant center, I had to make a correction:

case 'basepricewithtax':
// removing separators
$cleanContent = str_replace([",", "\xC2\xA0", " "], ['', '', ''], (string)$content);
list($priceRaw, $saleRaw) = array_pad(explode('|', $cleanContent), 2, null);

$norm = function($v) {
$v = trim((string)$v);
$v = preg_replace('/[^\d.\-]/', '', $v);
return (float)$v;
};

$price = $norm($priceRaw);
$sale = $saleRaw !== null ? $norm($saleRaw) : 0.0;
$currency = 'PLN';
$fmt = fn($n,$cur) => number_format((float)$n,2,'.','') . ' ' . $cur;

$xml = "<g:price>{$fmt($price,$currency)}</g:price>\n";
if ($sale > 0 && $sale < $price) {
$xml .= "<g:sale_price>{$fmt($sale,$currency)}</g:sale_price>\n";
$start = gmdate('c', strtotime('today 00:00 UTC'));
$end = gmdate('c', strtotime('+4 days 23:59:59 UTC'));
$xml .= "<g:sale_price_effective_date>{$start}/{$end}</g:sale_price_effective_date>\n";
}
return $xml;
Accepted Answer
Accepted Answer Pending Moderation
Hi,

Yes I understood the issue and have seen that it happens and I know why it happens. So in the bugfix release tomorrow this will be rectified.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Sorry, the discussion is currently locked. You will not be able to post a reply or a comment at the moment.