Forums / Addon Admin Tools / Structured Data Markup for Schema, Facebook Open Graph, Twitter...

Structured Data Markup for Schema, Facebook Open Graph, Twitter...

Views: 91,941

Results 181 to 200 of 212
8 Nov 2022, 11:31 AM
#181
vasilt avatar

vasilt

New Zenner

Join Date:
Jan 2006
Posts:
44
Plugin Contributions:
0

Structured Data Markup for Schema, Facebook Open Graph, Twitter...

Thanks,
Works as expected.

14 Dec 2022, 6:40 PM
#182
racingaddiction avatar

racingaddiction

New Zenner

Join Date:
Apr 2019
Location:
Newport Beach, CA
Posts:
80
Plugin Contributions:
0

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

I posted this in one of the forums, since we're using the Structured Data plugin I'm hoping to hear other's people's experiences; we're running on 1.5.6 and are upgrading to 1.5.7.

Our site is trackreadyproducts.com We've integrated with Facebook by creating a product catalog on their site and have added this superb plugin to pump product metadata to FB. We're now running ads on FB and Instagram. This is not a complaint about the plugin, it's working, my questions relate to the Facebook side of things.

As you know there are three ways to add your products to a catalog in Facebook, 1) type them in manually, b) import a CSV or 3) implement their pixel in the ZC product page. We've done #3 and according to FB, the pixel fires any time anyone clicks on a item, adds it to the cart, etc. and it's this action that uploads a product to the FB catalog. Reading the FB documentation, the FB pixel is supposed to synchronize a) new items from our website to the catalog, b) any product changes (e.g. description, price, etc) from our website and c) discontinued products.

Here's the issue - this works...sometimes, but not all the time. My question is for anyone who is doing the same, creating a product catalog on FB that's linked to a Zen Cart site. We have approx 1000 products but many are seat bases (649) and steering wheel adapters (111) so that leaves around 240 products that people are likely to click on. Oddly only about 67 have uploaded to FB over the past few weeks even though the other items are in stock. (Yes we have clicked on a variety of items and have even added them to the shopping cart.) Once in a great while a product that no one has clicked on will mysteriously upload itself to the FB catalog.

It's maddening; anyone else run into this?

3 May 2023, 4:32 AM
#183
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

Hi Steve - so does it matter if I inadvertently ran the install.sql AFTER uploading the admin and includes files?? ... it is just that I cannot get the plugin to work on one site only, it is a V1.5.5F site - the site had Super Data loaded but I ran the uninstall and removed all files.

On all my other sites it performs beautifully.

cheers, Mike

3 May 2023, 8:39 AM
#184
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

No, there is no extra sql stuff in the files. If there is something missing in the database you should be getting debug logs.

Always use the Github version and watch it for changes.

Define "not working".

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

23 May 2023, 2:31 AM
#185
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

I need some help fixing a couple of things and/or guidance with this plugin.

It is a great mod and helping a lot with the micro data and no zen cart should be without.

I am going over my site "seo" and i am getting some errors using semrush:

__comment The property __comment is not recognized by Schema.org vocabulary.

However, using google rich result test, it is not being seen as an error and it is populatedas follow

"__comment" : "attribute stock handling

Hence my question, Is this an actual error or just the "seo " thing being picky?

Back to the rich result test, it shows the following:

Missing field "shippingDetails" (optional)
Missing field "hasMerchantReturnPolicy" (optional)

Can these be added somehow? and how?

Thank you in advance for the help

23 May 2023, 6:10 AM
#186
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

__comment was the only way I could find to include a comment in the output. You can remove it.

As to the other optional things, as always yes they can be added.
Open an issue for each one on Github detailing exactly what data is supposed to go in there with examples or links to examples.
If you can't code it yourself, at least make it as easy as possible for others to do so, and it may get done.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

24 May 2023, 2:15 AM
#187
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

torvista:

__comment was the only way I could find to include a comment in the output. You can remove it.

As to the other optional things, as always yes they can be added.
Open an issue for each one on Github detailing exactly what data is supposed to go in there with examples or links to examples.
If you can't code it yourself, at least make it as easy as possible for others to do so, and it may get done.

Thank you Tor.

I haven't been on Github in awhile but will post there for the 2 fields.

As for the__comments field, which info is it supposed to populate? It shows with a relation to attribute stock, so I am a bit confused about it.

24 May 2023, 7:55 AM
#188
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

__comments is just that a comment that shows up in the html, it doesn't do anything.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

