Jump to content

New hook needed?


RescueDog

Recommended Posts

My business requires client input based on the product they are purchasing. It may be one line, it may be many per product - there may be multiples of one product personalized with different name/info.

I've made the customization tab (tab10) primary so it is more obvious to the user.

Now I want to code a form based on the product they are selecting and give them a section for each quantity. i.e. engraved badge, qty 5 - I would write a for each from 1 to qty ...input text... and so on.

Should I be creating a module?

Do I need to create a new hook?

 

I'm fairly new to PS but a programmer since the 80's so I'm willing to give it a go.

 

Any guidance is greatly appreciated!

 

~Jo

 

www.knightsshop.com

Link to comment
Share on other sites

Thank you El - I've gone thru documentation, maybe it hasn't quite clicked for me though. I guess what I'm trying to avoid is cramming a bunch of code into the core file? I'll go back and check the docs again.

Is there any graphic that shows the system flow? (a) calls (B) and passes params to ©...

 

Thanks for taking the time! I really appreciate!

 

oh - running 1.5.4.1 (and zero intention of upgrading ever again!)

Link to comment
Share on other sites

a hook is nothing more than a branch and link.

 

One registers their hook code at module install time. Then when a hook is reached in native prestashop, any module registered for that hook will be given control, there must be a hook with that name in the module. Multiple module hooks order of preference is defined in module positions.

 

I hope that makes sense...the guide as well as looking at native ps module that use hook processing, most do, will give you a better idea of how they are used.

  • Like 1
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...