Jump to content

Subcategory Defualt Image large


Braini

Recommended Posts

Hey
 
I'm trying to show the sucategory images in large. Therefor I adjusted in the category.tpl the following code:

 

{if $subcategory.id_image}
                    <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html':'UTF-8'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
                    {else}                            
                    <img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> 

 

To this code:

 

 

{if $subcategory.id_image}

<img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'large_default')|escape:'html':'UTF-8'}" alt="" width="{$largeSize.width}" height="{$largeSize.height}" />
                    {else}                            
                    <img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />

 

In this case the images are shown correct, but the default image is not more shown, only a question mark. Why is this happening?

And when  I change this code...

 

 

<img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />

 

...to a custom default jpg but nothing happens. What am I doing wrong? Anybody an idea?

 

post-1281624-0-37338600-1484289962_thumb.jpg

Link to comment
Share on other sites

Yes it's there. As you see in the picture attached the large subcategory images are displayed. But if there is no subcategory image uploaded to prestashop, it should refer to the {$lang_iso}-default-medium_default.jpg image, which is not working...

Link to comment
Share on other sites

Great this was it. Thanks a lot.

 

The de-default-large_default.jpg was not in the folder. Now its working. But there is still one strange thing:

 

When I inspect the element, the image is refering to the de-default-large_default.jpg. Shoulden't it refer to the de-default-medium_default.jpg as it is written in the category.tpl file?

 

<img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...