Jump to content

Remove Feature Product - Replace with Static


Recommended Posts

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! 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 5 months later...

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 1 month later...

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 

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

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&amp;node=hooks&amp;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&amp;node=hooks&amp;add_snippet=1#snippets" class="delete">Add Snippet</a></p>

If present, then the link is getting hidden somehow.

Link to comment
Share on other sites

<div id="snippets" class="tab_content">
  <h3>Code Snippets</h3>
  <p><a href="?_g=settings&amp;node=hooks&amp;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 !

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 11 months later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...