Hi Heidi Dehaes, ShoppingCartItem price set from ShoppingCartItem.updatePrice method.
ShoppingCart.addOrIncreaseItem calls the sci.setQuantityand ShoppingCartItem.setQuantity calls the ShoppingCartItem.updatePrice and it calls the calculateProductPrice service to get the product price. for addItem flow its for CSR user, if CSR want to override the price for an item then CSR can set it. It should be permission driven, IF user has permission to modify system generated price then only user can modify it. Thanks & Regards -- Deepak Dixit www.hotwaxsystems.com www.hotwax.co On Wed, Jun 28, 2017 at 1:01 PM, Taher Alkhateeb <[email protected] > wrote: > First of all, just to get it out of my system, this method is 500 > lines long .. OUCH! The file itself is 2000 lines long. We got to > refactor the entire damn thing. > > From what I see the cartHelper.addToCart(...) method takes 21 > arguments (ouch again) one of them being the price. The price itself > is set from a priceStr variable in the code snippet: > > price = (BigDecimal) ObjectType.simpleTypeConvert(priceStr, > "BigDecimal", null, locale); > > And priceStr itself is set with: > > priceStr = (String) paramMap.remove("PRICE") > > I hope I got things right, maybe others can help if I missed something. > > On Tue, Jun 27, 2017 at 9:54 PM, Heidi Dehaes - Olagos > <[email protected]> wrote: > > Hello, > > > > Can anyone give me a hint on how the price which is visualised at a > product > > in the ecommerce site comes into the cart object for visualisation on the > > cart. > > I know it is sent via a form into the "additem" request. Via the > controller > > it goes to the "addToCart" method in the ShoppingCartEvents.java file and > > in that method there it goes via the call "cartHelper.addToCart" further. > > But i don't see in detail where the price of the product goes into the > cart > > object. > > > > Can anyone help me? I don't find it immediately. > > > > Thanks in advance, > > Eric > > > > > > Olagos bvba > > Heidi Dehaes > > Kerkstraat 34 > > 2570 Duffel > > Belgium > > Tel. : 015/31 53 04 > > GSM : 0485/22 35 80 > > E-mail : [email protected] > > http://www.olagos.eu > > http://www.olagos.com > > http://www.olagos.be > > http://www.olagos.nl >
