Product Template text box max length value

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Product Template text box max length value

Post by AbleMods » Tue Nov 20, 2007 8:01 am

The Product Template setup allows a max length value to be specified for the field being added. However it doesn't take this value into account when rendering the display field.

Can this be fixed? Certain fields I am using look horribly long when I only want to collect 5 characters.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Post by Logan Rhodehamel » Tue Nov 20, 2007 9:31 am

Edit the product template, and set the "Size" value of the textbox to something like 2. See if that produces an acceptable result. (Max length is not the same attribute as width.)
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Post by AbleMods » Tue Nov 20, 2007 9:54 am

The field limits data entry to the proper length. It's the display length that's way too large.

The text box control isn't resizing to the length specified. I end up with a 20 character text box for a 4 character input.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Post by Logan Rhodehamel » Tue Nov 20, 2007 10:00 am

SolunarServices wrote:The field limits data entry to the proper length. It's the display length that's way too large.

The text box control isn't resizing to the length specified. I end up with a 20 character text box for a 4 character input.
Sorry, I used the wrong field name. What is the value you have set for "Columns"?
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Post by AbleMods » Tue Nov 20, 2007 10:28 am

Columns is set to 1. I presumed it meant display columns as in like columns in a table.

Does it mean character columns as in total character width of the field?
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Post by Logan Rhodehamel » Tue Nov 20, 2007 10:34 am

SolunarServices wrote:Does it mean character columns as in total character width of the field?
Yes, it is the "columns" attribute of the textbox. But a value of 1 should display a narrow field. I set mine to 2 and it was approx 40px in width.

I am unsatisfied with the ability to modify the field display. We should have either asked for a css class name, or at the very least used width in pixels rather than columns. There are relatively simple workarounds if you cannot produce a suitable field size and you are comfortable with ASP.NET.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Post by AbleMods » Tue Nov 20, 2007 10:43 am

That works.

I agree it could be far more useful as a unit of pixels. I would relabel it something other than "columns" - too ambigous. Perhaps "Display Length" would be more intuitive....

Personally, I'd much rather see more control over layout for rendered Product Templates. When you have 8 fields in a product template, the cosmetics get ugly on a product page.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Post by Logan Rhodehamel » Tue Nov 20, 2007 10:49 am

SolunarServices wrote:Personally, I'd much rather see more control over layout for rendered Product Templates. When you have 8 fields in a product template, the cosmetics get ugly on a product page.
Product templates are turning out to be more popular than I anticipated. Agreed, more display control would be a plus. :)
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Post by AbleMods » Tue Nov 20, 2007 11:00 am

templates give the designer more control over certain product options that variants imho.

I can set a default value.
All fields render at page load, not one at a time.
Variety of display possibilities via different control choices.

Future changes are easy - variants are a real pain if you decide to change it later after you've built 20 copies of the original variant setup. I do think variants are extremely useful, but very specific for their purpose.

I'd merge the variant design concept into the product templates feature. I'm sure that's alot easier said than done, but wow would that be powerful.

What'd be super-slick would be a data source option to pull from an XML file for the template list controls instead of manually entering them. That would open some serious doors towards flexibility.

Just when you thought it was safe to step away from the feature request list :twisted:
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply