View Single Post
  #2  
Old 11-17-2003, 04:55 PM
 
val@valcohen.com val@valcohen.com is offline
 

Newbie
  
Join Date: Sep 2003
Location: Long Beach, CA, USA
Posts: 6
 

Default

Not sure what you mean by "product modify area", but here's how to change the amount returned in the product description.

In WebMaster mode, do a product search and then, when viewing the search results page, use the debug panel to edit
'/customer/main/products.tpl'

Look for
{$products[product].descr|truncate:400:"...":true}

Change the value next to the 'truncate' keyword -- the '400' is the number of characters to print before truncating and then appending the string in quotes (this string is counted in the number of chars to truncate -- in this case, it's three chars). 'true' means truncate at the exact character; 'false' would tell Smarty to truncate at the last word boundary before the limit. Full docs at http://smarty.php.net/manual/en/language.modifier.truncate.php.

(Dunno if the limit is 400 chars in X-Cart by default -- it's that way on mine, but I've customized pretty heavily.)

Note that the search results page uses the SAME products template -- '/customer/main/products.tpl' -- that's used elsewhere to display multiple products, like in the category listings. So if you want to display different amounts of text depending on which page is displaying product info, you'll need to make further modifications. Depending on how different you want the output to look, you could:

- insert some conditional logic in products.tpl to vary the 'truncate' vlue depending on the current page. Better if you're only changing the amount of text, and the rest of the layout should be the same.

- duplicate 'products.tpl' into a new template, and call the new template instead of products.tpl in 'customer/main/search_result.tpl'. Better for more radical changes in layout. But now you have two templates to maintain.

HTH...
__________________
X-Cart Gold 3.4.4; X-Affiliate 3.4.4; PHP 4.3.2; MySQL 4.0.15-standard; Apache 1.3.28; Red Hat Linux 7.1
Reply With Quote