You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Is there a way to limit the # of characters in a field? For instance, I want to limit the first & last name fields in the shipping area at checkout to only allow 10 characters each, also the shipping area in customer accounts.
2nd question: Is there a way to set CCP51 up to automatically send a particular email when you mark a customer order as completed. Just like it sends an email once the order is paid for.
Offline
Question 1: Aside from questioning why you would want to actually do this, you can change the XXX_FNAME and XXX_LNAME field definition in all of the data/tables/config_x files. You would have so many problems with existing data if you have it. If you are using MySQL you would also have to redefine all of those field definitions to match the config files as well. You could do this with PhpMyAdmin. It would be a huge job using this method.
You can also limit characters through the input fields in the elements themselves. You can hard-limit the size of the input fields by limiting the number of chars that each field accepts.
FWIW: Since so many first and last names are longer than 10 characters, you might quickly be doing yourself a disservice unless you have a really unique situation. If you are accepting credit cards, that would pretty much nix that for many customers since credit cards tend to use proper names like "Christopher" (11 characters) instead the less formal "Chris." It is important to remember that you are saving no space doing this since CSV and SQL files all store data in the exact field length.
Question 2: That is a good idea, but would require a modification to the code and and additional mail elements. Not a particulary hard mod, but one that would require programming.
Hope this helps,
Kevin
Offline
Is there a way to limit the # of characters in a field? For instance, I want to limit the first & last name fields in the shipping area at checkout to only allow 10 characters each, also the shipping area in customer accounts.
If you want to limit the form field so that the user can tell it is limited to 10 characters then that will be a problem as all the text box fields on the checkout page are controlled by one piece of code, so even if you did a hack to add a maxlength attribute, it would apply to all the text box fields on the page -- address, etc.
If you just want to allow more chars to be entered, but only store 10 in the database, then you can modify config_custacct.csv and maybe config_tracking.csv and change the config_varchar values to 10.
Hopefully you have good reasons for wanting to do this as I'm sure the implications are obvious...
2nd question: Is there a way to set CCP51 up to automatically send a particular email when you mark a customer order as completed. Just like it sends an email once the order is paid for.
You might want to consider purchasing the as it offers this functionality.
HTH,
Dave
Offline
Thanks, and yes I have a very good reason for wanting to limit the input fields, but only on shipping, not billing. It has nothing to do with saving space, but thanks for the heads up.
Offline