Kathleen86 Posted December 17, 2020 Share Posted December 17, 2020 Hello everybody, I'd like to get cart amount. I can get the cart id in the parameters but I don't know how to get the cart amount, and it's not shown in the context parameters. How can I get the cart's mount ? Thank's a lot for your help! Kathleen Link to comment Share on other sites More sharing options...
Aodren Posted December 17, 2020 Share Posted December 17, 2020 What are you trying to do ? Where do you want to get this information . It might be in "$cart.subtotals" if you want to display it on a template. It's store in the table PREFIX_DB_orders otherwise. 1 Link to comment Share on other sites More sharing options...
Kathleen86 Posted December 17, 2020 Author Share Posted December 17, 2020 Thank's for your reply. In the meantime I found the solution with the line $total_cart = $params['cart']->getOrderTotal(); Link to comment Share on other sites More sharing options...
Razi Posted December 17, 2020 Share Posted December 17, 2020 You can easily get total using "getOrderTotal" function of" cart" Class here is Example: $objCart = new Cart($id_cart, $id_lang_default); $total = $objCart->getOrderTotal(true, Cart::BOTH); 1 Link to comment Share on other sites More sharing options...
Kathleen86 Posted December 17, 2020 Author Share Posted December 17, 2020 Great ! Thank's a lot, this is exactly what I needed ! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now