Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing placement of where product totals are shown within the category box


photogsam

Recommended Posts

Hi im trying to change the placement of where the total number of products within a category are shown, example below, I would like to have the total just before the category to try and condense the layout more (or even after if thats possible).

 

Any help would be greatly appreciated, thank you

 

Clip.jpg

Link to comment
Share on other sites

Hi im trying to change the placement of where the total number of products within a category are shown, example below, I would like to have the total just before the category to try and condense the layout more (or even after if thats possible).

 

Any help would be greatly appreciated, thank you

 

Clip.jpg

 

 

In catalog/includes/boxes/categories.php

 

MOVE THIS:

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$categories_string .= ' (' . $products_in_category . ')';

}

}

 

 

TO WHERE YOU WANT IT, EITHER BEFORE OR AFTER:

 

$categories_string .= '<a href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

 

// display category name

$categories_string .= $tree[$counter]['name'];

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '</b>';

}

Link to comment
Share on other sites

  • 3 weeks later...
In catalog/includes/boxes/categories.php

 

MOVE THIS:

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$categories_string .= ' (' . $products_in_category . ')';

}

}

TO WHERE YOU WANT IT, EITHER BEFORE OR AFTER:

 

$categories_string .= '<a href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

 

// display category name

$categories_string .= $tree[$counter]['name'];

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '</b>';

}

 

 

Thank you very much :thumbsup:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...