macready Posted July 19, 2012 Share Posted July 19, 2012 Hello phpfreaks, I have a php script on a php product page that shows the users last 5 viewed products inside a box, and a php script on the same product page that shows 10 random products from all of the sub categories that are under the parent category of the sub category the product is in. I'm trying to have the random products base its results on the recently viewed products , ie the script will show products that have similar product names to the products found in the recently viewed box. Can anyone help me achieve this please if I post the code up? Quote Link to comment https://forums.phpfreaks.com/topic/265961-recommended-products-based-on-recently-viewed-products/ Share on other sites More sharing options...
hakimserwa Posted July 19, 2012 Share Posted July 19, 2012 take alook at the random array http://php.net/manual/en/function.array-rand.php Quote Link to comment https://forums.phpfreaks.com/topic/265961-recommended-products-based-on-recently-viewed-products/#findComment-1362852 Share on other sites More sharing options...
Barand Posted July 19, 2012 Share Posted July 19, 2012 ... ie the script will show products that have similar product names to the products found in the recently viewed box. Do you mean that if they viewed "sandals" then they should be interested in "sandpaper"? I would have thought your current method of showing similar products from same subcats more relevant. Just my 0.02 worth. Quote Link to comment https://forums.phpfreaks.com/topic/265961-recommended-products-based-on-recently-viewed-products/#findComment-1362901 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.