Sha256: 65a62d0dcbbb1895b98d0d660587185df9357c452eb1e961ad9075b4241e2789

Contents?: true

Size: 1.53 KB

Versions: 226

Compression:

Stored size: 1.53 KB

Contents

#**
 *  Render a hit representing a Product
 *  assumed to have a field called "name"
 *#

<div class="result-title"><b>#field('name')</b><span class="mlt">   #if($params.getBool('mlt', false) == false)<a href="#lensNoQ&q=id:$docId&mlt=true">More Like This</a>#end</span></div>
##do we have a physical store for this product
#set($store = $doc.getFieldValue('store'))
#if($store)<div class="map"><img src="http://maps.google.com/maps/api/staticmap?&zoom=12&size=150x80&maptype=roadmap&markers=$doc.getFieldValue('store')&sensor=false" /><div><small><a target="_map" href="http://maps.google.com/?q=$store&amp;source=embed">Larger Map</a></small></div></div>#end
<div>Id: #field('id')</div>
<div>Price: #field('price_c')</div>
<div>Features: #field('features')</div>
<div>In Stock: #field('inStock')</div>
<div class="mlt">
  #set($mlt = $mltResults.get($docId))
  #set($mltOn = $params.getBool('mlt'))
  #if($mltOn == true)<div class="field-name">Similar Items</div>#end
  #if ($mltOn && $mlt && $mlt.size() > 0)
  <ul>
    #foreach($mltHit in $mlt)
      #set($mltId = $mltHit.getFieldValue('id'))
      <li><div><a href="#url_for_home?q=id:$mltId">$mltId</a></div><div><span class="field-name">Name:</span> $mltHit.getFieldValue('name')</div>
        <div><span class="field-name">Price:</span> $!number.currency($mltHit.getFieldValue('price')) <span class="field-name">In Stock:</span> $mltHit.getFieldValue('inStock')</div>

      </li>
    #end
  </ul>
  #elseif($mltOn && $mlt.size() == 0)
    <div>No Similar Items Found</div>
  #end
</div>
#parse('debug.vm')

Version data entries

226 entries across 226 versions & 3 rubygems

Version Path
smartcloud-0.0.31 lib/smartcloud/templates/dotsmartcloud/grids/grid-solr/data/configsets/sample_techproducts_configs/conf/velocity/product_doc.vm
simple_solr_client-0.2.1 solr_sample_core/conf/velocity/product_doc.vm
simple_solr_client-0.2.0 solr_sample_core/conf/velocity/product_doc.vm
simple_solr_client-0.1.2 solr_sample_core/conf/velocity/product_doc.vm
simple_solr_client-0.1.1 solr_sample_core/conf/velocity/product_doc.vm
simple_solr_client-0.1.0 solr_sample_core/conf/velocity/product_doc.vm