SirQ Posted December 6, 2011 Share Posted December 6, 2011 I'm currently looking at creating a new CarrierModule. However, I'm not sure if what I want to do is even possible with Prestashop. Right now the checkout flow is: Choose Shipping & Billing Address -> Choose Carrier -> Pay I'd like to give the user an option to select a drop off point when he selects my extra carrier (through a popup using google maps displaying all available drop off points, gas stations etc...) However, when he selects his preferred drop off point, the shipping address should change to this drop off point. But I'm already past the shipping address step in the order wizard. Is there a way to update the shipping address from within a module? (Database updates, calling a webservice, storing a cookie, posting a form back, ... anything) Link to comment Share on other sites More sharing options...
tomerg3 Posted December 6, 2011 Share Posted December 6, 2011 You can call the shipping address class using the selected shipping address for the cart $ship_address = new Address($cart->id_address_shipping) (double check, this is off the top of my head), update the fields you wans and then call $ship_address->update(); That should do the trick. Link to comment Share on other sites More sharing options...
SirQ Posted December 7, 2011 Author Share Posted December 7, 2011 Thanks, I'll give that a try! Link to comment Share on other sites More sharing options...
SirQ Posted December 8, 2011 Author Share Posted December 8, 2011 It worked, thanks a lot I hooked into processCarrier to go and update the shipping addres 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