Murelh Ntyandi Posted December 17, 2018 Share Posted December 17, 2018 (edited) Hello I hope it is not a doublon since I did not find the answer on the web to my question before posting. I am creating a prestashop module where I go trough the cart of orders. From one given cart, I have to get the total amount of shipping tax. I am hooked on hookActionPaymentConfirmation, and as delivery option the cart object gives me this json value : object(Cart)[84] ... public 'delivery_option' => string '{"5":"2,"}' (length=10) ... I do not find how to use this value in the Prestashop developer guide, and I tried several random things that lead me to find this function is Prestashop core : public function getDeliveryOption($default_country = null, $dontAutoSelectOptions = false, $use_cache = true) located in prestashop\classes\Cart.php, line 3074 By reading its content, I figured out that all arguments where optional, so I called the function without arguments. It returned me the JSON data that the cart gave me in a first time array (size=1) 5 => string '2,' (length=2) The circle is complete, I am stuck, so I come to you. Do someone know where I can find the a sort of Prestashop's codex or how to get Shipping amount from an order or a cart ? Thank you for any help people ! Edited December 17, 2018 by Murelh Ntyandi adding tags (see edit history) Link to comment Share on other sites More sharing options...
Murelh Ntyandi Posted January 7, 2019 Author Share Posted January 7, 2019 Hi, UP. Do someone know how to get the amount of delevery shipping ? I still do not understand what I am missing 😕 Thanks 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