Jump to content

Best approach for additional carrier function


Recommended Posts

I'm trying to work out an idea for a new module, but I'm not sure which aproach I should take to create it...

 

The idea is pretty simple, I want to create a module which supports several carrier API's (PostNL, GLS, DPD, DHL etc.) most of them will be Dutch/Belgian (for now)... If a customer of the shop wants to have his parcel delivered to a nearby post office, I need this address to be set as shipping address.

 

I'd like to have the shop owner create a carrier just like he's used to via the PrestaShop settings. In my module backend all the carriers will be listed, per carrier the shop owner should be able to choose connect this carrier to one of the API's (or fill in a static address)... In the front end, the user should get some extra options per carrier (like a dropdown menu with addresses of nearby post offices, which I will retrieve from the API's).

 

I've read the PrestaShop documentation, but from what I understand, I have to create an entire new carrier to do this? Or can I add a couple of extra fields to an existing carrier? Maybe I can easily add an extra step to the PrestaShop carrier editor? I'm not looking for any code, just some pointers to what I should look into/read...

Edited by SparkyRih (see edit history)
Link to comment
Share on other sites

I found an article on PrestaShop "Carrier modules - functions, creation and configuration".

 

Using that I managed to set up my entire back-end already, it lists all existing carriersi n PrestaShop, and adds information in my module... Also I didn't forget about the updatecarrierHook(), so that's all working nicely...

 

Only thing I'm looking for now is the front-end function to push a static address to the shipping address fo the customer if a certain carrier is selected... And how to slightly alter the table layout of the carrier...

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...