tessguefen
8/19/2015 - 8:49 PM

SearchSpring Template Example (MPS)

SearchSpring Template Example (MPS)

<div class="category-product column medium-one-third small-half whole">
	<a href="{{ url }}" {{ intellisuggest }}>
		{% if product_flag == 'New and Sale' %}
			<span class="flag flag--new-and-sale">
		{% elseif product_flag != 'New and Sale' and product_flag != 'none' and product_flag != '' %}
			<span class="flag flag--{{ product_flag|lower}}">
		{% elseif 'ON SALE -' in facet_subhdb  or 'ON SALE -' in facet_subhda %}
			<span class="flag flag--sale">
		{% else %}
			<span class="flag">
		{% endif %}
			<img src="{{ thumbnailImageUrl|strip_http }}" onerror="this.onerror=null;this.src='//d1qhbfo7yqnkif.cloudfront.net/ajax_search/img/missing-image-75x75.gif';" />
		</span>
		<span class="breaker"></span>
		<div class="prod-info ubuntu">
			{% if facet_short %}
				<strong class="prod-name">{{ facet_short }}</strong>
			{% else %}
				<strong class="prod-name">{{ name|escape }}</strong>
			{% endif %}

			{% if facet_item %}
				<span class="prod-item{% if facet_manuf %}{% else %} inline-block{% endif %}">{{ facet_item }}</span>
			{% endif %}

			{% if facet_manuf %}
				<span class="prod-manufacturer">{{ facet_manuf }}</span>
			{% endif %}

			{% if facet_subhda %}
				{% if 'Available in many color combinations' in facet_subhda %}
					<div class="color-options-available sprites sprites-colors"></div>
				{% endif %}

				{% if 'ON SALE -' in facet_subhda %}
					<span class="prod-pricing">{{ facet_subhda|preg_replace('/ON SALE -/', '<span class="on-sale-price">') }}</span></span>
				{% elseif 'Available in many color combinations' in facet_subhda %}
					<span class="prod-pricing">{{ facet_subhda|preg_replace("/Available in many color combinations/", "") }}</span>
				{% else %}
					<span class="prod-pricing">{{ facet_subhda }}</span>
				{% endif %}
			{% endif %}

			{% if facet_subhdb %}
				{% if 'Available in many color combinations' in facet_subhdb %}
					<div class="color-options-available sprites sprites-colors"></div>
				{% endif %}

				{% if 'ON SALE -' in facet_subhdb %}
					<span class="prod-pricing">{{ facet_subhdb|preg_replace('/ON SALE -/', '<span class="on-sale-price">') }}</span></span>
				{% elseif 'Available in many color combinations' in facet_subhdb %}
					<span class="prod-pricing">{{ facet_subhdb|preg_replace("/Available in many color combinations/", "") }}</span>
				{% else %}
					<span class="prod-pricing">{{ facet_subhdb }}</span>
				{% endif %}
			{% endif %}
		</div>
	</a>
</div>