X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   ZipCode Validation Module (https://forum.x-cart.com/showthread.php?t=7888)

NuAlpha 06-14-2004 02:07 PM

Is the file "validate_zipcode.php" in the same directory as "include/register.php"?

Also, what is the PHP code on line 116 and 197 in register.php?

GM 06-14-2004 02:19 PM

Yes validate_zipcode.php is in the same directory (include)
(before removing @):
Code:

116= if (@include('validate_zipcode.php')) {
197= # Add new person to customers table


NuAlpha 06-14-2004 02:24 PM

What is the line directly above 197 ??

UPDATE: Nevermind, see what I wrote in the next post.

NuAlpha 06-14-2004 02:31 PM

Change...
Code:

include('validate_zipcode.php')
...to...
Code:

include($xcart_dir.'/include/validate_zipcode.php')

That should fix the problem!

GM 06-14-2004 03:05 PM

IT WORKED!!! 8O It caught the P0H 1A error but it also wanted me to fill in the shipping address "first name", "last name" fields? When I tyed the postal code correctly though, it no longer asked for those fields???
BOTTOM LINE... IT WORKED! :D

GM 06-14-2004 03:17 PM

I think it has something to do with:
Code:

# Fields filled with errors
#
        if (!empty($fillerror)) $reg_error="F";
        if (!empty($eerror)) $reg_error="E";
        if (!empty($uerror)) $reg_error="U";
        }
if($anonymous_user) {
        $uname="";
        $passwd1="";
        $passwd2="";


I should mention that I am trying to checkout as an anonymous user.

Code:

Zip/Postal code * P0H 1A  << ---this is good!

Shipping Address (leave empty if same as billing address)
--------------------------------------------------------------------------------
 
Title    Mr. Mrs. Ms. 
First Name  ..........................  << --not good
Last Name..........................    << --not good
Address   


NuAlpha 06-14-2004 03:23 PM

I have had that problem as well. Not sure why, but the registration error checks the shipping names no matter what. :(

In the file "skin1/main/register_shipping_address.tpl", remove the two lines which starts with "{if $reg_error ne" and that should fix that problem.

GM 06-14-2004 03:36 PM

I was just in the process of looking for those! I can't thank you enough for for help, THANKS! :D

NuAlpha 06-14-2004 03:40 PM

Quote:

Originally Posted by GM
I was just in the process of looking for those! I can't thank you enough for for help, THANKS! :D


No prob! At least I am now an "eXpert" on these forums. 8) :roll: :)

GM 06-14-2004 03:43 PM

You earned it in this thread alone! http://www.goldmisers.com/smiles/thumbsup.gif


All times are GMT -8. The time now is 01:19 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.