Totally Zenned
- Join Date:
- Sep 2008
- Location:
- Cleethorpes
- Posts:
- 1,230
- Plugin Contributions:
- 3
Views: 91,626
Totally Zenned
Totally Zenned
I'm getting a duplicate Key error for @type
Bug for product priced by attribute. Fixed.
Totally Zenned
torvista:
Bug for product priced by attribute. Fixed.
Cool! All my products are in without any other errors now by the way.
Totally Zenned
torvista:
Bug for product priced by attribute. Fixed.
Ok can you tell me why this category number isn't recognised by Schema?
708 - Home & Garden > Decor > Decorative Plaques. I note in the Google Product Category entry box you have stated 6 numbers, however this one only has three?
https://www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt
Totally Zenned
Nick1973:
Ok can you tell me why this category number isn't recognised by Schema?
708 - Home & Garden > Decor > Decorative Plaques. I note in the Google Product Category entry box you have stated 6 numbers, however this one only has three?
https://www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt
Actually it says this when I check my product, sorry I don't think it's the Google Product Category Number:
708 (The property googleProductCategory is not recognised by the schema (e.g. schema.org) for an object of type Product.)
Totally Zenned
As far as I can ascertain, the google product category is not part of structured data. It is part of the Google Merchant Center feed specification!
Structured data can be used by the Merchant Center instead of the direct feed, and while much of the two sources of data use the same data and identifiers, they are different animals.
So unless anyone can prove otherwise, google product category should be removed from this plugin.
Totally Zenned
torvista:
As far as I can ascertain, the google product category is not part of structured data. It is part of the Google Merchant Center feed specification!
Structured data can be used by the Merchant Center instead of the direct feed, and while much of the two sources of data use the same data and identifiers, they are different animals.So unless anyone can prove otherwise, google product category should be removed from this plugin.
Yes I know Merchant Center can use structured data. So far Google sees the google product category fine on my websites, so while I know technically it should be removed, it may actually be a benefit if google sees it as a positive and it helps google understand the merchants category products should be listed in.
Totally Zenned
Sorry I missed this
in ultimate friendly URLs (not sure how the CEON one works), the anchor and the product id are the only relevant data. changing the product name does not render an invalid URL. and it will still return the correct product page as long as those pieces of information are correct.
CEON produces full text urls like this:
www .shop.com/manufacturers/eazi-grip-racing-products/dash-protectors/aprilia/dash-protector-aprilia-rs125-tuono-125-2014
so an update to a name changes the url
www .shop.com/manufacturers/eazi-grip-racing-products/dash-protectors/aprilia/dash-protector-aprilia-rs125-tuono-125-2021
and the previous one gets stored and used to redirect to the new one.
Anyway a suitable question that generally burns lots of bandwidth would be "what url to use in this plugin?"
Friendly: www .shop.com/widget
or native: www .shop.com/index.php?main_page=product_info&cPath=1_4&products_id=1
or just add another config option and let people choose?
I'm not getting involved in any discussion, others can read everything out there and eventually come up with a short and sweet conclusion, lets not have endless SEO arguments as usual.
Totally Zenned
torvista:
Sorry I missed this
in ultimate friendly URLs (not sure how the CEON one works), the anchor and the product id are the only relevant data. changing the product name does not render an invalid URL. and it will still return the correct product page as long as those pieces of information are correct.
>
> CEON produces full text urls like this:
> www .shop.com/manufacturers/eazi-grip-racing-products/dash-protectors/aprilia/dash-protector-aprilia-rs125-tuono-125-2014
>
> so an update to a name changes the url
> www .shop.com/manufacturers/eazi-grip-racing-products/dash-protectors/aprilia/dash-protector-aprilia-rs125-tuono-125-2021
>
> and the previous one gets stored and used to redirect to the new one.
>
> Anyway a suitable question that generally burns lots of bandwidth would be "what url to use in this plugin?"
>
> Friendly: www .shop.com/widget
> or native: www .shop.com/index.php?main_page=product_info&cPath=1_4&products_id=1
>
> or just add another config option and let people choose?
>
> I'm not getting involved in any discussion, others can read everything out there and eventually come up with a short and sweet conclusion, lets not have endless SEO arguments as usual.
I think letting people choose is a better option as there are some websites that don't use SEO Friendly URL's that would only benefit from original native URL's produced by Zen Cart out of the box! I'm with you on this, it doesn't require a massive SEO Discussion or Argument that turns into something unproductive. It just needs a solution and I think your suggestion seems to be a good option.
Totally Zenned
Hey,
Site is at https://www.royal-fleur.com
I have been using your plugins for awhile and it has been working fine.
However, i tried to update the version i had with the latest from Github and i am getting the following error:
[28-Nov-2021 16:53:44 America/Los_Angeles] PHP Parse error: syntax error, unexpected '?' in /home/zch1akhw6q3m/public_html/includes/templates/Royal_Fleur/jscript/jscript_plugin_structured_data.php on line 370
If i revert to the old js_script, it works fine but i am missing some of the newer snippet/strutured data like aggregaterating
Any help with this would be appreciated.
Thank you
zennedOut
line 370 is here:
$breadcrumb_this_page = $breadcrumb->_trail[count($breadcrumb->_trail) - 1]['title'] ?? '';
my guess is the you are running a version of php less than 7.0 which makes use of the coalesce (??) operator.
if so, you probably should upgrade your php version and perhaps your version of ZC as php versions less than 7.0 have been end of life for quite some time.
alternatively, you could try changing the code to:
$breadcrumb_this_page = '';
if (isset($breadcrumb->_trail[count($breadcrumb->_trail) - 1]['title']) {
$breadcrumb_this_page = $breadcrumb->_trail[count($breadcrumb->_trail) - 1]['title'];
}
if line 370 is something different, feel free to ignore everything i said!
best.
Totally Zenned
My bad, I do forget to set my IDE back to 5.6. Fix pushed.
Totally Zenned
carlwhat:
line 370 is here:
$breadcrumb_this_page = $breadcrumb->_trail[count($breadcrumb->_trail) - 1]['title'] ?? '';
>
> <https://github.com/torvista/Zen_Cart-Structured_Data/blob/ac297f44d7c4b2e7e60fd7a2f4f27ed4cd5f22e3/files/includes/templates/YOUR_TEMPLATE/jscript/jscript_plugin_structured_data.php#L370>
>
> my guess is the you are running a version of php less than 7.0 which makes use of the coalesce (??) operator.
>
> if so, you probably should upgrade your php version and perhaps your version of ZC as php versions less than 7.0 have been end of life for quite some time.
>
> alternatively, you could try changing the code to:
>
> ```php
$breadcrumb_this_page = '';
if (isset($breadcrumb->_trail[count($breadcrumb->_trail) - 1]['title']) {
$breadcrumb_this_page = $breadcrumb->_trail[count($breadcrumb->_trail) - 1]['title'];
}
if line 370 is something different, feel free to ignore everything i said!
best.
Thank you.
Totally Zenned
I spoke too fast. I am getting another error:
--> PHP Parse error: syntax error, unexpected '{' in /home/zch1akhw6q3m/public_html/includes/templates/Royal_Fleur/jscript/jscript_plugin_structured_data.php on line 371.
Sorry for the noob question. I don't know anything about coding. And you are correct. I am on a PHP 5.6 with ZC 1.5.6 version
. My whole site is due for an update but i haven't managed to get on it yet.
Totally Zenned
First check you are using the current file from GitHub.
If the error persists, please paste what is on the referenced line of the file.
Totally Zenned
torvista:
First check you are using the current file from GitHub.
If the error persists, please paste what is on the referenced line of the file.
I got the updated version from github and it fixed my previous issue.
I am having another problem. ( see screenshot)
All my product have a 3 star rating on google but i don t have any product review.
Where is it taking the review rating from?
Also the date showing for the review is the date the product was first added to the store.
Any ideas regarding the 3 star on all my products??
the store is at royal-fleur.com
Any help will appreciated thank you
Totally Zenned
Reviews: that's to prevent a load of Google Rich Tool warnings about no reviews. I've updated the Github readme on this.
Totally Zenned
Hi Steve - I am using your latest version of Structured Data downloaded from GitHub recently on a V1.5.7b site and all is good with just this one query - in all cases Google is flagging a 'warning' for products in testing the markup via Google Rich Results ... 'Invalid object type for field "brand" .... this is auto filled correctly and when testing using https://validator.schema.org/ there are no warnings.
So just wondering if there was a fix for this or is it simply Google being google?
cheers, Mike
Totally Zenned
shags38:
Hi Steve - I am using your latest version of Structured Data downloaded from GitHub recently on a V1.5.7b site and all is good with just this one query - in all cases Google is flagging a 'warning' for products in testing the markup via Google Rich Results ... 'Invalid object type for field "brand" .... this is auto filled correctly and when testing using https://validator.schema.org/ there are no warnings.
So just wondering if there was a fix for this or is it simply Google being google?
cheers, Mike
Although I haven't kept up with the latest updates for this plugin, I think (my notes aren't great) that I had to add a 'Brand' object type. In jscript_plugin_structured_data.php I changed:
"brand": <?php echo json_encode($manufacturer_name); ?>,
to
"brand" : {
"@type" : "Brand",
"name" : <?php echo json_encode($manufacturer_name); ?>
},
With this I don't get a Brand warning in https://search.google.com/test/rich-results
Totally Zenned
Just tested one of my products. No errors.
This is the relevant html generated. Using same code as GitHub.
"googleProductCategory": "2788",
"brand": {
"@type" : "Brand",
"name" : "Scottoiler"
},
"category" : "Spare Parts",
Tell staff why this post should be reviewed.