24 Aug 2023, 2:18 PM
#189
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

ZC v1.5.8a
Using an older version of Structured Data Markup

I'm not sure if there's a tidy way of doing this but..

I have nested define pages, i.e.

Home
----Define Page 1
--------Define Page 2
--------Define Page 3
--------Define Page 4

I have created the appropriate breadcrumb trail by manually editing the page's header_php.php, the issue is that the structured data is now incomplete. This is the code for the Define Page 2 page, the missing elements are in red:

<script title="Structured Data: schemaBreadcrumb" type="application/ld+json">
{
       "@context": "https://schema.org",
          "@type": "BreadcrumbList",
"itemListElement":
  [
    {
        "@type": "ListItem",
     "position": "1",
         "item":
       {
        "@id": "https://mydomain.com/",
       "name": "Home"
       }
    },
  {
        "@type": "ListItem",
     "position": "2",
         "item":
       {
        "@id": "https://mydomain.com/define_page_1",
       "name": "Define Page 1"
       }
    },
  {
        "@type": "ListItem",
     "position": "3",
         "item":
       {
        "@id": "https://mydomain.com/define_page_1/define_page_2",
       "name": "Define Page 2"
       }
    }
  ]
}
</script>

Normally, nested pages are created using breadcrumb.php and the trail is grabbed by plugin_structured_data.php - so I can understand why my manual changes to the breadcrumb are not being picked up.

I think I can manually add some sort of PHP conditional 'if - this is - define_page_1 - then - make - @id - some value' to plugin_structured_data.php, but wonder if there's another way perhaps by changing the header_php.php breadcrumb code for define_page_2, which is currently:

$breadcrumb->add(TITLE_DEFINE_PAGE_1, 'define_page_1');
$breadcrumb->add(NAVBAR_TITLE);

Simon

24 Aug 2023, 2:23 PM
#190
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

Didn't think of it until I had typed that out, of course the simple answer is to add mydomain.com to the header_php.php code

$breadcrumb->add(TITLE_DEFINE_PAGE_1, '[B]https://mydomain.com/[/B]define_page_1');
$breadcrumb->add(NAVBAR_TITLE);

Just have to find a way to use 'HTTP_SERVER . DIR_WS_CATALOG' instead.

Simon

27 Nov 2023, 9:22 PM
#191
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

LOG FILE showing the following:

PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/MYDOMAIN/public_html/includes/modules/pages/product_info/jscript_structured_data_product.php on line 38.

$reviewCount = sizeof($reviewArray);
if ($reviewCount != 0) {
  $ratingValue = array_sum($ratingSum) / $reviewCount;
} else {
  $ratingValue = 0;
}

Is there a fix?

20 years a Zencart User

27 Nov 2023, 9:42 PM
#192
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

OK - this seems to be a legacy issue with a piece of script I got elsewhere.

I suspended the relevant file (jscript_structured_data_product.php) and the log error is not happening now. Site seems to be functioning OK.

20 years a Zencart User

27 Nov 2023, 9:42 PM
#193
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

Firstly, use the only-version_that-gets_updated from GitHib:

https://github.com/torvista/Zen_Cart-Structured_Data

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

12 Jan 2025, 3:17 AM
#194
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

I am getting errors while running Google Schema validator.

"The property googleProductCategory is not recognized by the schema (e.g. schema.org) for an object of type Product.)"

Product Category is defined in the jsscript.

How can this be fixed please?

thank you

PS: open the issue in github too as i wasn't sure how to get support for this.

13 Jan 2025, 11:22 AM
#195
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,305
Plugin Contributions:
39

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

nicksab:

I am getting errors while running Google Schema validator.

"The property googleProductCategory is not recognized by the schema (e.g. schema.org) for an object of type Product.)"

Product Category is defined in the jsscript.

How can this be fixed please?

thank you

PS: open the issue in github too as i wasn't sure how to get support for this.

No fix is required. googleProductCategory which Google wants is not part of schema... that's all =)

https://support.google.com/merchants/answer/6324436?hl=en

When to use
Optional Optional for each product

Google will only accept a product category override in the following cases:

