Jump to content

Products Instead of Categories In Navigation


Guest Jordan06

Recommended Posts

Guest Jordan06

Hi All,

Just wondering if anyone can help me here, I have a client who wishes to have seperate links to products in the cart navigation rather than having categories. Can someone please let me know which file I need to edit to have this working, and provide me with the modified code and direct me to where I need to place it.

Basically what I am after is:

Navigation

Product Link --> links directly to product description and add to basket etc

Product Link --> links directly to product description and add to basket etc

If someone can help I would greatly appreciate it.

Kind Regards

Jordan

Link to comment
Share on other sites

I'm not sure this is what you want, but this will make your store a catalogue so that when someone clicks on the new Catalogue link it will display every product in your store.

////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Step 1 : Open includes/content/viewCat.inc.php

///////////////////////////////////////////////////////////////////////////////////////////////////////////

Find :

} elseif($_GET['catId']=="saleItems" && $config['saleMode']>0) {

$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";

After Add:

} elseif($_GET['catId']=="catalogue") {

$productListQuery = "SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory";

$view_cat->assign("LANG_IMAGE",$lang['front']['viewCat']['']);

Find :

if(file_exists($GLOBALS['rootDir']."/images/uploads/thumbs/thumb_".$productResults[$i]['image'])){

$view_cat->assign("SRC_PROD_THUMB",$GLOBALS['rootRel']."images/uploads/thumbs/thumb_".$productResults[$i]['image']);

} else {

$view_cat->assign("SRC_PROD_THUMB",$GLOBALS['rootRel']."skins/".$config['skinDir']."/styleImages/thumb_nophoto.gif");

}

Replace with :

if(!$_GET['catId']=="catalogue"){

if(file_exists($GLOBALS['rootDir']."/images/uploads/thumbs/thumb_".$productResults[$i]['image'])){

$view_cat->assign("SRC_PROD_THUMB",$GLOBALS['rootRel']."images/uploads/thumbs/thumb_".$productResults[$i]['image']);

} else {

$view_cat->assign("SRC_PROD_THUMB",$GLOBALS['rootRel']."skins/".$config['skinDir']."/styleImages/thumb_nophoto.gif");

}

}

Find :

$view_cat->assign("LANG_IMAGE",$lang['front']['viewCat']['image']);

Replace with :

if(!$_GET['catId']=="catalogue"){

$view_cat->assign("LANG_IMAGE",$lang['front']['viewCat']['image']);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Step 2 : Open skins/YOURSKIN/styleTemplates/boxes/categories.tpl

///////////////////////////////////////////////////////////////////////////////////////////////////////////

Find : <li class="bullet"><a href="index.php" class="txtDefault">{LANG_HOME}</a></li>

After Add : <li class="bullet"><a href="index.php?act=viewCat&catId=catalogue" class="txtDefault">Catalogue</a></li>

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