Created
August 14, 2019 21:41
-
-
Save andrew-serrano/8d18f59cadc2f17dd2b8f84a0a6b8c70 to your computer and use it in GitHub Desktop.
Return Variant ID when you have the product, attribute, option information
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mvt:comment> | |
Load Product | |
</mvt:comment> | |
<mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_Code('PRODUCT_CODE', l.product)" /> | |
<mvt:comment> | |
Must be a valid attribute/option combination | |
Schema: | |
g.Product_Attributes[1]:code = tone | |
g.Product_Attributes[1]:value = medium | |
g.Product_Attributes[2]:code = aed_trainer | |
g.Product_Attributes[2]:value = essentials | |
</mvt:comment> | |
<mvt:assign name="l.temp_structure[1]:code" value="'ATTRIBUTE_CODE'" /> | |
<mvt:assign name="l.temp_structure[1]:value" value="'OPTION_CODE'" /> | |
<mvt:assign name="l.temp_structure[2]:code" value="'ATTRIBUTE_CODE'" /> | |
<mvt:assign name="l.temp_structure[2]:value" value="'OPTION_CODE'" /> | |
<mvt:comment> | |
Provide product information and the attribute/option structure. This will | |
return the variant id that is associated with the attribute/option combination | |
</mvt:comment> | |
<mvt:do file="g.Module_Library_Utilities" name="l.success" value="Validate_Attributes_DetermineVariant(l.product, 0, l.temp_structure, miva_array_collapse(l.temp_structure), l.null, l.null_count, l.variant_id)" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment