Announcement

Collapse
No announcement yet.

ReadyTheme Rich Snippets Code Deprecated

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • lesliekirk
    replied
    Originally posted by Matt Zimmermann View Post
    Hi Leslie,

    You might try replacing the mvtj call with an MVT:EVAL and see if that outputs.
    Example pretty please?

    Leave a comment:


  • Matt Zimmermann
    replied
    Hi Leslie,

    You might try replacing the mvtj call with an MVT:EVAL and see if that outputs.

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by Matt Zimmermann View Post
    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, '')"/>
    Yes. This is what I had copied from https://gist.github.com/influxweb/ff...f96eeb8039ab5b


    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:


  • Matt Zimmermann
    replied
    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:


  • lesliekirk
    replied
    Originally posted by Matt Zimmermann View Post
    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
    I've got an issue with the "description": "&mvtj:product:stripped_descrip;", being blank for every product. Every product has content in the Product Description field.

    Leave a comment:


  • Matt Zimmermann
    replied
    Hi Leslie,

    Yes, otherwise it just uses the product price.

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by Matt Zimmermann View Post
    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
    That's what I already have in place - does the code require that Inventory Variants be used? The site doesn't.

    Leave a comment:


  • Matt Zimmermann
    replied
    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:


  • lesliekirk
    replied
    Matt Zimmermann how to you include attribute prices?

    Leave a comment:


  • William Davis
    replied
    Originally posted by Bruce - PhosphorMedia View Post
    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
    Dont understand what you meant.

    Leave a comment:


  • Bruce - PhosphorMedia
    replied
    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:


  • William Davis
    replied
    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>
    Finally, both of these "tokens" render the same values, whats the difference between the two tokens?

    Code:
    &mvte:product:code;
     &mvtj:product:code;
    Last edited by William Davis; 04-30-20, 01:00 PM.

    Leave a comment:


  • Matt Zimmermann
    replied
    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:


  • joseibarra
    replied
    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:


  • Matt Zimmermann
    replied
    Go back to JavaScript Resources, click product-json-ld, and you will be able to proceed.

    Leave a comment:

Working...
X