Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...
I keep getting these messages from Google merchant centre, Account issues. "Insufficient match of microdata price information & 28% of crawls within the last 7 days had a price mismatch" but no items are disapproved for this reason so I do not know which products to fix.
My prices are rounded to the nearest 5 cents. After much research I found that when I use SaleMaker to discount my prices the correct rounded price is shown on my web page but the the structured data markup shows the unrounded price.
Any ideas? I suppose I could drop the rounding but in my country technically prices not rounded to 5 cents are not allowed although this rule seems to be widely ignored.
Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...
Can you put a link to a page that has this error, and a screenshot of the developer tools open that highlights the bit that is wrong.
Then anyone can have a go and push it to Github...
2 Attachment(s)
Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...
Thanks for your fast reply. Answers below if you need more just ask.
Link
https://www.simmar.ch/catalog/index....id=3089&sort=6
Below are screenshots of how I do rounding in catalog\includes\functions/functions_general and the problem in the structured data
Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...
The inherent problem with getting the price is that the price displayed/generated on the info page is embedded in text, so you can't use that in-built function to just get the number.
Hence in jscript_plugin_structured_data, the price is manually calculated:
PHP Code:
//get the price with tax
$product_display_price_value = round(zen_get_products_actual_price($product_id) * (1 + zen_get_tax_rate($tax_class_id) / 100), 2);//show price with tax, decimal point (not comma), two decimal places
So you need to fiddle with that to get the rounding you need.
Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...
Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...
Thanks for the tip, I added
Code:
//round price to 0.05 MH
$product_display_price_value = round($product_display_price_value/5, 2)*5;
in jscript_plugin_structured_data, after the following - ca. line 72:
Code:
PHP Code:
//get the price with tax
$product_display_price_value = round(zen_get_products_actual_price($product_id) * (1 + zen_get_tax_rate($tax_class_id) / 100), 2);//show price with tax, decimal point (not comma), two decimal places
Everything OK now
Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...
I assume this is the best thread for questions on the super data Markup plug in?
I am updating from V155f with the responsive green classic template and PHP 5x and plugin structured data markup
to V157 with responsive green classic template and PHP 7x.
I downloaded the newest Super Data Markup plugin, ran the uninstall SQL for the old plugin, and the install SQL for the new.
I got a whole string of "ERROR_LINE_INCOMPLETE" messages.
I do not know what they mean?
I cannot find the constant "ERROR_LINE_INCOMPLETE" on my web site
The Super Data configuration page on my new web site V157 is set up OK and I can enter my data.
My other problem is I do not find the following code in my html_header.php
Code:
<!DOCTYPE html PUBLIC "-//W3C//.......
There is
Code:
<!DOCTYPE html >
<html <?php echo HTML_PARAMS; ?>>
so I added the new code after <html...
I do not find any code like
Code:
// DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' ......
Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...
I'm not sure what you are using, but if you didn't get it from my Github, it's out of date:
https://github.com/torvista/zen-cart_Structured-Data
Note to current users: this was recently updated to include markup for attributes and offer support for GTIN/MPN.
Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...
Thanks for the quick reply, most helpful.
Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...
Quote:
Originally Posted by
torvista
Just to confirm it is working fine with V157.