Skip to content

Instantly share code, notes, and snippets.

@tessguefen
Created February 26, 2018 17:36
Show Gist options
  • Save tessguefen/98923f8423bfebc60ade1b6d55619350 to your computer and use it in GitHub Desktop.
Save tessguefen/98923f8423bfebc60ade1b6d55619350 to your computer and use it in GitHub Desktop.
Waitlist Example Logic
<mvt:if expr="miva_array_elements( l.settings:waitlist:variants )">
<mvt:comment>
Check if Variant is Backordered
</mvt:comment>
<mvt:assign name="l.settings:part" value="NULL" />
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_ID_WithRuntimeInventory( l.settings:waitlist:variants[1]:part_id, l.settings:part )" />
<mvt:if expr="l.settings:part:inv_short EQ 'Backordered'">
<mvt:assign name="g.Waitlist_Email_Continue" value="0" />
</mvt:if>
<mvt:elseif expr="l.settings:waitlist:product:inv_short EQ 'Backordered'">
<mvt:comment>
If Master Product is Backorered
</mvt:comment>
<mvt:assign name="g.Waitlist_Email_Continue" value="0" />
</mvt:if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment