Jump to content

displayCarrierList hooking


krisives

Recommended Posts

Greetings,

 

I have been playing with trying to change how the carrier listing is displayed, or how I can change the HTML output of my carrier. There are two hooks I have found that relate to this:

 

  • displayCarrierList
  • displayBeforeCarrier

Both seem to basically provide hooks before and after the carrier list during checkout. If I implemented my hookDisplayCarrierList() method like this:

public function hookdisplayCarrierList() {
	return "Test";
}

This puts my "TEST" hook after the carrier list, which looks like this:

 

q28KoBm.png

How can I replace the entire listing HTML? Can this only be done by modifying per-template? What I am really trying to do is have custom HTML output for a specific carrier I have implemented in a CarrierModule. Am I looking at this wrong?

 

Link to comment
Share on other sites

Hi Kris,

Can you add some simple image what the end result should look like?

Not sure what you exactly mean with " entire listing HTML":

Maybe the space between the items, the blocks of each item, like borders, the colour of the background etc?

Or something totally different?

Please elaborate a little...

 

pascal.

Link to comment
Share on other sites

Here is a (badly) edited image and I will describe what the colors mean:

SAwEvRN.png

 

  • Red: Entire "carrier list" area. Originally I thought to change the layout in my module (not theme) I would have to override this entire area somehow, although I would prefer to have more specific hooks for what I am doing, but if I could replace the entire red area I could accomplish what I want.
  • Teal: Individual hooksto replace each carrier. Here I was hoping to have a hook or module method I could implement that would override how a specific carrier is displayed.
  • Green: This is really the area I am trying to hook into and change. I want to add extra display options, and most likely in the future extra input options (although that is a separate challenge) for more complicated external carriers / display addresses for local pickup etc.
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...