alex.sima Posted August 15, 2014 Share Posted August 15, 2014 Hi, I have o module that displays the products from a category an I want display only the products that that have a specific default category. How can I do that? Here is my code: $categ1 = new Category((int)(Configuration::get('CATEG1'))); $myprods1 = $categ1->getProducts($this->context->language->id, 1, 10, 'id_product', 'DESC'); /* 10 products max. */ $catname1 = $categ1->getName($this->context->language->id); I've tried few hours to solve this problem, but is out of my capacities. Thank you! Link to comment Share on other sites More sharing options...
alex.sima Posted August 15, 2014 Author Share Posted August 15, 2014 Nobody? Link to comment Share on other sites More sharing options...
alex.sima Posted August 15, 2014 Author Share Posted August 15, 2014 It seams that I have to modify or create a new getProduct in Product.php After I made the changes I see non result, even if i "force compile". What should I do to see my changes? Link to comment Share on other sites More sharing options...
vekia Posted August 17, 2014 Share Posted August 17, 2014 for what purposes you use $catname1 = $categ1->getName($this->context->language->id); ? in .tpl file you can use if condition to check id_category_default {if $product.id_category_default!=5} display product {/if} 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