Styling for product display name

  • Posts: 43
  • Thank you received: 0
11 years 6 months ago #127457

-- url of the page with the problem -- : chriswisephotography.com/index.php/For-S...er-night-s-fair.html
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 2.5
-- PHP version -- : x5.2


I had a question regarding how a product displays the name of the product when adding characteristics. I have a few products that have 3 or 4 characteristics and I'd like to change how they are displayed in the product title. Is it possible to add them smaller to a second line? I'm assuming it's a CSS edit but not sure where.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #127460

Hi,

You have to apply your css on the class hikashop_product_variant_subname
Some css like:

.hikashop_product_variant_subname{
    display: block;
    font-size: 12px;
}
Here is a tutorial on how to customize the layout:
www.hikashop.com/support/documentation/1...ize-the-display.html

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

  • Posts: 147
  • Thank you received: 6
10 years 1 month ago #194641

Hi, I am also looking to change the placement of the hikashop_product_variant_subname.
I used display:block; to have it on it's own line, the problem is the it has a ' : ' before the variant name.
Also I have multiple variants and the line gets too long so I need each variant to be in on line.
Can you please let me know how I can remove it?

Thanks

Last edit: 10 years 1 month ago by maujbigo.

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

  • Posts: 147
  • Thank you received: 6
10 years 1 month ago #194653

Hey, I think I found an error.
I noticed that in the file administrator/components/com_hikashop/classes/product.php

line 1513
$separator = JText::_('HIKA_VARIANT_SEPARATOR');

and

line 1514
if($separator == 'HIKA_VARIANT_SEPARATOR')

It is looking for 'HIKA_VARIANT_SEPARATOR' but the language override is actually 'HIKA_VARIANTS_MIDDLE_SEPARATOR'

If I replace HIKA_VARIANT_SEPARATOR with HIKA_VARIANTS_MIDDLE_SEPARATOR then the language override works.

Please correct if I am wrong.

Either way I still need to have each variant subname on it's own line

Thanks

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

  • Posts: 12953
  • Thank you received: 1778
10 years 1 month ago #194675

Hello,

1. Can show us through some screenshots for example what do you exactly want to do ?
2. Can you download the last Hikashop version through our website, install it and test it again ?

Thanks.

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

  • Posts: 147
  • Thank you received: 6
10 years 1 month ago #194770

Hi Mohamed,
Thanks for your response.

I just downloaded the latest version, installed, cleared the cache (joomla) and the problem still the same.
It is either the langua file that has the wrong constant (HIKA_VARIANTS_MIDDLE_SEPARATOR) or the product.php class file that is looking for the wrong language (HIKA_VARIANT_SEPARATOR).

If I go the administrator/languages/override and try to create an override for HIKA_VARIANT_SEPARATOR it doesn't find anything.
Now if I look for HIKA_VARIANTS_MIDDLE_SEPARATOR it finds it. The problem is that the language override has no effect as the product.php is looking for HIKA_VARIANT_SEPARATOR.

I am trying to remove the the ' : ' that is placed before the variant name after a dwopdown selection in the product page.
And trying to have each variant on its own line.

Last edit: 10 years 1 month ago by maujbigo.

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

  • Posts: 83746
  • Thank you received: 13549
  • MODERATOR
10 years 1 month ago #194810

Hi,

The translation key HIKA_VARIANTS_MIDDLE_SEPARATOR is for the separator between each characteristic value.
By default this is a space and you can change it with a translation override.
The translation key HIKA_VARIANT_SEPARATOR is for the separator between the product name and the characteristics values.
By default this is a : and you can change it with a translation override.

In both cases, this can be done by editing your translation file via the Languages tab of the HikaShop configuration page and adding the translation key in the "override" area at the bottom of the popup, as explained in here:
hikashop.com/download/languages.html#modify

So, for HIKA_VARIANTS_MIDDLE_SEPARATOR, you would add such line if you want the values on different lines:
HIKA_VARIANTS_MIDDLE_SEPARATOR="<br/>"
And for HIKA_VARIANT_SEPARATOR, you would add such line if you don't want the : character after the product name:
HIKA_VARIANT_SEPARATOR=" "

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

  • Posts: 147
  • Thank you received: 6
10 years 1 month ago #194841

Thanks, for the explanation Nicolas.
The translation was the first thing I tried but I was trying it through the Joomla Language manager not from the Hikashop configuration.
It works just as I want, thanks.

The funny thing is that Joomla Language Manager finds the key HIKA_VARIANTS_MIDDLE_SEPARATOR but doesn't find the HIKA_VARIANT_SEPARATOR.

I am not sure if it is a problem for you guys or not. Anyway, through Hikashop Language manager it works.

Thanks

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

Time to create page: 0.094 seconds
Powered by Kunena Forum