Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jun 2014
    Location
    Las Vegas, Nevada, United States
    Posts
    47
    Plugin Contributions
    0

    Default Checkout Address Change NOT possible

    I just upgraded to ZenCart 1.5.3 with the USPS shipping module and have noticed what seems like a bug? during checkout.

    If I follow the checkout process everything works perfect. However if enter an address that is not valid when creating an account for a first time buyer on the store, ZenCart correctly checks to see that the address is not valid and spits out the following error
    Error encountered looking up tax amount The Ship To zip code (89108) is not valid for this state (Ne)

    This error is misleading since even a wrong street number can trigger it. In spite of it being a misleading error statement the overall function is working properly.

    However when this happens there seems to be no way to correct the faulty address. I choose the change address button and am taken to a screen to enter a new address. But when a new valid address is submitted the new address shows in the checkout page but with the error still present. When I check my admin area the new user is already created but still has the original (not valid) address.

    With this happening the customer can not continue without the error message and the new address they entered is not showing in my ZenCart Admin area. Which could complicate correctly shipping a product.

    Anyone know how I can get the new address to update the ZenCart Admin area and get rid of the error when a customer corrects a non valid address during checkout?

    Thanks
    Luke

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Checkout Address Change NOT possible

    Let's say my address is:


    USPS is sent:
    Test Nebraska bad zip Test Newbraska bad zip last
    123 somewhere
    Omaha, NE 89108
    United States
    That is a bad street and a bad Zip Code as the Zip Code is for Las Vegas, Nevada

    I still get a quote from USPS because it is receiving just the Zip code of origin and the Zip code destination it doesn't know any more about the address than that ...

    I am not sure what error you are getting other than a quote for Las Vegas 89108 vs Omaha Nevada 68101 ...

    Could you expand on that?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jun 2014
    Location
    Las Vegas, Nevada, United States
    Posts
    47
    Plugin Contributions
    0

    Default Re: Checkout Address Change NOT possible

    It seems there is more to it than just the zip?

    I deleted all orders from my admin and all customers just to start fresh.

    I entered the following address
    First Name: TestFirst
    Last Name: TestLast
    Street Address: 555555 Broadriver Dr.
    City: Las Vegas
    State: Nevada
    Zip: 89108
    This is a 100 percent "real" address except it is a bad street number.

    When submitted I am taken to the Delivery Information Page and do indeed have shipping info to select and no errors. So it seems that yes the shipping info still gets generated.

    But the error I get is on the next page, Payment Information. On the Payment information I get the error
    Error encountered looking up tax amount The Ship To zip code (89108) is not valid for this state (Ne)
    I also look in my ZenCart Admin and see the new customer created with the address having the bad street number.

    So the error is generated with all of the address correct except a faulty street number. Shipping calculation works ok but something on the payment information page does not like an invalid street number.

    So I try to correct this by clicking the change your address button. Then I submit the new address which is
    First Name: TestFirst
    Last Name: TestLast
    Street Address: 4133 Broadriver Dr.
    City: Las Vegas
    State: Nevada
    Zip: 89108
    This address is a "real" address complete with correct street number.

    After submitting this address I am taken back to the Payment Information Page with the error still there. The newly entered address (the one with the correct street number) shows on the Payment Information Page. When I look in my ZenCArt Admin area the customer is still there and STILL shows the first address with the bad street number.

    How can I get the address to update to both the Admin Customer and to the Payment Information Page.

    Just to be safe I again deleted all orders and all customers to start again.
    This time I entered the same info but used the correct address the first time. Poof no errors.

    So something in the system does care about a real and valid address.

    Does that help clarify?
    Luke

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Checkout Address Change NOT possible

    Do you have an add on that is testing addresses or something? There is nothing in the default core code testing the address for validity ...

    I have 50+ test shipping addresses with nothing being valid except the State, Zip Code and Country ...

    As to editing this, either edit the raw address_book in phpMyAdmin or you could get something like the Master Password encrypted so you can log in to the customer's account to fix that ...

    At some point we will have to make an editor for the address book in the Admin, in a future release, as there are times it would be most helpful ...

    I tried a checkout with your bad address and it still works fine ...

    Do you have a Payment module that is verifying the address or something with Taxes?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Jun 2014
    Location
    Las Vegas, Nevada, United States
    Posts
    47
    Plugin Contributions
    0

    Default Re: Checkout Address Change NOT possible

    Yes i am using tax cloud. I believe it checks for a valid address as a way to calculate taxes.

    With that said i dont think this is a taxcloud ussue. It is desirable to have something check for a valid address. If a customer is allowed to type in a non valid address by mistake they will likely not know they did so. With a non valid address i will have difficulties shipping thier items.

    I think this is a zen cart issue. Lets assume a customer types in a valid address in the first place but has recently moved and typed in thier old address. The customer then notices the error and clicks the change address button during checkout. They then enter the new address to update to where they live now. In this case no error is generated so it looks fine. However the new address doesnt make it to the admin area of my zencart so i still have thier mistakenly entered address.

    I feel it is not realy the error of a valid address that is the core issue here. The actual problem is a change of address during checkout does not update the zencart admin properly and there for cripples the concept of changing the adress during checkout.

    Taxcloud asking for an actual valid address is a bonus to the store owner to help reduce mistyped addresses and mitigate confusion with shipping. But even with valid addresses there are scenarios where there will be no errors but the zencart admin does not reflect the changes the customer made during checkout.

    It seems there may be two ways to approach this.
    1. Have the change of address propagate to the zencart admin so add ons like taxcloud can recheck using the new address in the admin database. This seems like a bug that may need looked at.

    Or

    2. Can there be a way of coding a check for valid address on the account creation screen? This may be the best cure for the issue i am having since an invalid address cant be entered on account creation. But the above number 1 fix still needs to be looked at since customers may want to change from one valid address to another.

    Any ideas how i could make one or the other of these happen? Or both even. :)

    Thanks for your time.
    Luke

    P.S.
    I will donate a few cups of coffee if we can get this working correctly.

    Seems

  6. #6
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Checkout Address Change NOT possible

    One thing of note, it is expected that if the delivery address is indeed entered/changed during checkout that at some point during the processing of the order that the delivery address will be associated with the order and viewable in the admin panel. From the described process it appears that a complete purchase was not made. If it was made and the address appeared with the order, then it sounds as if the expectation is that the address also be tied to the customers standard account. (As if in the future the customer can pick from that location again in the list of addresses.) Otherwise, what it appears that what is being asked is to modify/update the default address based on the address that is selected for shipment...

    In my opinion, changing the default address blindly (customer just entering an address for this one purchase without selecting to make this a default/replacement address) is likely to cause a lot of trouble if implemented across the board (ie. ZC default). Think of one business that orders from another, sometimes for supplies to go to them, sometimes to some other location. After each such order the address for the next order would reflect the last order location (as the "default" shipping location would be changed.)

    As for address verification up front, it sounds like the add-in tht is doing the verification on check out is at least one step late in the process, and should be doing so up front so that there is no "bad data" down the line.

    Now this upgrade, this same problem wasn't happening on the previous version? Has the applicable other software (doing the address error check) been updated to work with this version of ZC?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Checkout Address Change NOT possible

    Quote Originally Posted by Luke Galyan View Post
    ... I feel it is not realy the error of a valid address that is the core issue here. The actual problem is a change of address during checkout does not update the zencart admin properly and there for cripples the concept of changing the adress during checkout. ... Taxcloud asking for an actual valid address is a bonus to the store owner to help reduce mistyped addresses and mitigate confusion with shipping. But even with valid addresses there are scenarios where there will be no errors but the zencart admin does not reflect the changes the customer made during checkout. ...
    I just did a test order on "stock" Zen Cart 1.5.3 installation. In step 2 (billing) or step 3 (confirmation) I can successfully change the address. This address change is reflected on the checkout confirmation page. Further the new address is correctly saved in the database as a new "customer address". After confirming the order, the new address is also saved with the order (can view the order details in the admin or the new order email if enabled).

    This is the expected behavior. Unless modified the pages for changing the address during checkout state: "Change the Billing Address for This Order" or "Change the Shipping Address for This Order". So far I have been unable to duplicate the issue with a "stock" Zen Cart 1.5.3 installation.

    If the above functionality is not working, I would suspect some modification made to your store is causing the address change to fail. Address "validation" and address "correction" are not part of the "stock" Zen Cart code.

    NOTE: After completing the order a customer can visit their account on your site and change the "primary" address and "delete" the incorrect address.

    ... Can there be a way of coding a check for valid address on the account creation screen? This may be the best cure for the issue i am having since an invalid address cant be entered on account creation. But the above number 1 fix still needs to be looked at since customers may want to change from one valid address to another. ...
    Yes it "could" be done. It would most likely involve some custom coding (paid or supplied by your address verification vendor). It sounds like you already have a preferred vendor (and handling partially covered).

    Have you asked your vendor why their module is not adding a new "customer address" to the database (or replacing the invalid address record)? Have you asked them if you can use their address verification service during account creation (and if they have a module ready to go for address verification during account creation)?

    NOTE 1: In custom code, simply updating the address data stored in $_SESSION (or $order) will not result in the desired effect. While $_SESSION may be used (during checkout) for holding some of the information, the data is also read from the database (based upon the address_id). So the custom code would need to update the database AND update the data in $_SESSION.

    NOTE 2: There is a known bug indicating Not all $_SESSION variables related to addresses may be updated by the "stock" Zen Cart code when an address is changed. This should not impact checkout as the addresses are populated from the the database (and the address_id is passed around, not the individual fields).
    Last edited by lhungil; 16 Jul 2014 at 07:10 PM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  8. #8
    Join Date
    Jun 2014
    Location
    Las Vegas, Nevada, United States
    Posts
    47
    Plugin Contributions
    0

    Default Re: Checkout Address Change NOT possible

    I didnt realize there was a difference between a session and the database. Makes sense as i think about it.

    So the address validation is done by the usps module. Shipping only needs zip code while taxcloud seems to want an actual valid address. I like that somewhere along the line an address be checked for validity.

    If im understanding this correctly the address is added to the database upon account creation but is also stored in the session. Since shipping only cares about zip code it still works fine. Taxcloud wants a valid address but uses the information stored in the database to check it (not the session). When an adddress is changed it is changed only in the session and is reflrcted in the checkout pages. The taxcloud module is called again after an address update. Taxcloud looks in the database for the address and not the session for the address. The new address wont be propagated to the database until after order confirmation. But the taxcloud module is called before order confirmation and looks at the database address rather than the session address and thus produces an error again.

    Seems the fix might be to have taxcloud use the session address rather than the database address. From what i "think" i understand, that would solve my issue as well as check for invalid addresses.

    So the questions are
    Am i on the right track with my thinking? And anyone familiar with the taxcloud code and can tell me how to have it check the address in the session rather than the database?

    I could contact taxcloud but am still waiting on a response from an earlier question. They dont seem too speedy with core function and code questions.

    Luke

  9. #9
    Join Date
    Apr 2014
    Posts
    154
    Plugin Contributions
    0

    Default Re: Checkout Address Change NOT possible

    So the checkout pages have to distinguish both a shipping address and billing address. These addresses need to carryover to each page throughout the process. The way zencart does this is by use of storing the SESSION of the address id. The SESSION is either "sendto" OR "billto", shipping and billing respectively. The value of this SESSION is the address id of the address entry. When zencart needs to display or update the address of either one, it uses this session value to find the corresponding address entry in the database.

  10. #10
    Join Date
    Jun 2014
    Location
    Las Vegas, Nevada, United States
    Posts
    47
    Plugin Contributions
    0

    Default Re: Checkout Address Change NOT possible

    Ok so im a little confused then. If the address stored in the session is only an id that references the entry in the database, why does the new address show in checkout when a customer changes it but that change doesnt show in the admin area (assuming the admin area reflects what is in the database) until After order confirmation. Wouldnt that mean the session is storing more than just an id number to a database entry?
    Luke

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Change Address not working during checkout process
    By TECnews in forum General Questions
    Replies: 1
    Last Post: 18 Sep 2013, 11:54 PM
  2. Replies: 6
    Last Post: 8 Mar 2012, 06:36 PM
  3. Possible to change Google Checkout header image?
    By gaffettape in forum Addon Payment Modules
    Replies: 0
    Last Post: 1 Apr 2010, 11:50 AM
  4. Checkout Step 2 - Change Address - Cart not Recalculated
    By ungarod in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 21 Mar 2008, 05:00 PM
  5. change shipping address of order in admin? Possible?
    By airtime in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 19 Jul 2007, 06:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg