RescueDog Posted August 17, 2013 Share Posted August 17, 2013 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 More sharing options...
El Patron Posted August 17, 2013 Share Posted August 17, 2013 lets start with your review of the official ps hooks. http://doc.prestashop.com/display/PS15/Hooks+in+PrestaShop+1.5 this will give you some guidance of where existing hooks are and see if they are suitable for your project (assumption 1.5, please in the future post your ps version) Link to comment Share on other sites More sharing options...
RescueDog Posted August 17, 2013 Author Share Posted August 17, 2013 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 ( 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 More sharing options...
El Patron Posted August 17, 2013 Share Posted August 17, 2013 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. 1 Link to comment Share on other sites More sharing options...
RescueDog Posted August 18, 2013 Author Share Posted August 18, 2013 Found this! makes complete sense! Now let's see what I can do with it! lol Thanks again El! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now