Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Linking an image to category


Lobster101

Recommended Posts

Posted

Hi all.

 

Was just wondering is the some way i can connect an image on my website to a specific category in my website?? I'm using oscommerce 2.2 ms2.

 

many thanks!!

Posted

If by website you mean a standard html page then the standard <a href="http://put_your_category_page_url_here><img scr="http://put_your_image_url_here></a> should do it

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Posted

If you are talking anout linking from a page within osc then you must use the tep_href_link() function like so.

<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=5') . '">' . tep_image(DIR_WS_IMAGES . 'your_image_here.gif', 'alt text here') . '</a>'; ?>

You will need to find out what category path you need and replace 5 with yours in this part

'cPath=5'

Posted

You can do it from the admin. Choose the image you want to use on your website. Then go to admin panel and edit the category you wish to connect to that image. The upload that image using the buttons in the edit category panel. Voila!

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Posted

If you are talking anout linking from a page within osc then you must use the tep_href_link() function like so.

<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=5') . '">' . tep_image(DIR_WS_IMAGES . 'your_image_here.gif', 'alt text here') . '</a>'; ?>

You will need to find out what category path you need and replace 5 with yours in this part

'cPath=5'

 

Thank you. This is exactly what i need. I have managed to link one image to the desired category and it works!!! ... But I can't seem to find the cPaths to the other images i wish to link.

My website shows it to be located index.php?cPath=31_36 but i've looked in the index.php and there is no sign of it. Does anyone know where i can track down this cpath=31_36 ????

 

thank you.

Posted

oooh... I FOUND IT, I FOUND THE TEP_HREF_LINK FUNCTIONS I NEEDED!!

 

public.html/includes/column_right.php

 

Thanks so much!!!! bye!!

Posted

Another way to find which images are being used by which categories is to look in the database in the 'categories' table. In the field 'categories_image' will be the name of the actual image that is in the images folder on your website. While you are in the database note the cooresponding number in the 'categories_id' . You should have a 31_36 in the column under 'categories_id' , look over one column to get the image name.

 

You can get the categories_id by simply clicking open that catagory in our website. In the address bar note the number after 'cPath'

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Posted

Another way to find which images are being used by which categories is to look in the database in the 'categories' table. In the field 'categories_image' will be the name of the actual image that is in the images folder on your website. While you are in the database note the cooresponding number in the 'categories_id' . You should have a 31_36 in the column under 'categories_id' , look over one column to get the image name.

 

You can get the categories_id by simply clicking open that catagory in our website. In the address bar note the number after 'cPath'

 

Thank you for your message!! very helpful, cheers x !!

Archived

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

×
×
  • Create New...