Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help for Category images


kahlenberg

Recommended Posts

Dear forum members,

I have ocCommerce v2.2 RC2. There is 3-level deepth categories, the categories except the last caegories have no items. I want to update the pictures of the last categories with the image of the first item in that category. I want to make it with MySQL. Please help.

 

cat1
|
+--sub_cat1
|   |
|   +-- sub_subcat1 (8)
|   +-- sub_subcat2 (7)
|   
+--sub_cat2
|
cat2
|
+--sub_cat3
+--sub_cat4
|
cat3
...

 

For example, I want to create an image for sub_subcat1 with the image of the first item in this category (sub_subcat1). How can I make it with SQL commands?

Thanks.

Link to comment
Share on other sites

That will be a road to futility.

 

There is no defined 'first product' in a category. All the products are in a category and the sort order determines which product will be shows first in different pages.

 

If using the same image, then the deletion of the product will also delete the image from the category, but will leave a broken image as opposed to just not having an image.

 

Your best bet is to just upload custom images to your categories, even if that image is also a product image with a different name.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

  • 5 months later...

Archived

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

×
×
  • Create New...