"There are no products in this category"
Location: Shortcut to Homepage / Free CubeCart 3 Mods / "There are no products in this category"
"There are no products in this category"

This is for CubeCart 3. 

Overview:

The changes outlined below will modify your cart so that if there are:
- no products, but some subcategories, no text will be displayed
- no products and no subcategories, the text "This category is empty" will be displayed.
- no category found, the text "Sorry, that category code could not be found" will be displayed.

Instructions:

Open your lang.inc.php. Find this line:

'no_prods_in_cat' => "There are no products in this category.",

Add these lines below it:

'cat_is_empty' => "This category is empty.",

'cat_not_found' => "Sorry, that category code could not be found.",

Open includes/content/viewCat.inc.php. Replace this block:

} else {

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

$view_cat->parse("view_cat.noProducts");

}

(CubeCart 3.0.3 or later) With this block:

} else if(isset($_GET['catId']) && $_GET['catId']>0 && $subCategories == TRUE) {

// Estelle - if no products, but there were subcats, then no need to display anything else

} else if(isset($currentCat[0]['cat_name'])) {

// Estelle - if no products and no subcats, display category empty message
$view_cat->assign("TXT_NO_PRODUCTS",$lang['front']['viewCat']['cat_is_empty']);
$view_cat->parse("view_cat.noProducts");

} else {

// Estelle - if no category, display category not found message
$view_cat->assign("TXT_NO_PRODUCTS",$lang['front']['viewCat']['cat_not_found']);
$view_cat->parse("view_cat.noProducts");

}

(CubeCart 3.0.2 or earlier) With this block (leave the mispelled subCategoroies as is!!):

} else if(isset($_GET['catId']) && $_GET['catId']>0 && $subCategoroies == TRUE) {

// Estelle - if no products, but there were subcats, then no need to display anything else

} else if(isset($currentCat[0]['cat_name'])) {

// Estelle - if no products and no subcats, display category empty message
$view_cat->assign("TXT_NO_PRODUCTS",$lang['front']['viewCat']['cat_is_empty']);
$view_cat->parse("view_cat.noProducts");

} else {

// Estelle - if no category, display category not found message
$view_cat->assign("TXT_NO_PRODUCTS",$lang['front']['viewCat']['cat_not_found']);
$view_cat->parse("view_cat.noProducts");

}

(Based on 3 Reviews)

  Add to Registry Add to Wish List Price: AU$0.00


  Related Products


Copyright © 2005 - 2011 Estelle WinterfloodVPS Hosting by Linode