Price is not correctly displayed in tiktok
-
I have my currency in CLP, so for example something worth one thousand is shown like this: $1.000
Because we separate thousands with point and decimals with commas.
But when Tiktok receives the the data, it believes it costs $1 because removes the decimals.
How can i change this so i can show the price without (.) separator or change the tiktok settings maybe…
Thanks!
-
I have selected Tiktok price in the field mapping, but still shows the price with point as thousand and coma as decimal.
Hi @avagp,
Please try using the regular Price mapping field. TikTok enforces the ISO 4217 Rule so thousands uses the comma as a separator and decimal point for the cents.
See: https://ibb.co/n8jPjLvq & https://ads.tiktok.com/help/article/catalog-product-parameters
But the feed plugin follows my price format, comma as decimal and point as thousands.
So, when i set PRICE in the mapping field, i get $17.999 CLP which is correct, but then Tiktok takes it and set it as $18 CLP which is completely wrong. a thousand times wrong…
So, setting PRICE in the mapping doesn’t work :/
Hi @avagp
That’s because TikTok strictly follows the ISO 4217 format. This means the pricing is as follows:
Thousand separator = Comma or ,
Decimal Points = Dot or .Also, TikTok might round off the pricing. I suggest reaching out to the TikTok support team regarding this as the Feed seems to be generating the correct Price.
You could try creating a new feed with the TikTok template
But the my main question is: How can i map the price on my site to be $17,999 CLP ? Taking in consideration that my site’s price format is different.
Is there a way to force the thousand separator to be a comma using this plugin?
-
This reply was modified 1 month, 4 weeks ago by
Radical Dreamer.
Hi @avagp ,
It’s generally not recommened to change the format but if it’s what you require then you should be able to achieve that with a snippet:
function custom_price_format_separators($product_data, $feed, $product) {
// Define the price fields to modify
$price_fields = array(
'price',
'regular_price',
'sale_price',
'price_forced',
'regular_price_forced',
'sale_price_forced',
'net_price',
'net_regular_price',
'net_sale_price',
'system_price',
'system_regular_price',
'system_sale_price',
'system_price_forced',
'system_regular_price_forced',
'system_sale_price_forced',
'system_net_price',
'system_net_regular_price',
'system_net_sale_price',
'separator_price',
'separator_regular_price',
'separator_sale_price'
);
// Define your custom separators
$custom_thousand_separator = '.'; // Change this to your desired thousand separator
$custom_decimal_separator = ','; // Change this to your desired decimal separator
// Process each price field
foreach ($price_fields as $field) {
if (isset($product_data[$field]) && is_numeric($product_data[$field])) {
// Convert to float first to ensure proper formatting
$price_value = floatval($product_data[$field]);
// Format the price with custom separators
$product_data[$field] = number_format(
$price_value,
2, // Number of decimal places
$custom_decimal_separator,
$custom_thousand_separator
);
}
}
return $product_data;
}
// Hook into the adt_get_product_data action
add_filter('adt_get_product_data', 'custom_price_format_separators', 10, 3);Add that to your functions.php or through the WP Code plugin. You might want to change the currency settings here. Note that this will apply to all your feed – so It may cause more issues on other feeds. Please also note that I’m unable to provide further support from here if you use the snippet
Thank it worked!
I changed the array to have only ‘vivino_price’ so i can work with the other mapping fields.
Thank you a lot!
I personally believe that vivino_price should have this price format forced. Because tiktok doesn’t allow other price formats, and there are countries that use this plugin that has different price format.
I hope you can add this as a feature.
-
This reply was modified 1 month, 4 weeks ago by
You must be logged in to reply to this topic.