Login  Register

Users - Is this a typo/bug/or misuse?

Posted by Ruth Hoffman on May 09, 2006; 11:22pm
URL: http://ofbiz.116.s1.nabble.com/Users-Is-this-a-typo-bug-or-misuse-tp139109.html

${cartLine.getItemTypeDescription()?if_exists} maybe should be:

${cartLine.getItemType()?if_exists} or ${cartLine.getName()?if_exists}

This shows up in a few places - showcart.ftl, splitship.ftl,minicart.ftl

When I view a cart after adding an item with no product id (a
non-product item) I get the following error. Here's the start of the
error...

*Method public java.lang.String
org.ofbiz.order.shoppingcart.ShoppingCartItem.getItemTypeDescription()
threw an exception when invoked on
org.ofbiz.order.shoppingcart.ShoppingCartItem@e4281f The problematic
instruction: ---------- ==>
${cartLine.getItemTypeDescription()?if_exists} [on line 58, column 47 in
minicart.ftl] ---------- Java backtrace for programmers: ----------
freemarker.template.TemplateModelException: Method public*

A quick look at ShoppingCartItem suggests that this method is going out
and looking for descriptions based on OrderItemTypes. In my case, I
don't have any OrderItemType's on record for this non-product item. Is
that my problem? Should I not be adding something to the shopping cart
that doesn't have a link to an OrderItemType.

Ruth
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users