- Posts: 43
- Thank you received: 0
Styling for product display name
12 years 11 months ago #127457
by ipshwitz
Styling for product display name was created by ipshwitz
-- 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.
-- 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.
12 years 11 months ago #127460
by Xavier
Replied by Xavier on topic Styling for product display name
Hi,
You have to apply your css on the class hikashop_product_variant_subname
Some css like:
Here is a tutorial on how to customize the layout:
www.hikashop.com/support/documentation/1...ize-the-display.html
You have to apply your css on the class hikashop_product_variant_subname
Some css like:
Code:
.hikashop_product_variant_subname{
display: block;
font-size: 12px;
}
www.hikashop.com/support/documentation/1...ize-the-display.html
Please Log in or Create an account to join the conversation.
11 years 6 months ago - 11 years 6 months ago #194641
by maujbigo
Replied by maujbigo on topic Styling for product display name
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
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: 11 years 6 months ago by maujbigo.
Please Log in or Create an account to join the conversation.
11 years 6 months ago #194653
by maujbigo
Replied by maujbigo on topic Styling for product display name
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
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.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 6 months ago #194675
by Mohamed Thelji
Replied by Mohamed Thelji on topic Styling for product display name
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.
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.
11 years 6 months ago - 11 years 6 months ago #194770
by maujbigo
Replied by maujbigo on topic Styling for product display name
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.
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: 11 years 6 months ago by maujbigo.
Please Log in or Create an account to join the conversation.
11 years 6 months ago #194810
by nicolas
Replied by nicolas on topic Styling for product display name
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=" "
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.
11 years 6 months ago #194841
by maujbigo
Replied by maujbigo on topic Styling for product display name
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
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.357 seconds