Quick question about grabbing ProductAttributes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Quick question about grabbing ProductAttributes

Tim Ruppert
Currently, I'm using the pattern:

                <entity-one entity-name="Product Attribute"
value-name="extraProductAttribute" auto-field-map="false">
                    <field-map field-name="productId"
env-name="product.productId" />
                    <field-map field-name="attrName" value="extra" />
                </entity-one>

to expose product attributes to my category and product screens (with
this snippet coming from inside of my custom CatalogScreens.xml ).  I
would now like to get a hold of them in a place where I can use the
convertUom service to convert these values from Inches to Centimeters -
or whatever conversion needs to be done for the particular attribute.

I have found numerous examples of how these conversions are done in Java
and bsh files, but have never seen them used directly in the ftl -
probably with good reason.

If there isn't a good reason - can anyone show me a quick example of how
to convert it within the ftl?

If it isn't a good idea - can anyone point me to an example where a
Product Attribute is retrieved in a bsh file?  Once I have that, I think
that I can easily utilize the convertUom service to get the value.  
Thanks for your help.

Cheers,
Tim

--
Tim Ruppert
HotWax Media
http://www.hotwaxmedia.com

o:801.649.6594
f:801.649.6595