Skip to content

Instantly share code, notes, and snippets.

@mghdotdev
Created May 19, 2015 21:26
Show Gist options
  • Save mghdotdev/2def6841eceeb76e25da to your computer and use it in GitHub Desktop.
Save mghdotdev/2def6841eceeb76e25da to your computer and use it in GitHub Desktop.
MVT: Variant's Master Product Link
<mvt:comment>Load in Master Product's Link</mvt:comment>
<mvt:do file="g.Module_Library_DB" name="l.success" value="ProductVariantPartList_Load_Part( l.settings:product:id, l.partList )" />
<mvt:if expr="miva_array_elements(l.partList) GT 0">
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_ID( l.partList[1]:product_id, l.master )" />
<mvt:assign name="l.settings:product:link" value="'//' $ g.domain:name $ '/' $ g.store:code $ '/' $ 'product' $ '/' $ l.master:code $ '.html'" />
</mvt:if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment