Kryptronic Info Center

The Info Center has articles on everything you need to get your site up and running with Kryptronic software. Hundreds of articles are available which contain tips, tricks, software updates and release notes, and everything you ever wanted to know about eCommerce, but were afraid to ask...

Kryptronic

Site Doctor: Changing How Product Name and/or Product Number is Displayed

This procedure involves modifying a core piece of the software. Any errors made may cause the entire cart to stop working. As this is a core file it is also subject to change when updates are released.

If you have enabled the display of product numbers you will find that they are added to the display in one of the core files named CCP_Prod.php at line 1445 in the prodshow function/method. This core file resides in the {private}/apps/ccp0/CCP_Prod/ directory. By default the product number, if enabled, is displayed before the product name separated from it by a dash (-).

The line of code you will be modifying looks like this by default:

$product['name'] = $product['prodnum'] . ' - ' . $product['name'];

You may modify how the product name and product number are displayed in any way you would like. If, for example, you wanted to have the product number shown after the product name with parenthesis around it the code would look like this:

$product['name'] = $product['prodnum'] . ' (' . $product['name'] . ')';

This modification only affects the display of product details. If you want to also change how things are displayed in the category view and other places where a list of products is shown you will need to modify line number 476 in the same file which looks like this by default:

$result[$num]['name'] = $result[$num]['prodnum'] . ' - ' . $result[$num]['name'];

Kryptronic: Security. Stability. Reliability