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
rice>{$fmt($price,$currency)}</g
rice>\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;