Badges on Category Images

  • Posts: 52
  • Thank you received: 4
  • Hikashop Multisite
2 years 4 months ago #345333

-- url of the page with the problem -- : www.autovakshop.nl

I know it's possible to place badges on products (in product view), but I also like to place badges on category images.
Is that possible?

Please Log in or Create an account to join the conversation.

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 4 months ago #345336

Hi,

There is no option for that by default in HikaShop.
You could create a custom field of the table "category" and of the type "ajax image" so that you could add badge images to categories.
Then, with a bit of PHP code in a view override and a bit of CSS to place the image from the custom field on top of the category image on the listing, it should be doable. So with basic PHP/CSS skills, it should be possible.
Now, to have something more generic, like for example the possible to display several badges on a category, the possibility to have restrictions, like only display the badge if all the products in the category are out of stock, etc, that would be way more complex.

Please Log in or Create an account to join the conversation.

  • Posts: 52
  • Thank you received: 4
  • Hikashop Multisite
2 years 4 months ago #345367

Thanks Nicolas,

can't I reuse somethng like this on categories?

if(!empty($this->element->badges))
$html .= $this->classbadge->placeBadges($this->image, $this->element->badges, '0', '0',false);

Please Log in or Create an account to join the conversation.

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 4 months ago #345369

Unfortunately, it's not that easy because the $this->element->badges variable is not available for a category because categories don't have badges in HikaShop normally.

Please Log in or Create an account to join the conversation.

  • Posts: 461
  • Thank you received: 36
2 years 4 months ago #345989

Hi guys,

+1 to have the "Badges feature" working also for Category

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum