HomeHome Product Discus... Product Discus...SmithCartSmithCart4.99: How to deal with CustomTextBox1 max length = 504.99: How to deal with CustomTextBox1 max length = 50
Previous
 
Next
New Post
5/23/2012 9:21 PM
 

Hi SC

(Using DNN 6 and SC 4.99).

In this thread, I suggested that special instructions should be presented before payment (step 1). The solution given to me was to use Custom Textbox #1 instead of special instructions. This is going ok.

Trouble is, in the database table Smith_Customer,  Custom Textbox #1 (called UDTB1) is a varchar(50), whereas the special instructions allowed 500 characters. 50 characters is not much for a box I'm trying to use instead of special instructions.

So here is my question:

  • If I go into the database and change the UDTB1 field in the Smith_Customer table to be varchar(500), it seems to work fine. I tested this. Is it ok to do this? Will it mess up future upgrades?
  • Alternatively I can go into Step1.ascx and set MaxLength="50" for txtUDTB1, in order to prevent user input from being truncated. But 50 chars isn't much...

Please advise?

Thank you,

Daniel.

 
New Post
5/28/2012 8:14 PM
 

Hi Daniel,

You can also change the Custom Textbox #1 into a multiline textbox as well by changing the TextMode property to "Multiline". You upgrade path should not be affected as the changes you have made will be overwritten with the upgrade. The best way to reapply your customizations would be to use a file comparing program such as WinDiff or Windows Grep to compare and easily apply the differences between the old and new files so you can apply the same modifications to the new files. You may also find the following forum post helpful for retaining your ascx mods: https://www.smith-consulting.com/Foru...

Thanks,

Thanks,

 
New Post
5/28/2012 8:22 PM
 

Thanks Kevin,

I think you misunderstand though.

If I make the textbox multiline, then the number of characters entered by the user becomes unrestricted regardless of the ascx code. The user can type a million characters into an ASP multiline textbox, but only the first 50 will be saved and the rest will be lost. Try it for yourself with a multiline text box.

The reason that truncation occurs at 50 characters is because the field in the actual database table that I mentioned above is restricted to 50 characters (by whoever first designed that table). If I wish to allow more characters, then I have to change this field in the database to varchar(1000) or something big like that. This seems to work ok, I just wanted to hear your developer's opinion on this customisation regarding whether it might break future upgrades.

Thanks,

Daniel.

 
New Post
5/30/2012 8:35 PM
Accepted Answer 

Hi Daniel,
Changing datatypes or lengths of existing Smith Cart sql table fields isnt recommended because sometimmes the datatype/ length is referenced in code behind or stored procs which would cause the program to break if the datatypes/lengths dont match. The best thing to do is request a feature enhancement using this link http://www.smith-consulting.com/Forum... and we will try to make the change in the next cart release.


Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
5/30/2012 9:59 PM
 
Scott Kelly wrote:

Hi Daniel,
Changing datatypes or lengths of existing Smith Cart sql table fields isnt recommended because sometimmes the datatype/ length is referenced in code behind or stored procs which would cause the program to break if the datatypes/lengths dont match. The best thing to do is request a feature enhancement using this link http://www.smith-consulting.com/Forum... and we will try to make the change in the next cart release.

Thanks Scott, I have submitted this.

 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCart4.99: How to deal with CustomTextBox1 max length = 504.99: How to deal with CustomTextBox1 max length = 50