[OFBiz] SVN: r7483 - trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog

jonesde@svn.ofbiz.org jonesde at svn.ofbiz.org
Tue May 2 09:34:44 CDT 2006


Author: jonesde
Date: 2006-05-02 09:34:40 -0500 (Tue, 02 May 2006)
New Revision: 7483

Modified:
   trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/miniproductsummary.bsh
Log:
Should really be getting the currency from the cart in ecommerce and related templates

Modified: trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/miniproductsummary.bsh
===================================================================
--- trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/miniproductsummary.bsh	2006-05-02 14:17:38 UTC (rev 7482)
+++ trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/miniproductsummary.bsh	2006-05-02 14:34:40 UTC (rev 7483)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
+ *  Copyright (c) 2003-2006 The Open For Business Project - www.ofbiz.org
  *
  *  Permission is hereby granted, free of charge, to any person obtaining a 
  *  copy of this software and associated documentation files (the "Software"), 
@@ -30,6 +30,7 @@
 import org.ofbiz.product.product.ProductContentWrapper;
 import org.ofbiz.product.catalog.*;
 import org.ofbiz.product.store.*;
+import org.ofbiz.order.shoppingcart.*;
 
 delegator = request.getAttribute("delegator");
 miniProduct = request.getAttribute("miniProduct");
@@ -37,6 +38,7 @@
 webSiteId = CatalogWorker.getWebSiteId(request);
 prodCatalogId = CatalogWorker.getCurrentCatalogId(request);
 productStoreId = ProductStoreWorker.getProductStoreId(request);
+cart = ShoppingCartEvents.getCartObject(request);
 
 if (optProductId != null) {    
     miniProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", optProductId));
@@ -49,7 +51,7 @@
     // calculate the "your" price
     priceParams = UtilMisc.toMap("product", miniProduct, 
         "prodCatalogId", prodCatalogId, "webSiteId", webSiteId, 
-        "currencyUomId", UtilHttp.getCurrencyUom(session, null),
+        "currencyUomId", cart.getCurrency(),
         "autoUserLogin", session.getAttribute("autoUserLogin"));
     priceParams.put("productStoreId", productStoreId);
     if (userLogin != null) priceParams.put("partyId", userLogin.get("partyId"));



More information about the Svn mailing list