Jump to content

Shared Products Show up Twice in Sale Category/Search


Guest mosis

Recommended Posts

Guest mosis

We are using Cubecart 3.0.10 and all the products that are shared in other categories using the Manage Categories function appear multiple times in the Sale Category as well as the search results. For example, some products are in 3 or 4 categories, therefore they appear 3 or 4 times respectively in the sale category and search results. My sale category is an eyesore with 10+ pages, mostly the same products showing up multiple times.

I'm sure there is a explanation for this, but I have searched the forums and FAQS with no success.

If anyone else is having this problem or has had this and could help me figure out how I can fix this I would greatly appreciate it.

Thanks in advance

Link to comment
Share on other sites

Guest mosis

I think the problem may be related to a Advanced Search Mod that we have installed, but I can't confirm this.

Is anyone else having this problem or know how to fix this? :)

Link to comment
Share on other sites

The default cubecart SALE product list query could be much easier becasue of products. It seems your category index table is a bit messed up. Default cubecart doesnt know sale prices related to categories that means default query used for products in sale (viewCat.inc.php):

$productListQuery = "SELECT ".$glob['dbprefix']."CubeCart_cats_idx.cat_id, ".$glob['dbprefix']."CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel FROM ".$glob['dbprefix']."CubeCart_cats_idx INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_cats_idx.productId = ".$glob['dbprefix']."CubeCart_inventory.productId WHERE sale_price > 0 GROUP BY ".$glob['dbprefix']."CubeCart_inventory.productId";

could be much easier and NO multiple occurences there:

$productListQuery = "SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory WHERE sale_price > 0 ORDER BY productId";
Link to comment
Share on other sites

Guest mosis

The default cubecart SALE product list query could be much easier becasue of products. It seems your category index table is a bit messed up. Default cubecart doesnt know sale prices related to categories that means default query used for products in sale (viewCat.inc.php):

$productListQuery = "SELECT ".$glob['dbprefix']."CubeCart_cats_idx.cat_id, ".$glob['dbprefix']."CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel FROM ".$glob['dbprefix']."CubeCart_cats_idx INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_cats_idx.productId = ".$glob['dbprefix']."CubeCart_inventory.productId WHERE sale_price > 0 GROUP BY ".$glob['dbprefix']."CubeCart_inventory.productId";

could be much easier and NO multiple occurences there:

$productListQuery = "SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory WHERE sale_price > 0 ORDER BY productId";

Thanks Convict, I'll see what I can do to clean it up.

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