Guest mosis Posted April 11, 2007 Share Posted April 11, 2007 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 Quote Link to comment Share on other sites More sharing options...
Guest mosis Posted April 13, 2007 Share Posted April 13, 2007 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? :) Quote Link to comment Share on other sites More sharing options...
convict Posted April 13, 2007 Share Posted April 13, 2007 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"; Quote Link to comment Share on other sites More sharing options...
Guest mosis Posted April 13, 2007 Share Posted April 13, 2007 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. 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.