Jump to content

[SOLVED] Featured Product Module With different Category


Recommended Posts

Hi Moderators,

 

Please help to customize some features

My Website Link : http://videolinkindia.com

 

I have duplicated Home featured module and it was success,  i wanted to display products from different categories, now the module showing products only from 'home' category. i have seen many solutions on net by changing code on file homefeatured1.php (which i  renamed for duplication)

 

by changing code

 
$category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id);
$nb = (int)Configuration::get('HOME_FEATURED_NBR');
$products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8));
 
to
 
$category = new Category(14, (int)Context::getContext()->language->id);
$nb = (int)Configuration::get('HOME_FEATURED_NBR');
$products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8));
 
but in my case its not working. it shows no featured products
 
I have following product categories, Main categories and their sub categories
 
Camera (id 11)
  - DSLR Camera (12)
  - Point and Shoot  (13)
Accessories (14)
  - Lenses (15)
  - Memory Card (16)
 
If required i can provide you the back-end user pass
 
Any help would be appreciated!!
 
Thanks
 
 
 

 

Link to comment
Share on other sites

×
×
  • Create New...