Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Add Bullet Images v1.0


tobz

Recommended Posts

  • 4 months later...

Hi, thanks for doing the ground work. If you place it slightly lower down and add a 'border="0"' then the bullet will also be clickable. Which I think is more usable.

 

I thought of adding a boolean to switch it on and off in the admin section, mainly just so that I can work out how to that with something simple.

 

INSTRUCTIONS

 

1. Open catalog/includes/boxes/categories.php

2. Find the lines (around line 29) that read

 

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

$categories_string .= '">';

 

3. AFTER this line, add the lines below, making the images part of the hyperlink

4. Copy the .gif files to the catalog/images/category_arrows directory and name them as detailed in the code.

 

 

// BOF: KA Add Bullet Images v1.1 - based on Toby Adams' Add Bullet Images v1.0 Contrib http://www.oscommerce.com/community/contributions,568

// possibly add in a bool to switch on or off and add as standard to ms build

   if (tep_has_category_subcategories($counter)) {

    if ( ($id) && (in_array($counter, $id)) ) {

         // category expanded

  	 $categories_string .= '<img src="images/category_arrows/arrow_expanded.gif" align="absmiddle" border="0"> ';

       } else {

     // category collapsed

         $categories_string .= '<img src="images/category_arrows/arrow_collapsed.gif" align="absmiddle" border="0"> ';

       }

} else {

  // category's children

 $categories_string .= '<img src="images/category_arrows/arrow_bullet.gif" align="absmiddle" border="0"> ';

}

// EOF: KA - Add Bullet Images v1.1

K

.....................................................................

When the going get's tough,

the tough get going.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...