rambabuy Posted January 19, 2014 Share Posted January 19, 2014 Hi how can i get category id in category.tpl ? ($category_id not working) Thanks in advance RY Link to comment Share on other sites More sharing options...
vekia Posted January 19, 2014 Share Posted January 19, 2014 {$smarty.get.id_category} - you can use this variable you can also use {$id_category} 1 Link to comment Share on other sites More sharing options...
rambabuy Posted January 19, 2014 Author Share Posted January 19, 2014 (edited) {$smarty.get.id_category} - you can use this variable you can also use {$id_category} Hi Vekia , $smarty.get.id_category = 4 not working {if ($smarty.get.id_category = 4)} {include file="./product-list.tpl" products=$products} {/if} Thanks RY Edited January 20, 2014 by rambabuy (see edit history) Link to comment Share on other sites More sharing options...
rambabuy Posted January 20, 2014 Author Share Posted January 20, 2014 Resolved. Thanks. Link to comment Share on other sites More sharing options...
vekia Posted January 20, 2014 Share Posted January 20, 2014 {if ($smarty.get.id_category = 4)} {include file="./product-list.tpl" products=$products} {/if} wrong code you have to use: {if $smarty.get.id_category==4} Link to comment Share on other sites More sharing options...
rambabuy Posted January 20, 2014 Author Share Posted January 20, 2014 {if ($smarty.get.id_category = 4)} {include file="./product-list.tpl" products=$products} {/if} wrong code you have to use: {if $smarty.get.id_category==4} Yes , understood . Its working fine now . Thanks vekia -RY Link to comment Share on other sites More sharing options...
vekia Posted January 20, 2014 Share Posted January 20, 2014 thanks for confirmation i just wrote that due to the fact, that maybe in the future - some of merchant will have similar problem so i just posted solution with regards, milos 1 Link to comment Share on other sites More sharing options...
Paul C Posted January 20, 2014 Share Posted January 20, 2014 Can I ask why you wouldn't just use {$category->id}. That would seem the most sensible approach to me, unless I'm missing something.... Link to comment Share on other sites More sharing options...
rambabuy Posted January 20, 2014 Author Share Posted January 20, 2014 Can I ask why you wouldn't just use {$category->id}. That would seem the most sensible approach to me, unless I'm missing something.... We can. in fact it is simple and better. Link to comment Share on other sites More sharing options...
vekia Posted January 20, 2014 Share Posted January 20, 2014 this is why i mentioned this in my #2 post Link to comment Share on other sites More sharing options...
Paul C Posted January 20, 2014 Share Posted January 20, 2014 Well the "best answer" doesn't mention it so not sure which post you mean? {$smarty.get.id_category} - you can use this variable you can also use {$id_category} 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