[jira] [Created] (OFBIZ-5767) WebShoppingCart ignores session currency

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

[jira] [Created] (OFBIZ-5767) WebShoppingCart ignores session currency

Nicolas Malin (Jira)
Josip Almasi created OFBIZ-5767:
-----------------------------------

             Summary: WebShoppingCart ignores session currency
                 Key: OFBIZ-5767
                 URL: https://issues.apache.org/jira/browse/OFBIZ-5767
             Project: OFBiz
          Issue Type: Bug
          Components: specialpurpose/ecommerce
    Affects Versions: 12.04.05, 12.04.04
            Reporter: Josip Almasi


This is how WebShoppingCart constructor calls ShoppingCart constructor:

(currencyUom != null ? currencyUom : ProductStoreWorker.getStoreCurrencyUomId(request)),

WebShoppingCart constructor is called only from

getCartObject(HttpServletRequest request, Locale locale, String currencyUom)

which is called only from

getCartObject(HttpServletRequest request)

with null locale and currency.
So, during WebShoppingCart creation, currency is always set to

ProductStoreWorker.getStoreCurrencyUomId(request)


This is a chicken-egg problem though: first-time user does not have currencyUom attribute set, and WebShoppingCart is created immediatelly.
But once created, nothing ever calls ShoppingCart.setCurrency()!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)