Jump to content

control of products shown in "featured products"?


Guest Mothar Mountain Music

Recommended Posts

Guest Mothar Mountain Music

Hi

is there any way to control which products will be shown in the featured products menu?

i wish to set it so that a particular product will never be shown it that menu

cheers!

Nils Ponsaing

Link to comment
Share on other sites

The latest products can be controled by not selecting them to show,

as for the popular products those are not controlled but it depends on how many times people have viewed the product :wacko:

Link to comment
Share on other sites

Guest Mothar Mountain Music

The latest products can be controled by not selecting them to show,

as for the popular products those are not controlled but it depends on how many times people have viewed the product ;)

I appriciate your reply, but i was actually talking about the menu item called "featured product". is the any way to have any control over this...?

regards,

Nils Ponsaing

Link to comment
Share on other sites

  • 2 weeks later...

Hi

is there any way to control which products will be shown in the featured products menu?

i wish to set it so that a particular product will never be shown it that menu

cheers!

Nils Ponsaing

Did you ever figure this out? I am looking for the same thing.

Thanks!

Link to comment
Share on other sites

Guest Brivtech

Hi

is there any way to control which products will be shown in the featured products menu?

i wish to set it so that a particular product will never be shown it that menu

cheers!

Nils Ponsaing

Did you ever figure this out? I am looking for the same thing.

Thanks!

Did you follow the answer given in the post above yours?

Link to comment
Share on other sites

  • 3 weeks later...
  • 6 months later...
Guest Ian.Plumb

Hi,

Glad you found it, but please respect forum rules by not posting links to third party sites: I've had to edit out your link. :)

Just a thought -- the one piece of information anyone reading this thread would want to see has now been removed from the thread. It's nice to have rules; nicer to provide useful information.

Regards,

Ian P.

Link to comment
Share on other sites

Guest Brivtech

I'm aware of that, however, had the rules been read in the first place, the help could have been directed differently - This website is specifically aimed at CubeCart, and there is a separate site that has no affiliation with the CubeCart developers that discusses third party products.

I doubt that a car dealership would give support on a car stereo they didn't provide.

I can't let the advertising rules slip, I'm a moderator, and that's my responsibility, otherwise, it becomes a free for all. Had you been around here a couple of years ago Ian, then you'd know what I'm talking about.

I'm sorry if my position seems harsh, I'm simply carrying out my responsibilities here for better or for worse. I also consider that the answer had been provided already in the link to CubeCart.org, but the last few posts ignored this - Quite often, people don't read through the whole topic.

Link to comment
Share on other sites

Brivtech - and ALL the moderators here - kudos to you all, you do a fantastic job and are a great lot of guys and gal(s) :D

To those who are relatively new, believe me, the forum here is really a much better place for the rules. The rules here are not arbitrary, but were developed over time out of necessity.

As for helpful info in this thread, here is some more, to whom it may concern:

First, "How does the Featured Product box work in CubeCart?"

• Featured Product is actually a random product taken from inventory on each page reload

• On homepage, the random product is taken from the list of all products in inventory

• When browsing the store, the random product is taken from the current category you are browsing.

• When you browse a category that contains no products, the featured product box will disappear

Second, "How may I exclude a single product from ever showing in Featured Product box?"

• Using a text editor, find and open the file, includes/boxes/randomProd.inc.php

• FIND the following block of code within that file, about lines 39 - 47:

if(isset($_GET['catId'])){

	

	$whereClause = "WHERE cat_id=".$db->mySQLSafe($_GET['catId']);



} else {



	$whereClause = "";



}

• ALTER that code as indicated in red below:

if(isset($_GET['catId'])){

$whereClause = "WHERE productId != 10 AND cat_id=".$db->mySQLSafe($_GET['catId']);

} else {

$whereClause = "WHERE productId != 10";

}

• CHANGE the number 10 to the actual productId number of the product you wish to exclude

• SAVE, CLOSE and UPLOAD the file to your store

• Note: Take care the difference between productId and productCode :)

Third, "How do I Gain Total Control Over this Box?"

There are a great number of useful tweaks for this in the form of free and paid mods and little tweaks, all of which pretty much has been discussed repeatedly in this forum, try searching and reading topics for featured product and random product and you may find a great deal of info. Also, as written above, you may discuss this more freely in third party forums like Cubecartforums.org adn you may find direct links to mods by looking there and by searching google.

A free mod was published well over a year ago by a person whom i do not believe is active any longer in the forums, but it is a very simple modifiaction involving adding one field to the database, then choosing to add or remove any product from the random products function in the admin add.edit product screen.

Good luck and enjoy CubeCart! :)

Link to comment
Share on other sites

  • 1 year later...
Guest Spangsberg

Second, "How may I exclude a single product from ever showing in Featured Product box?"

� Using a text editor, find and open the file, includes/boxes/randomProd.inc.php

� FIND the following block of code within that file, about lines 39 - 47:

if(isset($_GET['catId'])){

$whereClause = "WHERE cat_id=".$db->mySQLSafe($_GET['catId']);

} else {

$whereClause = "";

}

� ALTER that code as indicated in red below:

if(isset($_GET['catId'])){

$whereClause = "WHERE productId != 10 AND cat_id=".$db->mySQLSafe($_GET['catId']);

} else {

$whereClause = "WHERE productId != 10";

}

� CHANGE the number 10 to the actual productId number of the product you wish to exclude

� SAVE, CLOSE and UPLOAD the file to your store

� Note: Take care the difference between productId and productCode :)

HI

I know this is an old thread, but I hope someone sees it.....

Can the above code be adapted to exclude an entire Product Category?

I'm a PHP/MySQL Newbee, so I would appresiate any help I can get.

Thank you in advance

Dennis

Denmark

Link to comment
Share on other sites

  • 10 months later...
Guest mvincik

If you want to exclude category like making a "Not Listed" category to hold products waiting description/pricing/more info do this:

� Using a text editor, find and open the file, includes/boxes/randomProd.inc.php

� FIND the following block of code within that file, about lines 39 - 47:

if(isset($_GET['catId'])){

$whereClause = "WHERE cat_id=".$db->mySQLSafe($_GET['catId']);

} else {

$whereClause = "";

}

to exclude category ALTER that code as indicated in red below:

if(isset($_GET['catId'])){

$whereClause = "WHERE cat_id != 10 AND cat_id=".$db->mySQLSafe($_GET['catId']);

} else {

$whereClause = "WHERE cat_id != 10";

}

� CHANGE the number 10 to the actual cat_id number of the product you wish to exclude

� SAVE, CLOSE and UPLOAD the file to your store

� Note: Take care the difference between productId and productCode ;)

Link to comment
Share on other sites

  • 2 months later...

good thread.

Im wondering if I can get some similar advice, in my case I just want one category to show. How can I do this?

PS I tried this and it doesnt work, the entire box just disappears

//.: Advanced Group Discounts Mod by Goober http://www.cubecartmodder.com/

include("includes/goobermods/Advanced_Group_Discounts/mod_part11.php");

$randProd= $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory WHERE `cat_id` = 1 ORDER BY RAND(".$seed.") LIMIT 1");

//.: Advanced Group Discounts Mod by Goober

I have the group discount mod obviously, but Ive had to hack it a little because it cant hand items in subcategories properly.

Link to comment
Share on other sites

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...