Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing some headings...


Quasi

Recommended Posts

Hi, Im trying to change a couple of the HEADING_TITLE values to be a bit more dynamic, and Im kinda new to PHP - can anyone help?

 

What I want to do is where you would see "Let's See What We Have Here" or "Categories" as set in catalog/includes/languages/english/default.php I want to take the last value off the $breadcrumb trail.

 

So if application_top.php was showing "Top >> Catalog >> Ford >> Hatchbacks" then HEADING_TITLE would be set to "Hatchbacks" when $category_depth is set to products or nested.

 

In a similar way, when you click on a product to get its information (product_info.php) Id like to put the manufacturers name in the page title. So instead of just seeing "Mondeo" you would see "Ford Mondeo".

 

Any ideas gratefully recieved!

 

Oh, and no, Im not selling cars, thats just an example :)

Does this smell like chloroform to you?

Link to comment
Share on other sites

OK, starting to answer my own questions here :

 

To change the "Let's See What We Have Here" to be the current category name, goto line 66 in default.php, change "HEADING_TITLE" to "$category['categories_name']"

 

Can also comment out the next line to permanently disable the category image being displayed to the right of the name (Yay - how do you think up an image to represent "Specials" anyway?).

Does this smell like chloroform to you?

Link to comment
Share on other sites

OK, a more specific code question this time, if anyone knows the answer....

 

In default.php (2.2MS1) at line 238 you find this:

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

Which Ive replaced with

 

<?php

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

echo '<td class="pageHeading">' . HEADING_TITLE . '</td>';

} elseif ($current_category_id) {

echo '<td class="pageHeading">' . HEADING_TITLE . '</td>';

}

?>

 

Now, the first HEADING_TITLE needs to be replaced with whatever the variable name is containing the manufacturers name. The second needs to be replaced with the variable containing the name of the category were in.

 

Ideas?

 

Ta.

Does this smell like chloroform to you?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...