As I was trying to title this post, I started thinking about why the correct price might not be displayed. If a product has multiple variants (all of which should be inactive and not listed) how would this snippet know which price to display?
I don't think it does so the Product snippets and Merchant listings in Google will all show $0.00 for the price.
Code:
<mvt:if expr="l.settings:attributemachine:product:inv_level"> <mvt:assign name="l.availability_inv_level" value="l.settings:attributemachine:product:inv_level"/> <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 )" /> <meta itemprop="price" content="&mvt:attributemachine:product:price;"/> <mvt:else> <mvt:assign name="l.availability_inv_level" value="l.settings:product:inv_level"/> <meta itemprop="price" content="&mvt:product:price;"/> </mvt:if>
Comment