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

Limiting Product Name Field

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-20-2011, 08:36 AM
  R3NOIR's Avatar 
R3NOIR R3NOIR is offline
 

Member
  
Join Date: Oct 2010
Posts: 14
 

Default Limiting Product Name Field

Where can I limit the number of characters a Provider can enter in as a Product name?

Also I would like a line break in product name after 30 characters, but allow a total of 60 characters (2 lines) for Product Name.

So a Provider could enter up to 60 characters for a product name but it would be on 2 lines with a line break after the first 30 characters.
Thx.
__________________
X-Cart Pro v4.4

X-FeatureComparison X-SpecialOffers X-Magnifier X-Survey X-GiftRegistry
Reply With Quote
  #2  
Old 09-20-2011, 11:13 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Limiting Product Name Field

1. Limit characters in product name
There are many ways you could do this, one would be to simply limit the number of characters that the database field for product name can accept. To provide feedback about this to the provider, you could use javascript validation on the product form.

2. To provide your line break is a little more tricky, you will need to write some logic that counts the characters in the product name variable and seperates it into two new variable which you could then display.
http://www.smarty.net/docsv2/en/language.modifier.count.characters.tpl

If you need more info on either of these solutions just ask.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 04:13 PM.

   

 
X-Cart forums © 2001-2020