- Posts: 81
- Thank you received: 0
Show certain number of letters of the product name
10 years 8 months ago #227839
by bordia
Show certain number of letters of the product name was created by bordia
-- url of the page with the problem -- :
www.bordia.de/trennscheiben/metall-trennscheiben/aluminium.html
-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
Hi Hikashop Team,
Is it possible in the category the product name to display only 50 characters? To ensure that all divs have the same format..
-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
Hi Hikashop Team,
Is it possible in the category the product name to display only 50 characters? To ensure that all divs have the same format..
Please Log in or Create an account to join the conversation.
10 years 8 months ago - 10 years 8 months ago #227844
by Philip
Replied by Philip on topic Show certain number of letters of the product name
Hello,
HikaShop don't have option to do this, but you can use some custom Css!
For this, how reach your Css files AND create a custom Css, go here and here
At the end of your Css file (more easy to find it, later), use this kind of code :
Maybe, you have to be more specific on your selector (in order to be applied only on your required page
Hope this will help you,
Regards,
HikaShop don't have option to do this, but you can use some custom Css!
For this, how reach your Css files AND create a custom Css, go here and here
At the end of your Css file (more easy to find it, later), use this kind of code :
Code:
span.hikashop_product_name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 200px;
}
Maybe, you have to be more specific on your selector (in order to be applied only on your required page
Hope this will help you,
Regards,
Last edit: 10 years 8 months ago by Philip.
Please Log in or Create an account to join the conversation.
10 years 8 months ago #228001
by bordia
Replied by bordia on topic Show certain number of letters of the product name
Great, thank you.
I've already tried to display two lines of the product name. But that did not work.
span.hikashop_product_name
{ font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 500px;
}
.txt-overflow {
position: relative;
height: 3.6em;
line-height: 1.2em;
}
.txt-overflow:after {
content: "";
text-align: right;
position: absolute;
bottom: 0;
right: 0;
width: 35%;
height: 1.2em;
background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 50%);
}
I've already tried to display two lines of the product name. But that did not work.
span.hikashop_product_name
{ font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 500px;
}
.txt-overflow {
position: relative;
height: 3.6em;
line-height: 1.2em;
}
.txt-overflow:after {
content: "";
text-align: right;
position: absolute;
bottom: 0;
right: 0;
width: 35%;
height: 1.2em;
background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 50%);
}
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
10 years 8 months ago #228015
by Mohamed Thelji
Replied by Mohamed Thelji on topic Show certain number of letters of the product name
Hello,
In your case the best solution will probably be to directly edit the "listing_img_title" file of the "Product" view of your front-end template via "Hikashop->Display->Views" and change that line :
By :
In your case the best solution will probably be to directly edit the "listing_img_title" file of the "Product" view of your front-end template via "Hikashop->Display->Views" and change that line :
Code:
echo $this->row->product_name;
Code:
echo substr($this->row->product_name, 0, 50);
Please Log in or Create an account to join the conversation.
Time to create page: 0.197 seconds