ecentury Posted June 8, 2013 Share Posted June 8, 2013 (edited) On prestashop 1.5 what i am trying to do is to initally create a form on the right hand side that asks customers the following So for example the form would say are you: (1) over 50 (2) under 50 Then there answer is stored in a smarty session variable or cookie? Then on a .tpl page, there would be if, else commands if session variable 1 You are over 50, this might be.... if session variable 2 You are under 50, this might be.... else end if Can anybody please help with code to: (1) Initially create this simple form and store the session variable? (2) To bring back the session variable so you can use it in the if else statement? Many thanks for taking the time to look Edited June 8, 2013 by ecentury (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 8, 2013 Share Posted June 8, 2013 in my opinion for this is better to create module than editing the template tpl files (controllers also!) create module with: registerhook header + footer in the footer add .tpl with your form (and position aligned to the right - with css styles) in the function hookheader add a php script with if condition (if POST form then create a cookie) voila 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