variants coloricon doesn't appear on main

  • Posts: 2
  • Thank you received: 0
1 day 14 hours ago #366617

-- HikaShop version -- : 5.1.5 starter
-- Joomla version -- : 5.2.5
-- PHP version -- : 8.2.27
-- Browser(s) name and version -- : chrome/ vivaldi

I followed your guide to filter products by color and I’m able to get the desired result. However, I’m experiencing an issue: in the variants section, on the main tab, instead of seeing the image of the colored variant, I see the raw HTML code with the onclick event. In your tutorial, the colored image is clearly visible, so I’m wondering if I might have misconfigured something.

I also tried to reproduce the issue on your demo site, and I noticed the same behavior there: the HTML code is shown instead of the image. Please note that the image displays correctly in the variant list—it’s only in the individual variant menu that the image is missing.

Thank you in advance for your response.

Attachments:

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

  • Posts: 83590
  • Thank you received: 13528
  • MODERATOR
1 day 10 hours ago #366619

Hi,

HikaShop uses Joomla's library to display many elements of the interface, including the dropdowns.
Usually, in HTML, img tags are not allowed in the option elements of a select element.
Now, some browsers try to honor them.
The screenshots on our tutorial were made with Joomla 3.
Because of all this, the img tags were rendered in this dropdown.
Since Joomla 3, Joomla reinforced its library and automatically HTMLentities the text of the options to avoid any possible problem and conform to HTML standards.
And since HikaShop uses Joomla's library for that dropdown, you see the HTML code of the value in the dropdown selector instead of the image being displayed.

Now, you might wonder why you don't have that same issue with other selectors, like the selector when adding variants ( www.hikashop.com/images/stories/tutorial...displaycolor1531.png ). That's because these are not standard HTML dropdowns. These are fake dropdowns made with HTML, CSS and javascript to look similar to dropdowns, so that we can have special features which are not possible with normal pure HTML dropdowns. And so they are not constrained by the limitation above.

A solution would be to change the dropdowns there, to use our "fake" dropdowns. That would fix the problem.
Thank you for your feedback on this.
We'll look at improving this for the next version of HikaShop.

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

  • Posts: 2
  • Thank you received: 0
1 day 7 hours ago #366621

Thank you very much for your reply

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

Time to create page: 0.048 seconds
Powered by Kunena Forum