Originally posted by Matt Zimmermann
View Post
Announcement
Collapse
No announcement yet.
ReadyTheme Rich Snippets Code Deprecated
Collapse
X
-
Hi Leslie,
You might try replacing the mvtj call with an MVT:EVAL and see if that outputs.
Leave a comment:
-
Originally posted by Matt Zimmermann View PostHi Leslie,
Do you have this in your code?
Code:<mvt:assign name="l.settings:product:stripped_descrip" value="miva_html_strip(l.settings:product:descrip, '')"/>
Code:<mvt:assign name="l.settings:product:stripped_descrip" value="miva_html_strip(l.settings:product:descrip, '')"/> { "@context": "http://schema.org", "@type": "Product", "name": "&mvtj:product:name;", "image": "&mvt:global:socialImage;", "description": "&mvtj:product:stripped_descrip;", <mvt:if expr="NOT ISNULL l.settings:product:sku"> "sku": "&mvtj:product:sku;", "mpn": "&mvtj:product:sku;", <mvt:else> "sku": "&mvtj:product:code;", "mpn": "&mvtj:product:code;", </mvt:if> "category": "&mvtj:category:name;", "brand": { "@type": "Thing", <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :brand"> "name": "&mvtj:product:customfield_values:customfields:bra nd;" <mvt:else> "name": "&mvtj:global:store:name;" </mvt:if> }, "offers": { "@type": "Offer", "url": "&mvtj:product:link;", <mvt:if expr="NOT ISNULL l.settings:product:sku"> "sku": "&mvtj:product:sku;", <mvt:else> "sku": "&mvtj:product:code;", </mvt:if> "name": "&mvtj:product:name;", "description": "&mvtj:product:stripped_descrip;", "seller": "&mvtj:global:store:name;", "itemCondition": "new", <mvt:if expr="l.settings:attributemachine:product:inv_leve l"> <mvt:assign name="l.availability_inv_level" value="l.settings:attributemachine:product:inv_lev el"/> <mvt:do name="l.formatted_variant_price" file="g.Module_Root $ g.Store:currncy_mod:module" value="CurrencyModule_AddFormatting( g.Store:currncy_mod, l.settings:attributemachine:product:price )" /> "price": "&mvtj:attributemachine:product:price;", <mvt:else> <mvt:assign name="l.availability_inv_level" value="l.settings:product:inv_level"/> "price": "&mvtj:product:price;", </mvt:if> <mvt:if expr="l.availability_inv_level EQ 'low'"> "availability": "http://schema.org/LimitedAvailability", <mvt:elseif expr="l.availability_inv_level EQ 'out'"> "availability": "http://schema.org/OutOfStock", <mvt:else> "availability": "http://schema.org/InStock", </mvt:if> "priceCurrency": "USD" } }
Leave a comment:
-
Hi Leslie,
Do you have this in your code?
Code:<mvt:assign name="l.settings:product:stripped_descrip" value="miva_html_strip(l.settings:product:descrip, '')"/>
Leave a comment:
-
Originally posted by Matt Zimmermann View PostHi Leslie,
This is the way I am doing it with Shadows v2:- Create a JavaScript Resource
- Code: product-json-ld
- Type: Inline Script
- Tag Attributes: type="application/ld+json"
- Global: Off
- Active: On
- Assign it to the PROD page
- Assign it to the footer_js Resource Group
- Edit the source and paste in the code from here: https://gist.github.com/influxweb/ff...f96eeb8039ab5b
Leave a comment:
- Create a JavaScript Resource
-
Originally posted by Matt Zimmermann View PostHi Leslie,
This is the way I am doing it with Shadows v2:- Create a JavaScript Resource
- Code: product-json-ld
- Type: Inline Script
- Tag Attributes: type="application/ld+json"
- Global: Off
- Active: On
- Assign it to the PROD page
- Assign it to the footer_js Resource Group
- Edit the source and paste in the code from here: https://gist.github.com/influxweb/ff...f96eeb8039ab5b
Leave a comment:
- Create a JavaScript Resource
-
Hi Leslie,
This is the way I am doing it with Shadows v2:- Create a JavaScript Resource
- Code: product-json-ld
- Type: Inline Script
- Tag Attributes: type="application/ld+json"
- Global: Off
- Active: On
- Assign it to the PROD page
- Assign it to the footer_js Resource Group
- Edit the source and paste in the code from here: https://gist.github.com/influxweb/ff...f96eeb8039ab5b
Leave a comment:
- Create a JavaScript Resource
-
Originally posted by Bruce - PhosphorMedia View Postthe if should probably be l.settings:availability_inv_level and EQ means the must match exactly. make sure they actual terms are low and out and not Low and Out
Leave a comment:
-
the if should probably be l.settings:availability_inv_level and EQ means the must match exactly. make sure they actual terms are low and out and not Low and Out
Leave a comment:
-
Why would the following snippet only render the same value in PROD source: "availability": "http://schema.org/InStock",?
Code:<mvt:if expr="l.availability_inv_level EQ 'low'"> "availability": "http://schema.org/LimitedAvailability", <mvt:elseif expr="l.availability_inv_level EQ 'out'"> "availability": "http://schema.org/SoldOut", <mvt:else> "availability": "http://schema.org/InStock", </mvt:if>
Code:&mvte:product:code; &mvtj:product:code;
Last edited by William Davis; 04-30-20, 01:00 PM.
Leave a comment:
-
Hi Leslie,
Yes, create the resource group and add the item, <mvt:item name="head" param="footer_js" />, to the bottom of the PROD page. Alternately, you can add that to the global footer for future expansion.
Leave a comment:
-
I see... I will wait until the wee hours since this store gets quite a bit of North America traffic until 2-3AM.
That was not obvious to me but I dn't know much about what all this means so maybe you will adjust your Steps :-)
Leave a comment:
-
Go back to JavaScript Resources, click product-json-ld, and you will be able to proceed.
Leave a comment:
Leave a comment: