View Issue Details

IDProjectCategoryView StatusLast Update
0006563OXID eShop (all versions)Generalpublic2024-04-17 07:38
Reportervanilla thunder Assigned To 
Status resolvedResolutionfixed 
Fixed in Version7.0.0 
Summary0006563: getImageUrl() is bad for Shop Logos!
DescriptionURLs for all shop logos (Website and Emails) are provided by function oxViewConfig->getImageUrl(), which is very bad because of these two reasons:

1) image is expected to be in out/flow/img/ folder, but shop logos are clearly not a part of the template. Shop owners might seasonally change their logos (e.g. for christmas) by editing theme config in shop. Therefore shop logo should be placed somewhere in out/pictures/, i suggest wysiwigpro/ since it is used by filemanagers.

2) since getImageUrl() expects theme/template related images, it always assumes that this file exists. If this file does not exist (e.g. someone deleted christmas themed logo from the server but did not change theme config param), this function returns empty string, which results in an empty image tag <img src="" /> which loads the start page and doubles page loading time and size. This is very bad!

Right now i use [{$oViewConf->getPictureDir()|cat:'wysiwigpro/'|cat:$slogoImg}] in my templates, but it is very dirty.
oxConfig->getPictureUrl() should be used for content related images, but there is currently no implementation in oxViewConfig or oxUBase / oxView.
So need a getPictureUrl() in oxViewConfig first.
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined



2024-04-03 08:21

administrator   ~0016687

Moved from flow theme project to OXID and classified as feature request.
For most shops the usage of this function is fine, but for some shops it would be a useful feature to load the logo from the Media Library.


2024-04-17 07:38

administrator   ~0016775

With the media library for OXID 7.0 you can now use something like <img src='{{ oViewConf.getMediaUrl() }}logo.png' /> to include a logo from the media library instead.