- Posts: 431
- Thank you received: 19
Show multiple badges in top right corner – Determined
Hi I want to add several badges in the top right corner but only one is displayed. Can some badges appear in this area?
I found out how to make new positions. It will not be bad to make several positions in a corner.
Please Log in or Create an account to join the conversation.
If you place several badges in the same place, you could have some "overlap" issues, one badge can be hover another and you might not see it.
But there is nothing in the badge system which would block you to have several badges for the same position.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
I found same issue, and it is not only visibiity issue.
I have two categories (New and Action for example) and two assigned badges. If I assign product to one of these categories,
one badge is displayed correctly, if to both again only one badge is displayed. If changed position of one badge, both are displayed.
Try this on demo, just assign any of products to New products and Discount 10%.
Is there solution for this?
thanks
Pavel
Please Log in or Create an account to join the conversation.
seems the problem is in hikashopBadgeClass::placeBadges - for each position only one badge (with lowest ordering) is diaplyed.
Pavel
Please Log in or Create an account to join the conversation.
administrator/components/com_hikashop/classes/badge.php
replace line 217 - 232
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Simpler solution is to override views (product/show_block_img.php and product/listing_img_title.php) and use own placeBadges.
As I do not need to care abut offset settings, I simplified the function a lot and used custom CSS.
Pavel
Please Log in or Create an account to join the conversation.
I agree with n3t ; and regarding your needs, it might want to use a product custom field to store the data of the "badges" instead of using the badge system.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Jerome wrote: Hello,
I agree with n3t ; and regarding your needs, it might want to use a product custom field to store the data of the "badges" instead of using the badge system.
Regards,
Hi, can you explain in detail how it works. It's really annoying to change this file every time.
Please Log in or Create an account to join the conversation.
1/ in your template create folder helpers
2/ Put in this folder file named hikashop.php and enter this content
4/ Click on show_block_img in column fFile in row with your template.
5/ Search for this code
7/ do the same for listing_img_title or any other file you need.
Pavel
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.