Miva Merchant Modules and Development
Want to start an online store? We work with you from start to finish, from commerce platform to design to SEO.
Experience counts, and we have a lot.

VARIANTS: Load Product Variant list

Scot Ranney • December 18, 2023


<mvt:do file="g.Module_Library_DB" name="l.success" value="ProductVariantList_Load_Product(l.settings:product:id, l.settings:variants)" />

This has all the info we need:

<mvt:do file="g.Module_Library_DB" name="l.success" value="ProductVariantList_Load_Product(l.settings:product:id,l.settings:product_variantes)" />
<mvt:foreach iterator="pv" array="product_variantes">
	<mvt:eval expr="miva_array_serialize(l.settings:pv)" />
####

</mvt:foreach>

two example array elements:

:part_count=1,:parts[1]:active=0,:parts[1]:agrpcount=0,:parts[1]:cancat_id=0,:parts[1]:catcount=0,:parts[1]:code=CO1016-XSGRY,:parts[1]:cost=0,:parts[1]:disp_order=683,:parts[1]:dt_created=1588110645,:parts[1]:dt_updated=1588370221,:parts[1]:id=683,:parts[1]:inv_active=1,:parts[1]:inv_available=0,:parts[1]:inv_instock=0,:parts[1]:inv_level=in,:parts[1]:inv_long=0+available,:parts[1]:inv_low_level=0,:parts[1]:inv_low_track=0,:parts[1]:inv_out_level=0,:parts[1]:inv_out_track=0,:parts[1]:inv_short=In+Stock,:parts[1]:name=Ladies%27+Cherokee+Scrub+Pants+SIZE%3AXSGRY,:parts[1]:original_active=0,:parts[1]:page_id=0,:parts[1]:pgrpcount=0,:parts[1]:price=0,:parts[1]:sku=CO1016-XSGRY,:parts[1]:taxable=1,:parts[1]:weight=0,:product_id=417,:variant_id=108
:part_count=1,:parts[1]:active=0,:parts[1]:agrpcount=0,:parts[1]:cancat_id=0,:parts[1]:catcount=0,:parts[1]:code=CO1016-SMGRY,:parts[1]:cost=0,:parts[1]:disp_order=684,:parts[1]:dt_created=1588110645,:parts[1]:dt_updated=1588370223,:parts[1]:id=684,:parts[1]:inv_active=1,:parts[1]:inv_available=1,:parts[1]:inv_instock=1,:parts[1]:inv_level=in,:parts[1]:inv_long=1+available,:parts[1]:inv_low_level=0,:parts[1]:inv_low_track=0,:parts[1]:inv_out_level=0,:parts[1]:inv_out_track=0,:parts[1]:inv_short=In+Stock,:parts[1]:name=Ladies%27+Cherokee+Scrub+Pants+SIZE%3ASMGRY,:parts[1]:original_active=0,:parts[1]:page_id=0,:parts[1]:pgrpcount=0,:parts[1]:price=0,:parts[1]:sku=CO1016-SMGRY,:parts[1]:taxable=1,:parts[1]:weight=0,:product_id=417,:variant_id=109

https://www.scotsscripts.com/mvblog/variants-load-product-variant-list.html

mvkb_products