Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Limited The Product Name To 80 Characters Maximum? Rate Topic   - - - - -

 
  • Enew
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 192 posts

Posted 04 September 2015 - 06:22 PM #1

Hello

 

Does someone can show me How to limited the product name to 80 characters maximum please? (see image for detail)

 

My website use multi vendor 4.2.3

 

Thank in advance!!!

 

Franck

 

Attached Thumbnails

  • How to limited the name to 80 caracteres maximum.jpg


 
  • Triplets
  • Senior Member
  • Members
  • Join Date: 23-Sep 08
  • 1182 posts

Posted 05 September 2015 - 11:34 AM #2

You can always truncate it from the customers view.

http://forum.cs-cart...categories-page

 
  • Enew
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 192 posts

Posted 05 September 2015 - 03:01 PM #3

You can always truncate it from the customers view.

http://forum.cs-cart...categories-page

Hi

 

I want stop automatic all vendors continue to write the product name if over than 80 characters on the product edit page, not on the store page, do you know how to change please?

 

Thank!



 
  • Triplets
  • Senior Member
  • Members
  • Join Date: 23-Sep 08
  • 1182 posts

Posted 05 September 2015 - 03:06 PM #4

On the Input field for that item in the Admin template try adding 

 

<input maxlength="80" ...   >



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21992 posts

Posted 07 September 2015 - 08:32 AM #5

design\backend\templates\views\products\update.tpl

 

replace:

<input class="input-large" form="form" type="text" name="product_data[product]" id="product_description_product" size="55" value="{$product_data.product}" />

with

<input class="input-large" form="form" type="text" name="product_data[product]" id="product_description_product" size="55" value="{$product_data.product}" maxlength="80"/>

Then clear the cache


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • akshay.sharma
  • Advanced Member
  • Members
  • Join Date: 19-Dec 15
  • 107 posts

Posted 16 April 2016 - 11:15 AM #6

design\backend\templates\views\products\update.tpl

 

replace:

<input class="input-large" form="form" type="text" name="product_data[product]" id="product_description_product" size="55" value="{$product_data.product}" />

with

<input class="input-large" form="form" type="text" name="product_data[product]" id="product_description_product" size="55" value="{$product_data.product}" maxlength="80"/>

Then clear the cache

 

 

Thanks a lot for help my dear team and i want to Title length should be at least 6 characters also means 6 characters minimum need to save that product so how can we do it ?? 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21992 posts

Posted 18 April 2016 - 07:58 AM #7

You can use HTML5 pattern attribute if you are not familiar with javascript:

 

http://stackoverflow...ribute-in-html5


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • akshay.sharma
  • Advanced Member
  • Members
  • Join Date: 19-Dec 15
  • 107 posts

Posted 18 April 2016 - 12:34 PM #8

You can use HTML5 pattern attribute if you are not familiar with javascript:

 

http://stackoverflow...ribute-in-html5

 

 

Thanks a lot for ans dear team can you please provide code for this with file name  ?? 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21992 posts

Posted 18 April 2016 - 02:21 PM #9

Try

<input class="input-large" form="form" type="text" name="product_data[product]" id="product_description_product" size="55" value="{$product_data.product}" maxlength="80" pattern=".{6,80}" required title="6 to 80 characters"/>

(!) Not tested


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)