About 50% of our articles get this 'priceValidUntil' message in Google Search Console.
How to solve this ?
eCom Labs LLC checked our website and wrote that the 'priceValidUntil' is written in the articles, they even showed the pictures with the result.
How can we solve the other 50% ?
That is a warning not an error. It won't affect the display of your products.
We know, but it should be nice when everything is green in the Google Search Console.
That is a warning not an error. It won't affect the display of your products.
There is no value in CS-Cart that controls when price is valid until a certain date.
However, to get rid of the warning, you can hard code a date.
Edit app/addons/seo/func.php
Line 3412 change to:
if ($show_price) {
$offer = [
‘@type’ => ‘Offer - Schema.org Type’,
‘availability’ => fn_seo_get_schema_org_product_availability($product_data),
‘url’ => fn_url(‘products.view?product_id=’ . $product_data[‘product_id’]),
‘price’ => 0,
‘priceCurrency’ => $currency,
‘priceValidUntil’ => ‘2035-01-01’,
];
I used an arbitrary date that is 10 years out.
Line 3792 changes to:
$seo_snippet[‘show_price’] = $show_price;
if ($offer) {
if (isset($offer[‘availability’])) {
$seo_snippet[‘availability’] = $offer[‘availability’];
}
if (isset($offer[‘priceCurrency’])) {
$seo_snippet[‘price_currency’] = $offer[‘priceCurrency’];
}
if (isset($offer[‘price’])) {
$seo_snippet[‘price’] = $offer[‘price’];
}
if (isset($offer[‘priceValidUntil’])) {
$seo_snippet[‘priceValidUntil’] = $offer[‘priceValidUntil’];
}
This makes Google happy and you don’t have to update the date for 10 years.
1 Like