[-] CORE : fixed bug #PSCFV-6555 - Custom theme not working properly with image size
This commit is contained in:
@@ -143,13 +143,16 @@ class ImageTypeCore extends ObjectModel
|
||||
{
|
||||
$theme_name = Context::getContext()->shop->theme_name;
|
||||
$name_without_theme_name = str_replace(array('_'.$theme_name, $theme_name.'_'), '', $name);
|
||||
|
||||
//check if the theme name is already in $name if yes only return $name
|
||||
if (strstr($name, $theme_name) && self::getByNameNType($name))
|
||||
return $name;
|
||||
else if (self::getByNameNType($name_without_theme_name.'_'.$theme_name))
|
||||
return $name_without_theme_name.'_'.$theme_name;
|
||||
else
|
||||
else if (self::getByNameNType($theme_name.'_'.$name_without_theme_name))
|
||||
return $theme_name.'_'.$name_without_theme_name;
|
||||
else
|
||||
return $name_without_theme_name;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user