Page 1 of 1

Category Images

Posted: Tue Jul 27, 2021 6:10 pm
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?

Re: Category Images

Posted: Wed Jul 28, 2021 9:32 am
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.

Re: Category Images

Posted: Wed Jul 28, 2021 12:32 pm
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.

Re: Category Images

Posted: Wed Jul 28, 2021 1:01 pm
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.

Re: Category Images

Posted: Wed Jul 28, 2021 3:15 pm
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!