I am trying to make the category image show on all the sub-pages.
In other words, I want the category image to show not only when a customer gets to the category page ([url]Instant Demo - CS-Cart Multi-Vendor Demo Try Free for 15 days) but also in the subcategory page ([url]Instant Demo - CS-Cart Multi-Vendor Demo Try Free for 15 days) and in the product page ([url]Instant Demo - CS-Cart Multi-Vendor Demo Try Free for 15 days)
I’m sure there is somebody out there who knows which part of the code I need to “copy and paste”
Hello,
Your are looking for this:
[url]Search results
I don’t understand what i have to do to insert it??
First, it’s written:
```php
first edit the “core/fn_catalog.php” file
i would put it just above this function
//
// Delete product by its id
//
function fn_delete_product($product_id)
…
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
SubCategory with Images by WebGraphiq
2008/04/19 01:00PM v.1.1.0
Get category image_path by its id
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
function fn_get_category_imagepath($category_id = 0)
{
global $db_tables;
if (!empty($category_id)) {
$image_id = db_get_field("SELECT image_id FROM $db_tables[category_images_links] WHERE category_id=‘$category_id’ ");
$image_id = db_get_field("SELECT image_path FROM $db_tables[category_images] WHERE image_id=‘$image_id’ ");
if (!empty($image_id)) {
return $image_id;
} else {
return “no_image.gif”;
}
}
return false;
}
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
```
????????
I have to cut this :
```php function fn_get_category_imagepath($category_id = 0)
{
global $db_tables;
if (!empty($category_id)) {
$image_id = db_get_field("SELECT image_id FROM $db_tables[category_images_links] WHERE category_id='$category_id' ");
$image_id = db_get_field("SELECT image_path FROM $db_tables[category_images] WHERE image_id='$image_id' ");
if (!empty($image_id)) {
return $image_id;
} else {
return "no_image.gif";
}
}
return false;
} ```
Above this "function fn_delete_product($product_id)" line 423?
Yes?
If you try, can you help me?
Thanks
I cut and paste the 2 files gave in the free package, and add an image for a sub-cat, but no image.
I tried with database or specific files in admin/setting, and use a image present in image-category but nothing appears…
Somebody knows why?
Thanks for your help.
I 'm with 1.5 sp3
Try reading this, darinneagle was the original poster of this mod.
[url]http://forum.cs-cart.com/showthread.php?t=3065[/url]