Jump to content

Show All Products


Guest macjs

Recommended Posts

Is there a way to show all products on one page? I've searched the forums and tried a search string, but it didn't show any results.

Anyone have this working?

Thanks!

Link to comment
Share on other sites

Thanks convict, not quite what I'm looking for though. There was a cool mod called "All Products View CC4" but it says "This mod will show a product list containing ALL products in the selected category, together with ALL products in the subcategories beneath!"

What I'm actually looking for is a regular shopping cart page with the product thumbs as well (not just a list) and for all categories not just a selected category. There is an 'Order' button in the menu that needs to link to a page with all the products and order buttons right there. I think this mod only shows a "list" of products, no images or buttons... but I could be wrong, there's no preview of the mod.

Thanks anyway... Still looking...

Link to comment
Share on other sites

Well as I see you don't need any category? If so this is very simple hack you have to modify the SQL query like this one

$productListQuery = sprintf("SELECT C.cat_id, C.productId, I.productCode, I.quantity, I.description, I.image, I.price, I.name, I.popularity, I.sale_price, I.stock_level, I.useStockLevel FROM %1\$sCubeCart_cats_idx AS C INNER JOIN %1\$sCubeCart_inventory AS I ON C.productId = I.productId WHERE I.disabled = '0' AND C.cat_id = %2\$s GROUP BY I.productId %3\$s", $glob['dbprefix'], $db->mySQLSafe($_GET['catId']), $orderSort);


TO


$productListQuery = sprintf("SELECT * FROM %1\$sCubeCart_inventory %2\$s", $glob['dbprefix'],  $orderSort);

in viewCat.inc.php file. Only you have to manage a link to this file becasue of view category content.

Link to comment
Share on other sites

Oh cool. There are a few categories (but not many products) so this will gather all the products then?

What do you mean by having to manage a link to this file? (sorry didn't follow you on that one).

Link to comment
Share on other sites

Oh cool. There are a few categories (but not many products) so this will gather all the products then?

What do you mean by having to manage a link to this file? (sorry didn't follow you on that one).

I mean any category link shows always the same content thus categories are ignored.

Link to comment
Share on other sites

  • 2 weeks later...

That definitely worked, but it did remove the options to view categories individually. I thought I could mess with the code somehow, but I don't know enough PHP to do that.

So, still searching for a solution to have the option to view All Products on one page, yet still be able to view individual categories too.

I'll keep searching, but thanks anyway convict! you really know your stuff!

Link to comment
Share on other sites

That definitely worked, but it did remove the options to view categories individually. I thought I could mess with the code somehow, but I don't know enough PHP to do that.

So, still searching for a solution to have the option to view All Products on one page, yet still be able to view individual categories too.

I'll keep searching, but thanks anyway convict! you really know your stuff!

:D

Well there is next quick hack to leave the option to see appropriate category prods:

$productListQuery = sprintf("SELECT C.cat_id, C.productId, I.productCode, I.quantity, I.description, I.image, I.price, I.name, I.popularity, I.sale_price, I.stock_level, I.useStockLevel FROM %1\$sCubeCart_cats_idx AS C INNER JOIN %1\$sCubeCart_inventory AS I ON C.productId = I.productId WHERE I.disabled = '0' AND C.cat_id = %2\$s GROUP BY I.productId %3\$s", $glob['dbprefix'], $db->mySQLSafe($_GET['catId']), $orderSort);




REPLACE WITH


if (isset($_GET['catId']) && is_numeric($_GET['catId']))

$productListQuery = sprintf("SELECT C.cat_id, C.productId, I.productCode, I.quantity, I.description, I.image, I.price, I.name, I.popularity, I.sale_price, I.stock_level, I.useStockLevel FROM %1\$sCubeCart_cats_idx AS C INNER JOIN %1\$sCubeCart_inventory AS I ON C.productId = I.productId WHERE I.disabled = '0' AND C.cat_id = %2\$s GROUP BY I.productId %3\$s", $glob['dbprefix'], $db->mySQLSafe($_GET['catId']), $orderSort);

else

$productListQuery = sprintf("SELECT * FROM %1\$sCubeCart_inventory %2\$s", $glob['dbprefix'],  $orderSort);

Well if you want to see all prods just use link http://your.store.tld/index.php?_a=viewCat :w00t:

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