[Skip to main content](#vessel-content)

#   Different CSS class for Product Name and Variant

##

- **[Nello](/forum/user/1361-nello "View Nello's Profile")**
- [![Nello's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1361-nello "View Nello's Profile") Topic Author
- [ Offline](/forum/user/1361-nello)

Less More

- Posts: 251
- Thank you received: 2
-
-

15 years 5 months ago [\#18022](#18022) by [Nello](/forum/user/1361-nello "View Nello's Profile")  *[Different CSS class for Product Name and Variant](/forum/4-how-to/18022-different-css-class-for-product-name-and-variant#18022 "Hi Nicolas, How can I set different css class for the Product Name and the Name of the Variant in the product pages?  Here an example:   www.nellopoli.com/hidesign/it/in-esposiz...-0/related&#95;product-1  Pick Chair Legno Rovere: Pick Chair is the name of the product and Legno Rovere is the name of the variant  I need to set different css style for &quot;Legno Rovere&quot;.  Thank you so much!")* was created by *[Nello](/forum/user/1361-nello "View Nello's Profile")*

Hi Nicolas,
How can I set different css class for the Product Name and the Name of the Variant in the product pages?

Here an example:
[ www.nellopoli.com/hidesign/it/in-esposiz...-0/related\_product-1](http://www.nellopoli.com/hidesign/it/in-esposizione/product/show/cid-87/name-pick-chair/category_pathway-0/related_product-1)

Pick Chair Legno Rovere:
Pick Chair is the name of the product and Legno Rovere is the name of the variant

I need to set different css style for "Legno Rovere".

Thank you so much!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE4MDIyLWRpZmZlcmVudC1jc3MtY2xhc3MtZm9yLXByb2R1Y3QtbmFtZS1hbmQtdmFyaWFudD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

15 years 5 months ago -  15 years 5 months ago [\#18028](#18028) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Different CSS class for Product Name and Variant](/forum/4-how-to/18022-different-css-class-for-product-name-and-variant#18028 "Hi Nicolas, How can I set different css class for the Product Name and the Name of the Variant in the product pages?  Here an example:   www.nellopoli.com/hidesign/it/in-esposiz...-0/related&#95;product-1  Pick Chair Legno Rovere: Pick Chair is the name of the product and Legno Rovere is the name of the variant  I need to set different css style for &quot;Legno Rovere&quot;.  Thank you so much!")*

The only solution is to modify a core file of HikaShop. You need to change the line:
$variant-&gt;product_name = $variant-&gt;main_product_name.': '.$variant-&gt;product_name;
to:
$variant-&gt;product_name = $variant-&gt;main_product_name.': &lt;span class="hikashop_product_variant_subname"&gt;'.$variant-&gt;product_name.'&lt;/span&gt;';
in the file administrator/components/com_hikashop/classes/product.php
Let us know how that goes. We might include it in the future if it works properly with the rest of the shop.

Last edit: 15 years 5 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE4MDIyLWRpZmZlcmVudC1jc3MtY2xhc3MtZm9yLXByb2R1Y3QtbmFtZS1hbmQtdmFyaWFudD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Nello](/forum/user/1361-nello "View Nello's Profile")**
- [![Nello's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1361-nello "View Nello's Profile") Topic Author
- [ Offline](/forum/user/1361-nello)

Less More

- Posts: 251
- Thank you received: 2
-
-

15 years 5 months ago [\#18032](#18032) by [Nello](/forum/user/1361-nello "View Nello's Profile")  Replied by *[Nello](/forum/user/1361-nello "View Nello's Profile")* on topic *[Re: Different CSS class for Product Name and Variant](/forum/4-how-to/18022-different-css-class-for-product-name-and-variant#18032 "Hi Nicolas, How can I set different css class for the Product Name and the Name of the Variant in the product pages?  Here an example:   www.nellopoli.com/hidesign/it/in-esposiz...-0/related&#95;product-1  Pick Chair Legno Rovere: Pick Chair is the name of the product and Legno Rovere is the name of the variant  I need to set different css style for &quot;Legno Rovere&quot;.  Thank you so much!")*

What is the file to modify?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE4MDIyLWRpZmZlcmVudC1jc3MtY2xhc3MtZm9yLXByb2R1Y3QtbmFtZS1hbmQtdmFyaWFudD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

15 years 5 months ago [\#18034](#18034) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Different CSS class for Product Name and Variant](/forum/4-how-to/18022-different-css-class-for-product-name-and-variant#18034 "Hi Nicolas, How can I set different css class for the Product Name and the Name of the Variant in the product pages?  Here an example:   www.nellopoli.com/hidesign/it/in-esposiz...-0/related&#95;product-1  Pick Chair Legno Rovere: Pick Chair is the name of the product and Legno Rovere is the name of the variant  I need to set different css style for &quot;Legno Rovere&quot;.  Thank you so much!")*

Sorry for that ! It's administrator/components/com_hikashop/classes/product.php

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE4MDIyLWRpZmZlcmVudC1jc3MtY2xhc3MtZm9yLXByb2R1Y3QtbmFtZS1hbmQtdmFyaWFudD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Nello](/forum/user/1361-nello "View Nello's Profile")**
- [![Nello's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1361-nello "View Nello's Profile") Topic Author
- [ Offline](/forum/user/1361-nello)

Less More

- Posts: 251
- Thank you received: 2
-
-

15 years 5 months ago [\#18035](#18035) by [Nello](/forum/user/1361-nello "View Nello's Profile")  Replied by *[Nello](/forum/user/1361-nello "View Nello's Profile")* on topic *[Re: Different CSS class for Product Name and Variant](/forum/4-how-to/18022-different-css-class-for-product-name-and-variant#18035 "Hi Nicolas, How can I set different css class for the Product Name and the Name of the Variant in the product pages?  Here an example:   www.nellopoli.com/hidesign/it/in-esposiz...-0/related&#95;product-1  Pick Chair Legno Rovere: Pick Chair is the name of the product and Legno Rovere is the name of the variant  I need to set different css style for &quot;Legno Rovere&quot;.  Thank you so much!")*

There is no line with that code in that file...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE4MDIyLWRpZmZlcmVudC1jc3MtY2xhc3MtZm9yLXByb2R1Y3QtbmFtZS1hbmQtdmFyaWFudD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86561
- Thank you received: 14307
-
-

15 years 5 months ago [\#18036](#18036) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Different CSS class for Product Name and Variant](/forum/4-how-to/18022-different-css-class-for-product-name-and-variant#18036 "Hi Nicolas, How can I set different css class for the Product Name and the Name of the Variant in the product pages?  Here an example:   www.nellopoli.com/hidesign/it/in-esposiz...-0/related&#95;product-1  Pick Chair Legno Rovere: Pick Chair is the name of the product and Legno Rovere is the name of the variant  I need to set different css style for &quot;Legno Rovere&quot;.  Thank you so much!")*

Then it means that you don't have the latest version. Please update.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE4MDIyLWRpZmZlcmVudC1jc3MtY2xhc3MtZm9yLXByb2R1Y3QtbmFtZS1hbmQtdmFyaWFudD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Nello](/forum/user/1361-nello "View Nello's Profile")**
- [![Nello's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1361-nello "View Nello's Profile") Topic Author
- [ Offline](/forum/user/1361-nello)

Less More

- Posts: 251
- Thank you received: 2
-
-

15 years 5 months ago [\#18041](#18041) by [Nello](/forum/user/1361-nello "View Nello's Profile")  Replied by *[Nello](/forum/user/1361-nello "View Nello's Profile")* on topic *[Re: Different CSS class for Product Name and Variant](/forum/4-how-to/18022-different-css-class-for-product-name-and-variant#18041 "Hi Nicolas, How can I set different css class for the Product Name and the Name of the Variant in the product pages?  Here an example:   www.nellopoli.com/hidesign/it/in-esposiz...-0/related&#95;product-1  Pick Chair Legno Rovere: Pick Chair is the name of the product and Legno Rovere is the name of the variant  I need to set different css style for &quot;Legno Rovere&quot;.  Thank you so much!")*

It works great!!!

Thank you!

[ www.nellopoli.com/hidesign/it/in-esposiz...r/category\_pathway-0](http://www.nellopoli.com/hidesign/it/in-esposizione/product/show/cid-1/name-flux-chair/category_pathway-0)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE4MDIyLWRpZmZlcmVudC1jc3MtY2xhc3MtZm9yLXByb2R1Y3QtbmFtZS1hbmQtdmFyaWFudD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.057 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
