Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to change the '->' in the categories menu to an arrow pic?


bignose

Recommended Posts

Posted

Hi, there,

 

In the original template, there is '->' in the product categories menu. I want to change it to an arrow picture, for example, arrow.gif. What should I do? Thanks a million! :)

Posted

its everything in that same file. The category by default is set to a bold font if you look for:

$categories_string .= '<b>';

$categories_string .= '</b>';

 

you could add some html there to highlight it or change the font color etc.

Posted
its everything in that same file. The category by default is set to a bold font if you look for:

$categories_string .= '<b>';

$categories_string .= '</b>';

 

you could add some html there to highlight it or change the font color etc.

 

Hi, Enigma,

 

I followed what you said, and I almost succeeded..... :rolleyes:

 

However, the arrow picture is now ahead of the category name, not behind the category name. What mistake did I make?

 

I really appreciate your help!

 

Bignose

Posted
post the code that you changed.

 

First, delete this:

if (tep_has_category_subcategories($counter)) {

$categories_string .= '-> </b>';

 

Second, find this:

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new);

$categories_string .= '">';

 

Third, after the line above, add this:

$categories_string .= tep_image(DIR_WS_IMAGES . 'arrow_right.gif', 'submenu') . ' ';

 

Is that correct?

 

Bignose

Posted

yea this last part has to be changed

 

$categories_string .= tep_image(DIR_WS_IMAGES . 'arrow_right.gif', 'submenu') . ' ';

 

to

$categories_string .= . ' ' . tep_image(DIR_WS_IMAGES . 'arrow_right.gif', 'submenu');

 

right after

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

Posted
yea this last part has to be changed

 

$categories_string .= tep_image(DIR_WS_IMAGES . 'arrow_right.gif', 'submenu') . ' ';

 

to

$categories_string .= . ' ' . tep_image(DIR_WS_IMAGES . 'arrow_right.gif', 'submenu');

 

right after

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

 

 

OOOPs, this doesn't work.

 

The error information is: Parse error: parse error, unexpected '.' in /public_html/shopping/templates/Original/boxes/categories.php on line 62

:blink:

Posted
OOOPs, this doesn't work.

 

The error information is: Parse error: parse error, unexpected '.' in /public_html/shopping/templates/Original/boxes/categories.php on line 62

:blink:

It seems that it is not .' ', but just ' '

 

After delete the '.', there is no parse error. However, the arrow is still ahead of the category name.

Posted
It seems that it is not .' ', but just ' '

 

After delete the '.', there is no parse error. However, the arrow is still ahead of the category name.

 

Finally made it! :D

 

I listed the steps below for other guys who have same question.

 

First, delete this:

if (tep_has_category_subcategories($counter)) {

$categories_string .= '-> </b>';

 

 

Second, find this:

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

 

Third, after the line above, add this:

$categories_string .= tep_image(DIR_WS_IMAGES . 'arrow_right.gif', 'submenu') . ' ';

 

Then, it works!

Here, the 'arrow_right.gif' should be replaced by your image name. 'submenu' could be replaced by whatever you like. The image should be placed in the images folder first.

 

Many thanks for Enigma!

Archived

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

×
×
  • Create New...