Skip to content

Instantly share code, notes, and snippets.

@tessguefen
Last active April 21, 2017 15:01
Show Gist options
  • Select an option

  • Save tessguefen/6e6b8caad1d66a5cb747bcec5be859e7 to your computer and use it in GitHub Desktop.

Select an option

Save tessguefen/6e6b8caad1d66a5cb747bcec5be859e7 to your computer and use it in GitHub Desktop.
?variant_id = in marketing feeds (variant:id is not the variant_id, it is the variant product's ID)
<mvt:if expr="NOT l.settings:record:variant:variant_id">
<mvt:do name="l.settings:record:variant:product_part_count" file="g.Module_Library_DB" value="ProductVariantPartList_Load_Part(l.settings:record:variant:id, l.settings:record:variant:productvariantparts)" />
<mvt:if expr="miva_array_elements( l.settings:record:variant:productvariantparts ) GT 0">
<mvt:foreach iterator="pvp" array="record:variant:productvariantparts">
<mvt:if expr="l.settings:pvp:product_id EQ l.settings:record:id">
<mvt:assign name="l.settings:record:variant:variant_id" value="l.settings:pvp:variant_id" />
<mvt:foreachstop />
</mvt:if>
</mvt:foreach>
</mvt:if>
</mvt:if>
<mvt:assign name="l.settings:record:variant:canonical_uri" value="l.settings:record:canonical_uri $ '?variant_id=' $ l.settings:record:variant:variant_id" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment