magento-lts icon indicating copy to clipboard operation
magento-lts copied to clipboard

New feature: Upload logo from backend

Open warleyelias opened this issue 3 years ago • 22 comments

Description (*)

This PR allows to change both header and small logos by uploading from the Backend. It is much easier than put a image on /skin folder and configure the path in Backend.

I created a validation that allows to continue using the skin image until next logo change, put a default OpenMage logo on default folder for new installation.

Manual testing scenarios (*)

  1. In Backend go to System > Configurations.
  2. In Design > Header section there are two new upload buttons for [Logo Image Src] and [Logo Small Image Src].
  3. Upload the new images and reload the Frontend.

Contribution checklist (*)

  • [x] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [x] All automated tests passed successfully (all builds are green)
  • [x] Add yourself to contributors list

warleyelias avatar Sep 08 '22 17:09 warleyelias

thanks for you contrib, I think we already have the same PR https://github.com/OpenMage/magento-lts/pull/1068

fballiano avatar Sep 08 '22 20:09 fballiano

Nowadays we've multiple logos (2x, 3x, mobile, desktop) so my question is, does uploading the logo makes sense today?

fballiano avatar Sep 28 '22 18:09 fballiano

@fballiano - It's a feature that doesn't actually help today. I would close it like the other one.

addison74 avatar Sep 28 '22 18:09 addison74

does this allow uploading of SVG logos?

fballiano avatar Dec 30 '22 19:12 fballiano

does this allow uploading of SVG logos?

I didn't test for that file extensions but if not I can change to allow that.

warleyelias avatar Dec 30 '22 19:12 warleyelias

With #1068 closed I can test this PR. @warleyelias - Please update it for SVG uploads too.

Is there any label that needs translations?

addison74 avatar Dec 30 '22 19:12 addison74

I would replace the 2 bundled GIF files with just one SVG (which is probably already somewhere in the repo)

fballiano avatar Dec 30 '22 19:12 fballiano

actually I wouldn't bundle another logo image, I'd remove the 2 GIFs and use the SVGs that are already in the repo

fballiano avatar Dec 30 '22 19:12 fballiano

@ADDISON74 @fballiano yes it helps, if the logo is managed by people without file access. Maybe even people who have only access to specific websites or storeviews in case of multi national organisations.

Flyingmana avatar Dec 30 '22 19:12 Flyingmana

Today in 2023 only having 1 single logo is never sufficient, unless it's an SVG.

The access to a single website/storeview was only available in the enterprise edition.

fballiano avatar Dec 30 '22 19:12 fballiano

The access to a single website/storeview was only available in the enterprise edition.

I know of CE shops having this, too

Flyingmana avatar Dec 30 '22 19:12 Flyingmana

allowing SVG upload could be more complicated than expected, because of Mage_Core_Model_File_Validator_Image::validate()

fballiano avatar Dec 30 '22 19:12 fballiano

Can we continue w/o SVG support?

sreichel avatar Jan 04 '23 01:01 sreichel

It's a feature that doesn't actually help today. I would close it like the other one.

I did not test it (yet), but if it just allows to upload logos from backend ... its a good addition imho.

sreichel avatar Jan 04 '23 03:01 sreichel

Can we continue w/o SVG support?

I would say yes, it can be added separately

Flyingmana avatar Jan 04 '23 06:01 Flyingmana

I've rebased this PR and fixed the license docblock.

I think we shouldn't bundle those 2 images (if possible) because it will be in conflict with the new RWD logos in the next branch but also because it shouldn't be necessary (logo is already present in the repo)

Please let's fix, accept or close.

fballiano avatar May 15 '23 20:05 fballiano

There are a lot of extensions out there FOC for this feature. Here is one of them https://github.com/mobweb/MobWeb_LogoUpload.

addison74 avatar Jul 14 '23 15:07 addison74

@kiatng between #2580 and #3726 which one do you like more? let's keep one open and close the other since we can't work on two anyway.

fballiano avatar Feb 07 '24 09:02 fballiano

@kiatng between #2580 and #3726 which one do you like more? let's keep one open and close the other since we can't work on two anyway.

#2580 seems cleaner.

kiatng avatar Feb 08 '24 02:02 kiatng

copyright headers are all wrong in this PR, I'll try to fix them asap

fballiano avatar Feb 08 '24 08:02 fballiano

finally all green, will start testing ASAP

notes: I wouldn't have GIFs logo

fballiano avatar Feb 08 '24 09:02 fballiano

notes: I wouldn't have GIFs logo

I agree.

addison74 avatar Feb 08 '24 10:02 addison74