Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding a gif


Cat_walk

Recommended Posts

I have a small gif that i want to add to side of my product list for each product. But when I go into the stylesheets to add it in, it won't appear. I am trying to place it in the wrong place.

 

example:

 

gif. Product

 

gif. Product

 

etc.........

 

Anyone know how?

Link to comment
Share on other sites

If you are trying to associate a small graphic with a categorie you dont need to do this in the .css you can add the image int the admin panel>catalog>categories/products click on that categorie you wish to add an image for hit edit and add your image.

Link to comment
Share on other sites

Nicole,

 

In your categories.php (shop/includes/boxes/), look for this:

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= "  ";

}

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

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

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

 

Add:

 

if (tep_has_category_subcategories($counter)) {

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

}

else {

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

}

 

Just change the .gif to whatever image you have uploaded to your images directory...It should look like this (the first 40 or so lines):

 

<?php

/*

$Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

 

changed August 2003, by Nils Petersson

contribution "Category Box Enhancement", version 1.1

 

*/

 

function tep_show_category($counter) {

 

// BoF - Contribution Category Box Enhancement 1.1

global $tree, $categories_string, $cPath_array, $cat_name;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= "  ";

}

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

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

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

 

if (tep_has_category_subcategories($counter)) {

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

}

else {

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

}

 

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

$categories_string .= '<b>';

}

 

if ($cat_name == $tree[$counter]['name']) {

$categories_string .= '<span class="errorText">';

}

 

Good luck. :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...