Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Categories Images


rkr31

Recommended Posts

I have sts4 installed and am trying to remove the category images from the top of each page. I want only the categories info box on the side. Is this possible with sts? I found one contribution that told you how to stop displaying them, but this talked of editing index.php in the catalog root which to my understanding is not used when using sts?

 

Any ideas? Or was i wrong to assume that index.php is no longer used and can therefore use this contribution

 

http://www.oscommerce.com/community/contributions,1845/

Link to comment
Share on other sites

I have sts4 installed and am trying to remove the category images from the top of each page. I want only the categories info box on the side. Is this possible with sts? I found one contribution that told you how to stop displaying them, but this talked of editing index.php in the catalog root which to my understanding is not used when using sts?

 

Any ideas? Or was i wrong to assume that index.php is no longer used and can therefore use this contribution

 

http://www.oscommerce.com/community/contributions,1845/

I found this contribution to work well with STS v4:

 

 

 

Here is a simple tip that may help you get rid of the images as well as get rid of some of the "canned" catagory titles.

 

 

 

Also: Try posting any STS questions in the STS v4 forum for all to benefit from the responses.

 

 

 

To get rid of "Let's See What We Have Here" for your Categories and Sub-Categories, you can replace them with the name of the categories or subcategories name.

 

 

 

Here is how I hacked the OsCommerce code to do it:

 

 

 

Open the following file in a text editor:

/yourstore/index.php

 

 

 

Do a search for the following line of code:

 

<?php echo HEADING_TITLE; ?>

You will find three instances of each. Do the following:

 

To see the name of your CATAGORIES instead of "let's see what we have here" text,

just replace the first instance of the code:

 

<?php echo HEADING_TITLE; ?>

with the following:

<?php echo $category['categories_name'] ?>

To also have SUBCATEGORIES displayed dynamically as the CATAGORIES above, just replace the second instance of the code:

<?php echo HEADING_TITLE; ?>

with the following:

<?php 
 $category_query1 = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
  $category1 = tep_db_fetch_array($category_query1);

if ($category1['categories_name'] != "") {echo $category1['categories_name'];} else { echo HEADING_TITLE;} 
?>

The third

<?php echo HEADING_TITLE; ?>

should be left alone so you do not need to modify it at all.

 

Don't forget to save your document as the same name as the original index.php. That's all there is to it.

If this is too daunting, or if you run into problems, let me know. Since I haven't useed this hack in a long time, I ran it on a test store and everything worked perfectly. :thumbsup:

 

Good luck,

Bill Kellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Hi

 

Thanks for the response. What you answered was not what i was after this time, however it did answer what was going to be my next question so thank you very much :-)

 

What i am after at the moment is a way of not displaying the category images in the main info box. An example would be if you had a category called 'Software' and within that you had 20 sub-categories. If you select the 'Softrware' category from the $categorybox menu it will display an image and heading of all 20 of the sub-categories as well as a list of products in the main info box. What i want is to get rid of the 20 images and titles of the sub-categories. You can see them ok in the $categorybox menu so i see no need to have them clutter up the main info box.

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...