KoreLewi Posted May 12, 2021 Share Posted May 12, 2021 (edited) Hi everyone! I'd like to add a pickup point option to an existing shipping module. Successfully added the map to the DisplayCarrierExtraContent hook, and when the customer select a pickup point i'll call a frontController of the shipping module and pass the address of the pickup point to him. In the frontController, I extract the current id_address_delivery from the $this->context->cart... and update the delivery address with the pickup point data. I use the default Prestashop checkout. The problem: I am in step 3 (Shipping method) when I send the pickup point address to the controller and change the deliveryAddress. When I press Next, it does not jump to step 4 (Payment) but jumps back to step 3 (Addresses). I think this is because the deliveryAddress has changed in the meantime. How to solve this? Shouldn't the address be changed during the ordering process? In this case, when should the deliveryAddress be changed? After the order was successful placed (orderConfirmation hook)? in the module frontController postProcess() $deliveryAddress = new Address($this->context->cart->id_address_delivery); $deliveryAddress->address1 = 'New address'; $deliveryAddress->city = 'New city'; .... // it works well without this line -> pressing Next in step3(Shipping method) will jump to step4(Payment). // that is, in case I didn't save the address changes $deliveryAddress->save(); Thanks for the help! Prestashop 1.7.6 Edited May 12, 2021 by KoreLewi (see edit history) 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