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