Guest cytechnologies Posted June 8, 2009 Share Posted June 8, 2009 Hey everyone, Currently the {popular_products} tag can be found in global/index.tpl. This is great, but I only want the popular products to be on my home page and not all other pages that share the global index.tpl template. So, I tried to move it to content/index.tpl and it won't work. Any advice on what script I need to be changing to get this to parse properly? Quote Link to comment Share on other sites More sharing options...
Robsta Posted July 8, 2009 Share Posted July 8, 2009 Visit the third-party forum, there is unique frontpage template mod there. Quote Link to comment Share on other sites More sharing options...
Guest cytechnologies Posted July 8, 2009 Share Posted July 8, 2009 Thank you, I actually found a simple solution after hours of searching . I can post it here if you want for future searches. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted July 8, 2009 Share Posted July 8, 2009 Thank you, I actually found a simple solution after hours of searching . I can post it here if you want for future searches. Please do - that is exactly what these forums are for, helping people finding solutions to problems Quote Link to comment Share on other sites More sharing options...
Guest cytechnologies Posted July 9, 2009 Share Posted July 9, 2009 The simple solution is not my own and I believe I found it buried in cubecartforums.org. Open the file includes/boxes/popularProducts.inc.php On line 28 you will find: if (!defined('CC_INI_SET')) die("Access Denied"); Below this line of code paste: if (!empty($_SERVER['QUERY_STRING'])){ $box_content = ""; } else { Then go down to the bottom of the script where you will find: ?> Paste the below above the last line of code (shown above): } It will then look like } ?> Thats it, basically by adding this code it is assuming that your home page will have no query strings. Meaning if someone goes to myteststore.com the query string will be empty and show the most popular products. If you then click on a navigation item page element you will get myteststore.com/index.php?viewCat=2. viewCat is your query string and will now ignore the popular products box. Definitely a hack - once again I did not figure this out, when I find who did again I will be sure to give them credit for it. Quote Link to comment 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.