
solr.Items.conf.velocity.product_doc.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mklab-framework-client Show documentation
Show all versions of mklab-framework-client Show documentation
The project contains a set of convenience methods on top of common data repositories.
The newest version!
#**
* Render a hit representing a Product
* assumed to have a field called "name"
*#
#field('name') #if($params.getBool('mlt', false) == false)More Like This#end
##do we have a physical store for this product
#set($store = $doc.getFieldValue('store'))
#if($store)#end
Id: #field('id')
Price: #field('price_c')
Features: #field('features')
In Stock: #field('inStock')
#set($mlt = $mltResults.get($docId))
#set($mltOn = $params.getBool('mlt'))
#if($mltOn == true)Similar Items#end
#if ($mltOn && $mlt && $mlt.size() > 0)
#foreach($mltHit in $mlt)
#set($mltId = $mltHit.getFieldValue('id'))
- Name: $mltHit.getFieldValue('name')
Price: $!number.currency($mltHit.getFieldValue('price')) In Stock: $mltHit.getFieldValue('inStock')
#end
#elseif($mltOn && $mlt.size() == 0)
No Similar Items Found
#end
#parse('debug.vm')
© 2015 - 2025 Weber Informatics LLC | Privacy Policy