Skip to main content

Styling issue - display of selected variants

More
5 years 3 months ago #333898 by NiallLeavy
-- url of the page with the problem -- : www.niallleavy.com/index.php/hikashop-me...ve-on-white-16-print
-- HikaShop version -- : HikaShop Business 4.4.2 [2105071220]
-- Joomla version -- : 3.9.2
-- Browser(s) name and version -- : Chrome

Hi There,

Hope you can help.

I have set up some products with variants, when the variants are selects, they appear alongside the Product name - somehow a : is inserted.
I am wondering is it possible to supress the : and/or supress the display of the selected variant altogether ?

Screen shot attached.

Many thanks.

N

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

More
5 years 3 months ago #333909 by nicolas
Hi,

You can remove the ":" as well as the variant name after it by adding such CSS:
.hikashop_product_variant_subname { display: none; }
www.hikashop.com/support/documentation/1...ize-the-display.html

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

More
5 years 2 months ago #334305 by NiallLeavy
Many Thanks Nicolas, I have inserted that styling into Custom.css, but it makes no difference - any ideas please ? M

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

More
5 years 2 months ago #334307 by nicolas
Hi,

It works on your website as far as I can see. I suppose that you need to clear your browser's cache to see the change, or we're talking about something else and I need more information on what you want to do.

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

More
5 years 2 months ago #334505 by NiallLeavy
Many thanks for that Nicolas. And If I want to display the variant without the : - that possible too ?

Kind Regards.

M

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

More
5 years 2 months ago #334519 by nicolas
Hi,

If you just want to remove the ":" you can use a translation override of the translation key HIKA_VARIANT_SEPARATOR :
www.hikashop.com/download/languages.html#modify
The following user(s) said Thank You: NiallLeavy

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

More
4 years 9 months ago #337650 by ltempest
Could you explain where in the template overrides this code is used? I've searched the views folder but cannot find any reference to the language code or the span class.

Thanks

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

More
4 years 9 months ago #337655 by nicolas
Hi,

That translation key and that class are used in the file administrator/components/com_hikashop/classes/product.php, in the function checkVariant.
That's the function which is called to automatically fill the variant information with the information from the main product. It is used at many different places: the product page of course, but also when the cart is loaded, when the cart item is modified, when the contact form for a product with variants is used, when a contact email is sent, when the waitlist mechanism is used, etc.
It's done when the data is loaded from the database, not when the information is displayed in the HTML and that's why you can't find it in any view file but in a class file.

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

Time to create page: 0.221 seconds
Powered by Kunena Forum