tessguefen
7/22/2015 - 6:05 PM

Search Spring Example AJAX Display Template

Search Spring Example AJAX Display Template

<div id="{{ code|upper }}" class="{{ product_id }} item" {% if resultIndex%2 == 1 %}style="border-right: 0"{% endif %}>

<p class='name'><a href="{{ url }}" {{ intellisuggest }}>{{ name|escape }}</a></p>

<div class="prodimg">
<a href="{{ url }}" {{ intellisuggest }}><img src="{{ thumbnailImageUrl|strip_http }}" onerror="this.onerror=null;this.src='//d1qhbfo7yqnkif.cloudfront.net/ajax_search/img/missing-image-75x75.gif';" /></a>
</div>
<div class="prodinfo">
<p style="margin-bottom: 0">Item#: {{ code }}</p>
{% if nopricing and nopricing == "YES" %}
<span class="red" style="font-weight:bold;">Our Price: <a style="color:#ef3e42 !important;" class="call-price-link" href="http://www.yourdomain.com/documents/noprice_landingpage.php?keepThis=true&amp;TB_iframe=true&amp;height=200&amp;width=355" title="{{ name|escape }} Pricing" class="thickbox cboxElement">Click Here</a></span>
{% else %}
{% if product_discontinued and product_discontinued == "YES" %}
<!-- do nothing -->
{% else %}
<div class="hidden" id="hmap">{{ map }}</div>
<div class="hidden" id="hcost">{{ cost|money }}</div>
<div class="hidden" id="hprice">{{ price|money }}</div>
<div class="hidden" id="hmprice">{{ map_price|money }}</div>
<div class="hidden" id="hsave">{{ you_save }}</div>
<div class="hidden" id="hauth">{{ map_auth_type }}</div>
<div id="dopricing"></div>
{% endif %}
{% endif %}

<ul>
{% if short_desc_1 %}<li>{{ short_desc_1 }}</li>{% endif %}
{% if short_desc_2 %}<li>{{ short_desc_2 }}</li>{% endif %}
{% if short_desc_3 %}<li>{{ short_desc_3 }}</li>{% endif %}
{% if short_desc_4 %}<li>{{ short_desc_4 }}</li>{% endif %}
</ul>

</div>

<br class="clr">

<div class="pr_snippet_category" style="padding-left:16px;">

<div id="pr-snippet-{{ code|upper }}-1" class="pr-snippet">
<div class="pr-snippet-wrapper">
<div class="pr-snippet-stars">

{% if reviews_rating %}
<div class="pr-stars pr-stars-small pr-stars-{{ reviews_rating|preg_replace("/\\./", "_") }}-sm" style="background-position: 0px -{{ reviews_rating * 36 }}px;">&nbsp;</div>
<span class="pr-snippet-rating-decimal pr-rounded">
{% if reviews_ratingdecimal == 0 or reviews_ratingdecimal == 1 or reviews_ratingdecimal == 2 or reviews_ratingdecimal == 3 or reviews_ratingdecimal == 4 or reviews_ratingdecimal == 5 %}
{{ reviews_ratingdecimal }}.0
{% else %}
{{ reviews_ratingdecimal }}
{% endif %}
</span>
{% else %}
<div class="pr-stars pr-stars-small" style="background-position: 0px 0px">&nbsp;</div>
<span class="pr-snippet-rating-decimal pr-rounded">0.0</span>
{% endif %}

</div>

<p class="pr-snippet-review-count">({{ reviews_count }} reviews)</p>
<div class="pr-snippet-read-write">
{% if reviews_count != "" %}
<div class="pr-snippet-read-reviews">
<a id="pr-snippet-read-link-{{ code|upper }}" class="pr-snippet-link" data-pr-event="snippet-read-reviews" style="color:#0A87C6 !important;" href="javascript:readReviewsInline{{ product_id }}();">Read <span>{{ reviews_count }}</span> Reviews</a>
</div>
{% endif %}
<div class="pr-snippet-write-review">
{% if reviews_count == "" %}<p style="display:inline">Be the first to</p> {% endif %}<a class="pr-snippet-link" data-pr-event="snippet-write-review" href="http://www.yourdomain.com/review.html?pr_page_id={{ code|upper }}">Write a Review</a>
</div>
<div class="pr-clear"></div>
</div>
<div class="pr-clear"></div>
<div class="pr-snippet-social-bar">
<div class="pr-clear"></div>
</div>
</div>
</div>
</div>




<div class="prod-bottom-half">
<div class="prod-buttons">
<p><a href="{{ url }}" {{ intellisuggest }}><img width="109" height="27" alt="View Product" src="http://www.yourdomain.com/site/images/buttons/btn-cat-pg-view-product.jpg"></a></p>
{% if nopricing and nopricing == "YES" %}
<div id="catCart_button"><p><a style="color:#ef3e42 !important;" class="call-price-link" href="http://www.yourdomain.com/documents/noprice_landingpage.php?keepThis=true&amp;TB_iframe=true&amp;height=200&amp;width=355" title="{{ name|escape }} Pricing" class="thickbox cboxElement"><img width="109" height="27" alt="Add to Cart" src="http://www.yourdomain.com/site/images/buttons/btn-cat-pg-call-for-price.jpg"></a></p></div>
{% else %}
{% if product_discontinued and product_discontinued == "YES" %}
<!-- do nothing -->
{% else %}
<div id="catCart_button"><p><a href="http://www.yourdomain.com/mm5/merchant.mvc?Action=ADPR&amp;Screen=BASK&amp;Store_Code=IDW&amp;Quantity=1&amp;Attributes=Yes&amp;Product_Code={{ code }}"><img width="109" height="27" alt="Add to Cart" src="http://www.yourdomain.com/site/images/buttons/btn-cat-pg-add-to-cart.jpg"></a></p></div>
{% endif %}
{% endif %}
</div>
<div class="prod-icon">
{% if tiny_icon_url %}
<div id="cat_tinyicon" style="margin-bottom:5px;margin-top:0px;">
{{ tiny_icon_url }}
</div>
{% endif %}
<div class="compare-container">
{{ compare }}
</div>
</div>
<br class="clr">
</div>

</div>