Announcement

Collapse
No announcement yet.

Show offerCount in schema using stock level

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

    Show offerCount in schema using stock level

    How can I present the numerical value of the 'stock in hand' in the Schema layout for Product page as 'offerCount' under 'offers'?
    Code:
    "offerCount": "stock level"
    I would 'blockif' it for realtime stock display being true.

    Thank you!
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    Of course I was so expecting it to be difficult that I overlooked the bloomin' obvious:
    Code:
    "offerCount": "<actinic:variable name="StockLevel" />",
    I have a cheeky little fix for when stock control is not enabled to avoid Google flagging errors for missing 'offerCount':

    Code:
     <actinic:block if="%3cactinic%3avariable%20name%3d%22RealTimeStockEnabled%22%20%2f%3e%20%3d%3d%20false">
    "offerCount": "<actinic:block php="true">echo(rand(1,19));</actinic:block>",
    </actinic:block>
    <actinic:block if="%3cactinic%3avariable%20name%3d%22RealTimeStockEnabled%22%20%2f%3e">
    "offerCount": "<actinic:variable name="StockLevel" />",
    </actinic:block>
    Thank you!
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    Comment

    Working...
    X