Jump to content

Add extra functionality to carrier


Nils-H

Recommended Posts

I want to make it possible for a customer to select a drop point for certain carriers. It should be a link that opens a popup with the possible drop points. I have a (finally) working custom carrier module that is "needs_range" and implements getOrderShippingCost, as this seemed to be the simplest way to present the carrier choices, even though the module is computing shipping costs with an external webservice.

 

However, there does not seem to be a way to customize the data and functionality of the carrier list this way. It just presents the logo, name, delay and cost.

 

In the opposite end, there's the possibility of hooking into the "externalCarrier" hook, but then there's a whole new world of problems, like how the carriers should be presented, and there's also a bug that doesn't show external carriers unless they are "need_range", in which case the carrier is rendered both along the "normal" carriers and as an external carrier...

 

I guess I could use javascript to manipulate the DOM to add a link to a popup and a few hidden fields to save the selected drop point, but this does seem a little awkward. I was also thinking if it might be possible to create an override class/controller, but then I probably would have to override the template as well, which does seem too fragile. Unless it's possible to partially override a template somehow?

 

Other suggestions how to solve this?

Link to comment
Share on other sites

  • 1 year later...

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