Jump to content

Output to head after all hooks triggered


Recommended Posts

Hello guys,

 

I want to output HTML to the head of a page, but I need to handle all sorts of hooks first to determine whether the cart has changed, the viewed product has changed or an order has been issued by the frontend user etc.

 

What I do at the moment is:

1. I let PS handle appropriate hooks (productTab, orderConfirm, etc.) and gather this information

2. hookDisplayFooter is called and outputs appropriate HTML based on the gathered information into the footer

 

Now I want to do this in the <head> tag, but I need to wait for all hooks to run before outputting anything.

 

So my question is:
Is there a possibility to append HTML to the head of a PS page that is not using JS?

 

I suppose I can check for changes in the displayHead hook, but that seems like it would generate a lot of overhead.

 

Maybe you guys have any suggestions?

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