1 24 package org.ofbiz.order.shoppingcart; 25 26 import java.util.Locale ; 27 28 import javax.servlet.http.HttpServletRequest ; 29 import javax.servlet.http.HttpSession ; 30 31 import org.ofbiz.base.util.UtilHttp; 32 import org.ofbiz.entity.GenericDelegator; 33 import org.ofbiz.entity.GenericValue; 34 import org.ofbiz.product.store.ProductStoreWorker; 35 import org.ofbiz.webapp.website.WebSiteWorker; 36 37 50 public class WebShoppingCart extends ShoppingCart { 51 52 public WebShoppingCart(HttpServletRequest request, Locale locale, String currencyUom) { 53 super((GenericDelegator)request.getAttribute("delegator"), ProductStoreWorker.getProductStoreId(request), 57 WebSiteWorker.getWebSiteId(request), (locale != null ? locale : UtilHttp.getLocale(request)), 58 (currencyUom != null ? currencyUom : UtilHttp.getCurrencyUom(request)), 59 request.getParameter("billToCustomerPartyId"), 60 (request.getParameter("supplierPartyId") != null ? request.getParameter("supplierPartyId") : request.getParameter("billFromVendorPartyId"))); 61 62 HttpSession session = request.getSession(true); 63 this.userLogin = (GenericValue) session.getAttribute("userLogin"); 64 this.autoUserLogin = (GenericValue) session.getAttribute("autoUserLogin"); 65 this.orderPartyId = (String ) session.getAttribute("orderPartyId"); 66 } 67 68 public WebShoppingCart(HttpServletRequest request) { 69 this(request, UtilHttp.getLocale(request), UtilHttp.getCurrencyUom(request)); 70 } 71 72 73 public WebShoppingCart(ShoppingCart cart) { 74 super(cart); 75 } 76 } 77 | Popular Tags |