Jump to content

Random products are on index, not in category's?


Guest jeroenz19

Recommended Posts

Guest jeroenz19

I've got an strange problem.

When you look in de index page, it show's the random products box. But when you go to an category page, it's gone..

Can someone help me :) ?

Link to comment
Share on other sites

Guest estelle

This is just how it currently works :D, and I assume its been left this way to keep the code as simple as possible.

As I understand it, the "Featured Product" box is only showed on pages where there are other products showed. I.e. it will be shown on the homepage, or when you are viewing the details about a particular product, and when you are viewing a category which contains products. However when you view a category which only contains subcategories, the "Featured Product" box is no longer shown.

Has anyone developed a hack/mod to improve this? I'm sure it wouldn't be too hard... just an extra SQL query :D

Link to comment
Share on other sites

Guest jeroenz19

Ok...

I already got everything else the same. Look on my site: http://www.audioweb.nl/cubecart/

Just look in de shopping cart... it's all the same as the index page :D

I like a site to be completey the same in style, and not changing every time you go to another page.

I'll go and look for an mod to make...

UPDATE:

Got it working... very easy :D

The random product script looks in which category it is, and selects an product. If there is no products in category = no random product

So open: includes/boxes/randomProd.inc.php

Find on line 39 this code:

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

	

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



} else {



	$whereClause = "";



}


And replace it with this code:


	$whereClause = "";

Now it show's you everywhere the random products!

Download here:

http://www.cubecart.com/site/forums/index....showtopic=11455

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