You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Josip Almasi (JIRA)" <ji...@apache.org> on 2014/09/11 12:15:34 UTC

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

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)