Hi David Can be possible to use Different DIV for Mobiles and Mobile Accessories Category.
I Create two Sub-category of mobile : Mobiles and Mobile Accessories....but problem is product title of mobiles is too short and product title of Mobiles Accessories is too long.
so large gap problem in search grid view result if I give more width size.and vice versa in Mobile Accessories images ...so can be possible to give Different DIV using Any If else statement or other technique.
technoarenasol
Thanx David...I think this trick not good...Best way to display limit character of product tile in search result
If title small display full title and if title long display limited character with ..... symbol
like this
Nokia asha 302 (full title display )
Nokia asha 302 Mobile Phone Screen... (Long title display with ... )
I try
<?php
print substr($product["name"],0,40);
?>
Hi Tony,
You can use Price Tapestry's built-in tidy substring function which breaks on a word boundary (first SPACE after the limit) and appends ... if the string is longer - have a go with:
print tapestry_substr($product["name"],40,"...");
Cheers,
David.
--
PriceTapestry.com
Hi technoarenasol,
Sure, the search results div class is set by the following HTML at line 4 in html/searchresults.php:
<div class='searchresults'>
So to override the class for specific categories; use something like:
<?php
switch($parts[1])
{
case "Mobiles":
$class = "searchresultsMobiles";
break;
case "Mobile Accessories":
$class = "searchresultsMobileAccessories";
break;
default:
$class = "searchresults";
break;
}
?>
<div class='<?php print $class; ?>'>
Cheers,
David.
--
PriceTapestry.com