You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Tim Ruppert <ti...@hotwaxmedia.com> on 2006/08/25 05:29:35 UTC

Quick question about grabbing ProductAttributes

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