Is it possible to place a tag in a template but to limit the number of characters?
For example, I may just want to display the first 50 characters of [-- PRODUCT.MoreInformationText --]
The reason I want to do this is in my search results where I just want to show a teaser of the information available and then the customer has to click into the product to read more about it?
Character Limit
-
- Posts: 38
- Joined: Wed Sep 06, 2006 5:41 am
- Location: Melbourne, Australia
Character Limit
Goodbye Agassi!
-
- Posts: 463
- Joined: Fri Aug 04, 2006 5:46 pm
- Location: Connecticut
- Contact:
I am not aware of any ShopSite tag that could do this. You could use the "CALL" tag in ShopSite to call a perl script that truncates the description to X characters and then returns the truncated text probably.
LexiConn
[url=http://lexiconn.com]ShopSite Host[/url]
[url=http://lexiconn.com/whitepapers.html]How to Get the Most Out of ShopSite[/url]
[url=http://lexiconn.com]ShopSite Host[/url]
[url=http://lexiconn.com/whitepapers.html]How to Get the Most Out of ShopSite[/url]
-
- Posts: 60
- Joined: Sat Feb 10, 2007 4:20 pm
- Location: Athens, GA
- Contact:
If you want to do this specifically for the search results ShopSite has a built in function.
It's under Preferences -> Search Settings -> Search Layout -> "Maximum number of character..."
Unfortunately, there is no function to do this on other pages. However, I wrote a small function to do this for me a while back using PHP.
It's under Preferences -> Search Settings -> Search Layout -> "Maximum number of character..."
Unfortunately, there is no function to do this on other pages. However, I wrote a small function to do this for me a while back using PHP.
-
- Posts: 38
- Joined: Wed Sep 06, 2006 5:41 am
- Location: Melbourne, Australia
Thanks very much... that's extremely helpful and exactly what I was looking for. It's saved me a lot of time for my search results.
The only bug I need to work out now is that my descriptions have a bit of garbage in them:
eg: Racquet Summary|n| The|n| RDX 300 is available in Mid Plus and Super|n| Mid. These|n| ...
I've specified "no HTML" in the tag, but I keep getting these |n| characters. What are they? How do I stop them appearing without having to modify every description I've done?
The only bug I need to work out now is that my descriptions have a bit of garbage in them:
eg: Racquet Summary|n| The|n| RDX 300 is available in Mid Plus and Super|n| Mid. These|n| ...
I've specified "no HTML" in the tag, but I keep getting these |n| characters. What are they? How do I stop them appearing without having to modify every description I've done?
Goodbye Agassi!
-
- Site Admin
- Posts: 4953
- Joined: Fri Aug 04, 2006 1:42 pm
- Location: Utah
-
- Site Admin
- Posts: 4953
- Joined: Fri Aug 04, 2006 1:42 pm
- Location: Utah
You need to have your store upgraded to 8.1.3. See this kbase article which mentions a fix in search for linefeed characters in search results.
http://support.shopsite.com/kbase/view_ ... onID=S5518
http://support.shopsite.com/kbase/view_ ... onID=S5518