Closed sriram246 closed 6 years ago
Hi Sriram246,
yeah sure. But you have to implement it yourself. The deal is: after changing the amount of a product in the cart, the cart gets recalculated. So you need to ping the server to update the cart and get the new price information. Best would be to make an ajax call and process the response in javascript and update the ui.
You can do that yourself by overwriting the CartController https://www.coreshop.org/docs/2.0.0/Development/Store_Front/Controllers.html
cheers
Hi Dominik, What I need to know is . if its possible for me to write one PHP class on my own where for each product only the Shipping Price(VersandKosten) is calculated for Prouct A , Product B and so on.
Thats done on saving the cart. So if you re-persist the cart by calling $cart->save()
, an event listener is called which recalculates the cart. So you can then get the new shipping values from $cart->getShipping()
You are good now?
I will try that today and let you know.
Did that solve your problem?
I'll close this issue, If you have another questions regarding this, feel free to comment here again.
Hi Dominik, I have configured some products in the Admin. Is there a way to calculate the price automatically when i want to upate the cart in the frontend. For example
if I have one product A and if i increase the quantity from 1 to 2, Product B and increase the quantity from 1 to 2 it should update for each row automatically the total amount. If i increase Product A quantity from 1 to 2 and Product B quantity from 2 to 3 it must automatically update the quantity and calculate the total price for Product A and B and show the final price by combining Product A and Product B.