znzn Posted December 28, 2015 Share Posted December 28, 2015 Hello, I am newbie to prestashop. I have added custom page by making a new front controller and its corresponding .tpl file. Its working fine. Now i want to display some products related to specific categories (already added through admin). how i can achieve this ?? any clues .. Link to comment Share on other sites More sharing options...
roja45 Posted January 7, 2016 Share Posted January 7, 2016 You could - create a Category php object for each of your categories set in your admin page. - use the getProducts method on the Category object to get your products - assign them to an array - assign this array to smarty $this->context->smarty->assign(array( 'products' => $your_array )); - this array will now be available in your template. {foreach $products as $product} <p>{$products['name']}</p> {/foreach} 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