PDA

View Full Version : remove validation on checkout page for testing purposes


email377288
05-27-2009, 07:00 AM
i am trying to test my configuration with the eWay payment gateway in australia, for this i need to enter credit card number 4444333322221111 along with other test details.

is there an easy way to remove validation so i can process the transaction with the invalid card number?

by simply deleting the validation code the checkout page no longer advances.

also eWay has a max 2 digit credit card year expiry field whereas the validation requires 4 digits and in australia, postal/zip codes are 4 digits whereas the validation requires 5.

is there any easy way to edit these figures, they appear to be referring to complex functions in the WAVT_Scripts_PHP.php file?

Ray Borduin
05-27-2009, 07:10 AM
You don't need to edit any of the scripts files. All of the code to change validations is on the page.

It uses a combination of Spry and WebAssist Server Validation. If you own Dreamweaver you can update the spry validation using the DW properties inspector. If you own Validation Toolkit you can update the server validation using the server behaviors panel.

If you need to do it by hand all of the server validation code is on top of the page and can be commented out. All of the spry validation is on the bottom of the page and can also be commented out. The digit length of the validated field should be clearly visible as a "4" in both the spry and webassist server code associated with that form element. You should be able to simply update it to a "2".

email377288
05-27-2009, 08:08 AM
updating the spry validation digits at the bottom of the page gets me past the client validation however i can't find the code to change the server validation digits.

i have tried opening the "!Validation Show If (confirm.php)" server behaviour but cannot see how to edit this data.

could you please point me in the right direction...

Ray Borduin
05-27-2009, 08:13 AM
There is a server validation server behavior applied on the confirm page. That is where you would have to update the server validation since it has to appear on the page specified as the form action.

email377288
05-27-2009, 08:51 AM
thanks for helping me track it down...

only problem is under Zip Code Validation there is no option for a 4 digit postal code! the validations are:

5 digit U.S.
9 digit U.S.
6 digit Canadian
UK postal code
or
allow blank entry

Ray Borduin
05-27-2009, 08:58 AM
I think UK postal code will allow 4 digits.

You could also do number validation and/or entry length validation to get the exact validation you need if the zip code option doesn't match your needs. There is even a regular expression validation that would allow you to be very specific.

email377288
05-27-2009, 09:12 AM
all boxes except allow blank entry were ticked so UK postal code must refer to something else.

i think i'll go with number validation and set min and max values.

cheers

AlaskaTom
05-27-2009, 11:06 AM
There is a server validation server behavior applied on the confirm page. That is where you would have to update the server validation since it has to appear on the page specified as the form action.

Ray,
You mentioned a server validation applied to the confirm page. Is this supposed to be done automatically in the checkout wizard?
If so, its not doing it for me, and it has been one of the feature requests for ecart that I have requested several times.

It would be great if the checkout wizard did this, and also on the checkout page, put something like <span class="required">Required</span> after each required element on the checkout page, wrapped in a show if not validated SB for that element.

Does that make sense?

Thanks!
Tom

Ray Borduin
05-27-2009, 11:21 AM
The checkout wizard does not apply validation. You would have to add it with validation toolkit after applying the wizard. We are currently revamping how we work with forms to allow us to add this feature in the future. Thank you for the suggestion.