Category Images

Ask the community for help and support.
Post Reply
shopify
Posts: 54
Joined: Tue Mar 30, 2021 3:36 pm
Has thanked: 23 times
Been thanked: 3 times

Category Images

Post by shopify »

Hello All,

I want to amend my categories.php file to save category images to catalog/images/category

I'd amended it by changing this:

const DIR_FS_CATALOG_IMAGES = DIR_FS_CATALOG . 'images/';

to const DIR_FS_CATALOG_IMAGES = DIR_FS_CATALOG . 'images/category/';

This worked except now I had a problem - my product images were now being saved in images/category/. I had no idea product images and category images used the same file I'd amended.

So how would I go about achieving this?
burt
Lead Developer
Lead Developer
Posts: 2423
Joined: Tue Oct 29, 2019 9:37 am
Has thanked: 49 times
Been thanked: 137 times

Re: Category Images

Post by burt »

You made a global change. You need this in a specific place.

You would
(a) undo what you did in the configuration file
and
(b) amend the relevant piece of code in admin/categories.php file.
Gamechanger Addon: Queued Emails, try before you buy.
shopify
Posts: 54
Joined: Tue Mar 30, 2021 3:36 pm
Has thanked: 23 times
Been thanked: 3 times

Re: Category Images

Post by shopify »

burt wrote: Wed Jul 28, 2021 9:32 am You made a global change. You need this in a specific place.

You would
(a) undo what you did in the configuration file
and
(b) amend the relevant piece of code in admin/categories.php file.
I think there is come confusion about the file I amended. To clarify, it was the admin/categories.php file that I made my change and not the configuration file.
burt
Lead Developer
Lead Developer
Posts: 2423
Joined: Tue Oct 29, 2019 9:37 am
Has thanked: 49 times
Been thanked: 137 times

Re: Category Images

Post by burt »

Probably.

If you're able to amend that core code, you are able to amend other core code, right?
Have a think and have a go.

I prefer to show people how to fish, rather than give them a fish.
Gamechanger Addon: Queued Emails, try before you buy.
shopify
Posts: 54
Joined: Tue Mar 30, 2021 3:36 pm
Has thanked: 23 times
Been thanked: 3 times

Re: Category Images

Post by shopify »

burt wrote: Wed Jul 28, 2021 1:01 pm Probably.

If you're able to amend that core code, you are able to amend other core code, right?
Have a think and have a go.

I prefer to show people how to fish, rather than give them a fish.
Fair enough. Done and working perfectly!
Post Reply