steveosoule
9/25/2015 - 7:25 PM

Miva - Load All Product Custom Field Codes as Member Names

Miva - Load All Product Custom Field Codes as Member Names

<mvt:comment><!-- Custom Field Codes as member names --></mvt:comment>

<mvt:item name="customfields" param="Read_Product_ID( l.settings:product:id, '', l.settings:fields )" />
<mvt:foreach iterator="field" array="fields">
	<mvt:if expr="l.field_string">
		<mvt:assign name="l.field_string" value="l.field_string $ ','"/>
	</mvt:if>
	<mvt:assign name="l.field_string" value="l.field_string $ ':' $ l.settings:field:code $ '=' $ l.settings:field:value" />
</mvt:foreach>
<mvt:assign name="l.settings:product:fields" value="miva_array_deserialize( l.field_string )" />

<mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:fields), ',', '<br>'))" />
<hr>
<mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:product:fields), ',', '<br>'))" />