felsted1979 Posted May 28, 2013 Share Posted May 28, 2013 Hi there I'm new to the forum and wondered if someone could direct me on how to remove the 'Featured Product" box from my homepage as I would like to use the space for manual product advertisement instead? I am using cubecart PHP Version 5.2.17 Much appreciated! Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 28, 2013 Share Posted May 28, 2013 Welcome felsted1979! Glad to see you made it to the forums. In Cubecart's admin section (hopefully you are running CC521 or later), click on Manage Hooks, Code Snippets tab. We will create a snippet that will survive (hopefully) any CubeCart upgrade. Enable the snippet. Give this snippet a unique ID, say, [email protected]. Make sure this is the lowest priority snippet so that it gets executed last: 999. The description: Kills Featured/Random Product Box. The trigger will be: class.gui.display. The snippet code is:{php} // No, not correct! $GLOBALS['smarty']->clearAssigned('RANDOM_PROD'); $GLOBALS['smarty']->clearAssign('RANDOM_PROD'); {/php}Enter a version and author. Click Save. Test and report back. Quote Link to comment Share on other sites More sharing options...
Iona Posted November 8, 2013 Share Posted November 8, 2013 Hi bsmither I am trying to do similar. I'd like to be able to choose which product gets featured and alter this every few weeks. From the snippet above, where are you specifying which product to feature? Many thanks Iona Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 8, 2013 Share Posted November 8, 2013 There is a free mod at: http://www.cubecartforums.org/index.php?showtopic=17088 It gives the admin a choice which products show up as featured. Quote Link to comment Share on other sites More sharing options...
Iona Posted November 8, 2013 Share Posted November 8, 2013 Thanks. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted November 12, 2013 Share Posted November 12, 2013 Welcome felsted1979! Glad to see you made it to the forums. In Cubecart's admin section (hopefully you are running CC521 or later), click on Manage Hooks, Code Snippets tab. We will create a snippet that will survive (hopefully) any CubeCart upgrade. Enable the snippet. Give this snippet a unique ID, say, [email protected]. Make sure this is the lowest priority snippet so that it gets executed last: 999. The description: Kills Featured/Random Product Box. The trigger will be: class.gui.display. The snippet code is: {php} $GLOBALS['smarty']->clearAssigned('RANDOM_PROD'); {/php} Enter a version and author. Click Save. Test and report back. When I use this, it gives me a blank page for my site. If I disable it, the site is back. Ideas? Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 12, 2013 Share Posted November 12, 2013 Sorry. Try:{php} $GLOBALS['smarty']->clearAssign('RANDOM_PROD'); {/php} Quote Link to comment Share on other sites More sharing options...
tthe1t Posted January 6, 2014 Share Posted January 6, 2014 I have a somewhat similar question how do I remove the mailing list from my store front ~ I had it off once but upon updating it came back and I can't find where I made the change before. Any and all help is MUCH appreciated Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 6, 2014 Share Posted January 6, 2014 That's in your skin template file main.php. About line 60, look for: {$MAIL_LIST} Remove it. Quote Link to comment Share on other sites More sharing options...
tthe1t Posted January 6, 2014 Share Posted January 6, 2014 Thanx Quote Link to comment Share on other sites More sharing options...
Nik Grey Posted February 4, 2014 Share Posted February 4, 2014 I need to remove this box as my Lettering Tool products keep appearing there despite what we have done to stop them. BUT, in 5.2.6 in the 'Code Snippet' tab the 'Add Snippet' link that allows me to add a new Snippet is missing ! It is still there in my Test Store but I cant remember which build of Cubecart that is on - how can I tell the version? But the main point is I can't add any more snippets in my Live Store. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 4, 2014 Share Posted February 4, 2014 Creating/Managing snippets is a feature found on non-"Lite" versions of CC5.2.x. Can you verify that this installation of CubeCart is actively associated with your license? Quote Link to comment Share on other sites More sharing options...
Nik Grey Posted February 4, 2014 Share Posted February 4, 2014 They are both using the same key - I asked Al to add my test store to the list for this key so I could continue testing as we get updates. I just checked and they are both using using the same key, I did just double check. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 4, 2014 Share Posted February 4, 2014 My mistake -- you do have the Code Snippets tab, it is just the link "Add Snippet" is missing. In the admin template file settings.hooks.php, near line 16, please verify these statements exists:<div id="snippets" class="tab_content"> <h3>{$LANG.hooks.title_code_snippets}</h3> <p><a href="?_g=settings&node=hooks&add_snippet=1#snippets" class="delete">{$LANG.hooks.add_snippet}</a></p> If so, then look for these statements in the HTML as seen by the browser (somewhere near line 136, depending):<div id="snippets" class="tab_content"> <h3>Code Snippets</h3> <p><a href="?_g=settings&node=hooks&add_snippet=1#snippets" class="delete">Add Snippet</a></p> If present, then the link is getting hidden somehow. Quote Link to comment Share on other sites More sharing options...
Nik Grey Posted February 4, 2014 Share Posted February 4, 2014 <div id="snippets" class="tab_content"> <h3>Code Snippets</h3> <p><a href="?_g=settings&node=hooks&add_snippet=1#snippets" class="delete">Add Snippet</a></p> Is not there, and I checked the 5.2.8 file for it also - again, not there. It's not in the 5.2.5 version either ! Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 4, 2014 Share Posted February 4, 2014 The statements you included in your reply above is the HTML as received by your browser. Please use the View Source feature of your browser. Checking for the statements you quoted above in a CubeCart template file -- no, those statements won't be found in the template. The CubeCart template file should have the first set of statements I posted above. Quote Link to comment Share on other sites More sharing options...
Nik Grey Posted February 4, 2014 Share Posted February 4, 2014 Sorry Brian, you are correct. When on the http://www.greyprint.co.uk/admin.php?_g=settings&node=hooks#snippets page if I view 'Page Source' I do see the code as you posted (line 140). And the Cubecart template file DOES contain the code as expected. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 4, 2014 Share Posted February 4, 2014 Best guess is that there must be some javascript hiding it. Please try this: in the admin template file, the lines being looked at, where you see class="delete">{$LANG.hooks.add_snippet}</a></p>, delete just the class="delete". Save the template file, and in admin, clear the cache. Revisit that page/tab. Quote Link to comment Share on other sites More sharing options...
Nik Grey Posted February 7, 2014 Share Posted February 7, 2014 That didn't work for me but I updated to the latest build and the link is back so all is well again. I really want to keep the Featured box as going forward my new skin (hopefully) will be including this - just need to re-visit a way of stopping my Lettering products from showing up in there. I have a lot to do before going into that again though but will be back when the time comes. Quote Link to comment Share on other sites More sharing options...
sean1688 Posted January 15, 2015 Share Posted January 15, 2015 I followed the link and installed the Featured Product mod, everything seems to work fine, except when I tried to designate some products as featured, and click on save, nothing happens. the selected products are still not shown as featured product. does anyone have idea about what might be wrong with my situation? my website is Http://www.volteq.com thanks in advance. Sean Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 15, 2015 Share Posted January 15, 2015 As you may have read in the mod's conversation, there is more to getting the collection of FEATURED products to display than what the mod alone gives you. Feel free to join in on that mod's conversation. Quote Link to comment Share on other sites More sharing options...
sean1688 Posted January 15, 2015 Share Posted January 15, 2015 I do get that, and was able to get one our our other site working, you can see it here: http://www.a1hardbags.com however, for this one, the issue is that I cannot seem to add that "featured product" check mark to any product. it seems like the database is not there or the information is not saved. is there a way to completely remove the installation? maybe if I can do that, I can try it again. unfortunately since the first one worked, I assumed that there is no problem and did not make a backup. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 15, 2015 Share Posted January 15, 2015 I'm continuing this conversation over at the mod's thread. Quote Link to comment Share on other sites More sharing options...
sean1688 Posted January 15, 2015 Share Posted January 15, 2015 Thanks Brian! you helped again to resolve the issue! Best regards, Sean Quote Link to comment Share on other sites More sharing options...
CoderJim Posted September 25, 2015 Share Posted September 25, 2015 I am trying to disable 'Featured Product", will this snippet work with V6?{php} $GLOBALS['smarty']->clearAssign('RANDOM_PROD');{/php} 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.