Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

maxlenght in product description

   X-Cart forums > Forum archive > Using X-Cart in my project > Need advice
Thread Tools
Old 02-09-2018, 06:25 AM
Andreas Koopmann Andreas Koopmann is offline

Join Date: Apr 2010
Posts: 27

Default maxlenght in product description

I want to limit the signs provider can use in the short product description with an active html editor

x-cart Platinum 4.7.9

{if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[descr]" /></td>{/if}
<td colspan="2" class="FormButton">
<div{if $active_modules.HTML_Editor and not $html_editor_disabled} class="description"{/if}>{$lng.lbl_short_description}* :</div>
<div class="description-data">
{include file="main/textarea.tpl" name="descr" maxlenght=600 cols=45 rows=8 data=$product.descr width="100%" btn_rows=4}
{if $top_message.fillerror ne "" and ($product.descr eq "" or $product.xss_descr eq "Y")}<font class="Star">&lt;&lt;</font>{/if}

tryed it with maxlength but it does not work here,
any Idea?
x-cart gold 4.3.1
Reply With Quote
Old 02-09-2018, 11:51 AM
  PhilJ's Avatar 
PhilJ PhilJ is offline

Join Date: Nov 2002
Location: UK
Posts: 3,720

Default Re: maxlenght in product description

For the plain textareas (not HTML editors), in skin/common_files/main/textarea.tpl you'll need to add...
{if $maxlength && $usertype eq "P"} maxlength="{$maxlength}"{/if}
... to the <textarea>'s

Then you should be able to use your code.

I don't know if it'll work in the HTML editors, you may have to find a maxlength plugin or script for your chosen editor.

Alternatively, you can just truncate the product descriptions...
Or you could use something like this.
Reply With Quote
   X-Cart forums > Forum archive > Using X-Cart in my project > Need advice

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -8. The time now is 05:20 PM.


X-Cart forums © 2001-2020