harishbabu123 Posted August 16, 2016 Share Posted August 16, 2016 I created a module in admin,that adds a tab in product page and displays some information along with a button using X.tpl. Now I want to open a Y.tpl on button click?How can I achieve this? Thanks in advance. Regards, Harish Link to comment Share on other sites More sharing options...
vekia Posted August 16, 2016 Share Posted August 16, 2016 you can create if condition in your .tpl file, so you can use it if you will post someVariable (with button click) {if $smarty.post.someVariable==1} {include file="./y.tpl"} {else} contents of x.tpl here {/if} 1 Link to comment Share on other sites More sharing options...
harishbabu123 Posted August 17, 2016 Author Share Posted August 17, 2016 (edited) How to post variable on button click,I am stuck at it actually? I tried defining a function in php and then called it through tpl via onClick method,but its not working. Edited August 17, 2016 by harishbabu123 (see edit history) 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