Jump to content

Recommended Posts

Hello,

 

I created a module that adds carriers to the database obtained through an external api. To obtain suitable carriers I need information delivery address, so I can not add to database these transport after to step 3 of the shopping cart.

I am currently adding them through the hook DisplayCarrierList to the database are added correctly but nevertheless in step 4: shipping not shown as it appears that performs the query to the database before my module add new methods transport.

 

If I make a new search the carriers that I added to the base corresponding to the previous search made appear.

Someone can tell me some hook o the way  that allows me to add these carriers before prestashop make the query to the database, but once you can access the delivery address given by the user.

Link to comment
Share on other sites

There may not be a usable hook, since adding carriers DURING checkout is not how prestashop was designed to work.  You might need to override the OrderController, and either add a custom hook earlier in the process, or just add a call to your modules function

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...