Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 783 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Prestashop - default category image

#1
Prestashop version 1.6.9

Unfortunately I have lots of categories that don't have pictures so the page looks when browsing category like this
.
Another weird thing is that the picture is returned with 404 status code.

Now, I want to use some default image when there is no special image for category.

How can I achieve this?

Reply

#2
That's kind of strange, because that image is used everywhere, where the image is set, but doest exist in file.

The image used here is `img/404.gif`, but if you change it, it will be used in other places too.

If you want to change category images (sub-category images I assume?) then you should modify the template files of your theme and add a link to your custom image. For example,

themes/default-bootstrap/category.tpl @ Line: 80

{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}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
{/if}
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through