abhijitghogre Posted October 2, 2014 Share Posted October 2, 2014 Currently product categories module displays products from same categories on products page. I want to display random products instead, so that users can redirected to other category products. Is there any FREE module available for this? Or how do I modify the existing module to make this change. Please help. Thank you. Link to comment Share on other sites More sharing options...
vekia Posted October 2, 2014 Share Posted October 2, 2014 i don;t know any free module but you can achieve it with modification of default module. do you use it ? if not, it is possible to change module core to achieve what you expect. Link to comment Share on other sites More sharing options...
abhijitghogre Posted October 2, 2014 Author Share Posted October 2, 2014 Yes I use the default module. But I am unable to find where it fetches products. Any ideas? Link to comment Share on other sites More sharing options...
vekia Posted October 2, 2014 Share Posted October 2, 2014 Yes I use the default module. But I am unable to find where it fetches products. Any ideas? modules/productscategory/productscategory.php there is a code like: $category = new Category((int)$product->id_category_default); then $category uses getProducts function. in this case it's necessary to duplicate Category class getProducts function to something like: getRandomProducts and remove from sql query where condition: AND cp.`id_category` = '.(int)$this->id 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