tessguefen
7/31/2015 - 4:53 PM

MPS - SS Facets -- Color.

MPS - SS Facets -- Color.

<table>
	<tr>
		<td>Product Code</td>
		<td>Colors</td>
	</tr>
<mvt:foreach iterator="product" array="products">
	<mvt:item name="toolkit" param="attrc|acount|l.all_settings:product:code" />
	<mvt:if expr="g.acount GT 0">
		<mvt:item name="product_attributes" param="product:id" />
	</mvt:if>
<mvt:if expr="l.settings:product:color">
<tr>
	<td>&mvt:product:code;</td>
	<td>&mvt:product:color;</td>
</tr>
</mvt:if>
</mvt:foreach>
</table>
<mvt:do name="l.settings:color_count" file="g.Module_Library_Utilities" value="SplitStringAndTrim('Aqua, Assorted Color, Bermuda Blue, Black, Blue, Bright Blue, Bright Yellow, Burgundy, Candy Pink, Chocolate Brown, Cinnamon Brown, Citrus Green, Classic Pink, Classic Red, Clear, Cobalt, Coral, Emerald Green, Gold, Green, Hunter Green, Ivory, Lavender, Lime Green, Mimosa Yellow, Multicolor, Natural, Navy Blue, Orange, Pastel Blue, Pink, Purple, Raspberry, Red, School Bus Yellow, Silver, Sun Yellow, Sunkissed Orange, Teal, True Blue, White, Yellow', ',', l.settings:colornames)" />
<mvt:assign name="l.settings:product:color" value="''" />
<mvt:foreach iterator="attribute" array="attributes">
	<mvt:if expr="l.settings:attribute:code EQ 'Color' OR l.settings:attribute:code EQ 'color'">
		<mvt:foreach iterator="option" array="attribute:options">

			<mvt:foreach iterator="color" array="colornames">
				<mvt:if expr="l.settings:product:color AND l.settings:color CIN l.settings:option:prompt">
					<mvt:assign name="l.settings:product:color" value="l.settings:product:color $ ', ' $ l.settings:color" />
				<mvt:elseif expr="l.settings:color CIN l.settings:option:prompt">
					<mvt:assign name="l.settings:product:color" value="l.settings:color" />
				</mvt:if>
			</mvt:foreach>

		</mvt:foreach>
	</mvt:if>
</mvt:foreach>