- Posts: 81
- Thank you received: 6
Limit Title Characters on Product Listing Page
13 years 9 months ago #80561
by foxy3433
Replied by foxy3433 on topic Limit Title Characters on Product Listing Page
The code you gave me links the Brand and Title without a Space so if the product name is : "PBH 2100 SRE 550W Hammer Drill"
With the Brand Name: BOSCH
Result is: BOSCHPBH 2100 SRE 550W Hammer Drill
Where it should be: BOSCH PBH 2100 SRE 550W Hammer Drill
With the Brand Name: BOSCH
Result is: BOSCHPBH 2100 SRE 550W Hammer Drill
Where it should be: BOSCH PBH 2100 SRE 550W Hammer Drill
Please Log in or Create an account to join the conversation.
13 years 9 months ago #80602
by nicolas
Replied by nicolas on topic Limit Title Characters on Product Listing Page
Then, just add a space.
Instead of:
echo $manufacturer->category_name;
echo substr($this->row->product_name, 0, 30);
do like that:
echo $manufacturer->category_name. ' ';
echo substr($this->row->product_name, 0, 30);
Instead of:
echo $manufacturer->category_name;
echo substr($this->row->product_name, 0, 30);
do like that:
echo $manufacturer->category_name. ' ';
echo substr($this->row->product_name, 0, 30);
The following user(s) said Thank You: foxy3433
Please Log in or Create an account to join the conversation.
12 years 7 months ago #144575
by Мыктыбек
Replied by Мыктыбек on topic Limit Title Characters on Product Listing Page
Hi in product page shows some products and i am find code in file listing_img_title.php where shows product name like this echo $this->row->product_name; and i want select product names where product_name language = english so how i can select this can you give me code please?
Please Log in or Create an account to join the conversation.
12 years 7 months ago #144599
by Eliot
Replied by Eliot on topic Limit Title Characters on Product Listing Page
Hi there,
I don't understand what you said and I don't think it's related to the topic. Could you be a bit more specific?
Products don't have a specific language so I can't see what you want to do.
Display product which only have english names? Since there is no variable for that it will require a custom field.
I don't understand what you said and I don't think it's related to the topic. Could you be a bit more specific?
Products don't have a specific language so I can't see what you want to do.
Display product which only have english names? Since there is no variable for that it will require a custom field.
Please Log in or Create an account to join the conversation.
5 years 5 months ago #332199
by oxido
Replied by oxido on topic Limit Title Characters on Product Listing Page
This can also be done with css now
Here is how you can limit the title to 1, 2 or more rows.
Here is how you can limit the title to 1, 2 or more rows.
Code:
.hikashop_product_name{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2; /* number of lines to show */
-webkit-box-orient: vertical;
}
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.165 seconds