hurray Posted August 18, 2010 Share Posted August 18, 2010 For the moment I have 30 products listed under home category (which displays under featured product block on the homepage). However on the back-end I have assigned only 20 products to be displayed on the featured product block. Each time I refresh the page I expect to have 20 random products to be displayed and it is not the case. The same 20 products gets displayed all the time on the homepage. Is this normal? Shouldn't the products change randomly when there are more products in the home category than that are assigned to be displayed under the featured product block on the homepage? Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 18, 2010 Share Posted August 18, 2010 I believe you have to modify the SQL to get a random list of IDs. Let me try to track it down for you as I have worked on this module before. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 18, 2010 Share Posted August 18, 2010 Change this code in homefeatured.php $products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10)); To this: $products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10),NULL, NULL, false, true, true,20); What this does is it sets the $random parameter to true and it should return a random ordering ofproducts. Make sure you set the number of random items as the last paramI have not tested this but see if it works for you. Link to comment Share on other sites More sharing options...
hurray Posted August 20, 2010 Author Share Posted August 20, 2010 I copied the code and it seems to work.But I did not understand what you meant by "Make sure you set the number of random items as the last param". Do you mean that the number of items I have assigned under homefeatured block should be the same as the last number on the code:$products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10),NULL, NULL, false, true, true,20); Thanks. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 20, 2010 Share Posted August 20, 2010 Actually, both numbers in the code above should be the same as the number you have assigned. Link to comment Share on other sites More sharing options...
hurray Posted August 21, 2010 Author Share Posted August 21, 2010 Thanks.It solved the issuse Link to comment Share on other sites More sharing options...
Madridman Posted September 13, 2010 Share Posted September 13, 2010 Thank You MrBaseball34! Link to comment Share on other sites More sharing options...
MrBaseball34 Posted September 13, 2010 Share Posted September 13, 2010 You're welcome.I'm finally getting the hang of things and can help more people with problems. Seems PrestaTeam has n interest in helpingas much as they should so I will kindly try to take up some slack. Link to comment Share on other sites More sharing options...
hurray Posted September 13, 2010 Author Share Posted September 13, 2010 You're right, the prestashop team does not seem to help as much as they should be helping. But honestly and personally, you've helped me a lot. I have a very limited knowledge on web development and having someone like you in this forum encourages us to come back and not just double think about replacing prestashop with some other software from our shop. Link to comment Share on other sites More sharing options...
Patric Posted September 14, 2010 Share Posted September 14, 2010 We are a very small team which is trying to do the best to manage all we have to manage.I'm really sorry that it does not seem to be enough, but we try to improve things day by day.I really begin to be tired by MrBaseball34's critics!It's so easy to come and take advantage of a free software and then always complain.This is exactly the kind of behavior that daunts... Link to comment Share on other sites More sharing options...
hurray Posted September 14, 2010 Author Share Posted September 14, 2010 Hi Patric,May be you should take MrBaseball34's critics as a way to improve things within the forum. And if there are critics that don't apply to you, you should just ignore them. Honestly, I have opened at least 5 topics needing help, and I had never heard anything from you. The only people who have helped me here are MrBaseball34, Rocky and NC. It seems like we get more answers from other members than from the staffs themselves. But again that is the point of a forum, to help each other. Link to comment Share on other sites More sharing options...
Patric Posted September 14, 2010 Share Posted September 14, 2010 I did not say that they do not apply to us. Some of them are, of course, justified. But as I told, we do our best.In addition, we cannot help more than 100 000 members. This is effectively a community forum, and we really hope that people who come to "take" will also "give" something. This is how should work a community.I'm very grateful to everyone who gives time to help other people, like Rocky, Tomerg3, MrBaseball34, jhnstcks, razaro, and many others. I try to help as far as possible. But moderation also takes me a lot of time... Link to comment Share on other sites More sharing options...
jhnstcks Posted September 14, 2010 Share Posted September 14, 2010 Would you prefer that the developers spent all their time helping out on the forum and answering questions from users or improving the software, removing bugs and adding new features, because I know which I would prefer.If I know the answer to the question and no-one else has posted it yet, I will post it, there would be no point going through all the posts and adding "Sorry dont know the answer to this" just so that you know someone has read your question.If users bothered to use the search function on the forum:http://www.prestashop.com/forums/viewthread/8830/modules___development/homepagefeatured__custom_http://www.prestashop.com/forums/viewthread/44998/configuring___using_prestashop/home_page_featured_products_how_to_sort_it_randomlyhttp://www.prestashop.com/forums/viewthread/14315/general_discussion/randomise_featured_productshttp://www.prestashop.com/forums/viewthread/2469/general_discussion/home_product_little_help_pleasehttp://www.prestashop.com/forums/viewthread/25785/third_party_modules/featured_products_module_help_dot_These are answers to the original question of this thread and all I searched for was: random featured products Link to comment Share on other sites More sharing options...
MrBaseball34 Posted September 14, 2010 Share Posted September 14, 2010 Would you prefer that the developers spent all their time helping out on the forum and answering questions from users or improving the software, removing bugs and adding new features, because I know which I would prefer. As I have pointed out, there have been many places I worked where the developers were REQUIRED to work support and their forums for an amount of time. This helps them get more involved in different areas of the product. I really begin to be tired by MrBaseball34’s critics!It’s so easy to come and take advantage of a free software and then always complain.This is exactly the kind of behavior that daunts… Patric, instead of berating me about my criticisms, why not do something about it? You want to shut me up, make this thing work like it should. Get the developers more involved, small team or not. To not have any posts from PrestaTeam members for days at a time, is not the way to show that you are doing your best.Also, it is much more CIVIL if you would move topics instead of closing them. There was a topic yesterday where the poster had a title that was all caps and it needed to be in a different forum. Instead of warning the user about it, and modifying the title and moving it, you closed the topic. What an attitude you have to do that.I'm trying to help make this a great COMMUNITY and even making suggestions to help make this stupid excuse for a forum easier to use but it seems that PrestaTeam just ignores me when it comes to this forum software.I used to run a very vibrant PHPBB3 community and it wasn't only fun, it was rewarding knowing that when I took someone's suggestions to improve the forum, it made a lot of people happy.I was also the main moderator for another forum with 300,000 users so I understand the tasks involved.Believe me, I didn't like it when someone criticized me for how the forum was run and I MADE IT BETTER, instead of bitching back that I didn't have enough time to fix it. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted September 14, 2010 Share Posted September 14, 2010 I tell you what, Patric, Make me a moderator and you can get lost, you will never have to post again if you so desire. Link to comment Share on other sites More sharing options...
Recommended Posts