1. Calculation of US taxes. For products sold in the US, you can override Google’s automatic categorization to ensure that the correct US tax rate is applied to your product.
2. Enforcement of category-specific attribute requirements. Some product categories (such as Apparel & Accessories, Mobile Phones, or Software) impose additional required fields. If Google incorrectly assigns your product to one of these categories, use this attribute to override the categorization and remove the category-specific requirements.
3. Targeting of Google Ads campaigns. If you’ve defined any of your ad campaigns based upon Google’s product categories, you can use this attribute to reassign products within your campaign structure.
4. Alcohol. Alcoholic beverages must be correctly categorized. If the category of your product is incorrectly assigned, you can use the Google product category [google_product_category] attribute to override it and ensure that your product remains compliant. Learn more about our Alcoholic beverages policy.
13 Jan 2025, 9:49 PM
#196
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

mprough:

No fix is required. googleProductCategory which Google wants is not part of schema... that's all =)

https://support.google.com/merchants/answer/6324436?hl=en

When to use
Optional Optional for each product

Google will only accept a product category override in the following cases:

  1. Calculation of US taxes. For products sold in the US, you can override Google’s automatic categorization to ensure that the correct US tax rate is applied to your product.
  2. Enforcement of category-specific attribute requirements. Some product categories (such as Apparel & Accessories, Mobile Phones, or Software) impose additional required fields. If Google incorrectly assigns your product to one of these categories, use this attribute to override the categorization and remove the category-specific requirements.
  3. Targeting of Google Ads campaigns. If you’ve defined any of your ad campaigns based upon Google’s product categories, you can use this attribute to reassign products within your campaign structure.
  4. Alcohol. Alcoholic beverages must be correctly categorized. If the category of your product is incorrectly assigned, you can use the Google product category [google_product_category] attribute to override it and ensure that your product remains compliant. Learn more about our Alcoholic beverages policy.

Thank you for the explanation. It makes sense. It just gets me every time these online testing tools start displaying errors without much assistance. 

Anyway, how can i add an extra "optional field"  if possible? It is to solve : " Missing field "shippingDetails" (in "offers")"

Thank you
14 Jan 2025, 11:42 AM
#197
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,305
Plugin Contributions:
39

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

nicksab:

Thank you for the explanation. It makes sense. It just gets me every time these online testing tools start displaying errors without much assistance.

Anyway, how can i add an extra "optional field" if possible? It is to solve : " Missing field "shippingDetails" (in "offers")"

Thank you

Set up your shipping inside of Google Shopping =)

19 Feb 2026, 11:35 AM
#198
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,305
Plugin Contributions:
39

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

Alternate page with proper canonical tag error is because the cPath is not included in the generated data making the urls not match. Google feeder for example has a switch in the admin to include or no the cPath.

I fixed this on my 2.1.0 website by editing

includes/init_includes/init_canonical.php

Line 14-15

// cPath is excluded by default
$includeCPath = FALSE;

& changed it to

// cPath is excluded by default
$includeCPath = TRUE;

Now my canonicals match

index.php?main_page=product_info&cPath=19&products_id=206
index.php?main_page=product_info&cPath=19&products_id=206

26 Feb 2026, 6:51 PM
#199
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

Hi Torvista,

Thanks for a great plugin that is super easy to use and provides a needed tool!

I have installed it in my v.2.1 Zen Cart and am using PHP 8.3. I get the following Debug Log warning....

PHP Warning: Trying to access array offset on null in zc_plugins/StructuredData/v2.1.0/catalog/includes/templates/default/jscript/structured_data_jscript.php on line 201.

Do you happen to know how to fix this? Does this line need an (isset.... ) in there to mitigate these warning errors??

Thanks for your help,

Jeff

26 Feb 2026, 7:36 PM
#200
flappingfish avatar

flappingfish

Zen Follower

Join Date:
Nov 2020
Posts:
319
Plugin Contributions:
4

Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

NWCE:

Hi Torvista,

Thanks for a great plugin that is super easy to use and provides a needed tool!

I have installed it in my v.2.1 Zen Cart and am using PHP 8.3. I get the following Debug Log warning....

PHP Warning: Trying to access array offset on null in zc_plugins/StructuredData/v2.1.0/catalog/includes/templates/default/jscript/structured_data_jscript.php on line 201.

Do you happen to know how to fix this? Does this line need an (isset.... ) in there to mitigate these warning errors??

Thanks for your help,

Jeff

is currency being returned as null??

$decimal_places = $currencies->currencies[PLUGIN_SDATA_PRICE_CURRENCY]['decimal_places'];

assuming your on the github version. check that you have the same 3 letter code used for default currency under localization > currencies and ensure that under configuration > structured data for Currency (Schema/OG) you have the same 3 letters