ilclaudio Posted August 5, 2016 Share Posted August 5, 2016 (edited) Hi all, I'd like to insert in my site a block that shows the products of a given category. A sort of category carousel that I shoud be able to include in all page: product page, category page, static page and so on. What's the best way to do this accord to you? claudio Edited August 5, 2016 by ilclaudio (see edit history) Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 5, 2016 Share Posted August 5, 2016 You can use the following code to fetch products of any category: $cat_id = 5; //cany cateogry ID as per your requirement $cat_obj = new Category($cat_id); $all_products = $cat_obj->getProducts($id_lang, $p, $n); //$p and $n are page number and number of products respectively Now you can use the $all_products array to show products as per the design you want on the front end. 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