Page 2 of 3

Re: Our Zip Code being entered in shipping information

Posted: Thu May 15, 2014 7:44 am
by Brewhaus
We are not using address validation. We tried it, but found that it created too many issues (in a test, we could not even get our own address to validate, so it would not be accepted).

Re: Our Zip Code being entered in shipping information

Posted: Thu May 15, 2014 9:15 am
by CGrouse
Correct, we only collect tax from NC residents and none of the orders in question were in NC.

We use USPS, but enable address validation is not checked.

Re: Our Zip Code being entered in shipping information

Posted: Thu May 15, 2014 9:59 am
by Katie
CGrouse -

If you don't mind, I would like to try some tests on your website using Chrome. This issue seems to happen most often on your site, and I've had no luck trying to reproduce on my own. Can I get the URL to your store please?

Re: Our Zip Code being entered in shipping information

Posted: Thu May 15, 2014 10:41 am
by CGrouse

Re: Our Zip Code being entered in shipping information

Posted: Thu May 15, 2014 11:50 am
by Brewhaus
We just had one come in yesterday. We are in TX and the customer is in CA. The browser was IE 9.0. This was the customer's first order with us, and the billing and shipping address are the same (ie. only one address in their address book). Here are their page views, in case that helps:

5/14/2014 4:38:05 PM /Logout.aspx
5/14/2014 4:37:51 PM /Members/MyOrder.aspx?OrderNumber=125527
5/14/2014 4:36:47 PM /Checkout/Receipt.aspx?OrderNumber=125527
5/14/2014 4:36:47 PM /Checkout/Payment.aspx
5/14/2014 4:36:32 PM /Checkout/Payment.aspx
5/14/2014 4:36:24 PM /Checkout/Payment.aspx
5/14/2014 4:36:23 PM /Checkout/ShipMethod.aspx
5/14/2014 4:36:13 PM /Checkout/ShipMethod.aspx
5/14/2014 4:36:11 PM /Checkout/EditBillAddress.aspx
5/14/2014 4:34:58 PM /Checkout/EditBillAddress.aspx
5/14/2014 4:34:51 PM /Checkout/Default.aspx
5/14/2014 4:34:29 PM /Checkout/Default.aspx
5/14/2014 4:34:28 PM /Basket.aspx
5/14/2014 4:34:00 PM /Basket.aspx
5/14/2014 4:33:46 PM /Basket.aspx
5/14/2014 4:33:38 PM /Basket.aspx
5/14/2014 4:33:37 PM /product.aspx?productid=947
5/14/2014 3:49:31 PM /webpage.aspx?webpageid=15
5/14/2014 3:47:48 PM /product.aspx?productid=947
5/14/2014 4:38:05 PM 141.248.95.124 GET /Logout.aspx 0ms IE 9.0
5/14/2014 4:37:51 PM 141.248.95.124 GET /Members/MyOrder.aspx?OrderNumber=125527 0ms IE 9.0
5/14/2014 4:36:47 PM 141.248.95.124 GET /Checkout/Receipt.aspx?OrderNumber=125527 0ms IE 9.0
5/14/2014 4:36:47 PM 141.248.95.124 POST /Checkout/Payment.aspx 0ms IE 9.0
5/14/2014 4:36:32 PM 141.248.95.124 POST /Checkout/Payment.aspx 0ms IE 9.0
5/14/2014 4:36:24 PM 141.248.95.124 GET /Checkout/Payment.aspx 0ms IE 9.0
5/14/2014 4:36:23 PM 141.248.95.124 POST /Checkout/ShipMethod.aspx 0ms IE 9.0
5/14/2014 4:36:13 PM 141.248.95.124 GET /Checkout/ShipMethod.aspx 0ms IE 9.0
5/14/2014 4:36:11 PM 141.248.95.124 POST /Checkout/EditBillAddress.aspx 0ms IE 9.0
5/14/2014 4:34:58 PM 141.248.95.124 GET /Checkout/EditBillAddress.aspx 0ms IE 9.0
5/14/2014 4:34:51 PM 141.248.95.124 POST /Checkout/Default.aspx 0ms IE 9.0
5/14/2014 4:34:29 PM 141.248.95.124 GET /Checkout/Default.aspx 0ms IE 9.0
5/14/2014 4:34:28 PM 141.248.95.124 POST /Basket.aspx 0ms IE 9.0
5/14/2014 4:34:00 PM 141.248.95.124 POST /Basket.aspx 0ms IE 9.0
5/14/2014 4:33:46 PM 141.248.95.124 POST /Basket.aspx 0ms IE 9.0
5/14/2014 4:33:38 PM 141.248.95.124 GET /Basket.aspx 0ms IE 9.0
5/14/2014 4:33:37 PM 141.248.95.124 POST /product.aspx?productid=947 0ms IE 9.0 Copper Mesh
5/14/2014 3:49:31 PM 141.248.95.124 GET /webpage.aspx?webpageid=15 0ms IE 9.0 Contact Us
5/14/2014 3:47:48 PM 141.248.95.124 GET /product.aspx?productid=947 0ms IE 9.0 Copper Mesh

Re: Our Zip Code being entered in shipping information

Posted: Fri May 16, 2014 3:26 am
by Naveed
I checked the store. And to me it seems something related to estimate shipping cost feature at basket page and guest checkout. At first run I started a new anonymous session. I added a product to cart and attempted to checkout using guest checkout option. At the billing address page the zip code field was not populated.

However for my next attempt, with a new anonymous session, continued for same steps by adding a product and guest checkout. Browsed for basket page and entered my zip code "90008" for shipping estimate. Now when I continued for guest checkout, at bill address page the zip code field was per-populated with a different zip code then I have entered for shipping estimate.

I repeated the same test with the latest builds locally at my system and was not able to reproduce the issue. Not sure if it is some issue with older releases or result of some customization with your basket shipping estimate control?

Re: Our Zip Code being entered in shipping information

Posted: Fri May 16, 2014 3:58 am
by ForumsAdmin
Which version of AC Gold are you at?

Re: Our Zip Code being entered in shipping information

Posted: Fri May 16, 2014 4:33 am
by CGrouse
Naveed wrote:
I checked the store. And to me it seems something related to estimate shipping cost feature at basket page and guest checkout. At first run I started a new anonymous session. I added a product to cart and attempted to checkout using guest checkout option. At the billing address page the zip code field was not populated.

However for my next attempt, with a new anonymous session, continued for same steps by adding a product and guest checkout. Browsed for basket page and entered my zip code "90008" for shipping estimate. Now when I continued for guest checkout, at bill address page the zip code field was per-populated with a different zip code then I have entered for shipping estimate.

I repeated the same test with the latest builds locally at my system and was not able to reproduce the issue. Not sure if it is some issue with older releases or result of some customization with your basket shipping estimate control?
To my knowledge, there are no customizations to the basket shipping estimate control. The only thing was I turned off the state field, but this was happening long before I did that. Otherwise it should be functioning just as Able designed.

Re: Our Zip Code being entered in shipping information

Posted: Fri May 16, 2014 5:46 am
by Brewhaus
We have not made any customizations to the basket shipping estimate, and do not have guest checkout enabled.

Re: Our Zip Code being entered in shipping information

Posted: Mon May 19, 2014 12:25 am
by ForumsAdmin
@CGrouse
You are at R5?

And @Brewhaus
you are at R6?

right?

Is the bug reproducible in all browsers? FireFox, IE, Chrome?

Re: Our Zip Code being entered in shipping information

Posted: Mon May 19, 2014 4:36 am
by CGrouse
ForumsAdmin wrote:@CGrouse
You are at R5?

right?

Is the bug reproducible in all browsers? FireFox, IE, Chrome?
Correct. So far I've confirmed it happening in Chrome, IE and Safari.

Re: Our Zip Code being entered in shipping information

Posted: Mon May 19, 2014 5:43 am
by Brewhaus
Yes, we are on R6. I have only confirmed the browser for the one instance. The next time it happens I will check the browser, etc., again.

Re: Our Zip Code being entered in shipping information

Posted: Mon May 19, 2014 12:23 pm
by Katie
I can reproduce at both sites (firefold.com and brewhaus.com)

I noticed that Brewhaus.com had the store's zip code pre-populated for both the billing form and the shipping estimate form.

For firefold.com, the billing page is more customized, so I am testing on a R6 build now. When I was testing on R7, I could not reproduce the issue.

If you get a minute, can you both update here and give us a detail configuration for your tax rule. Any zones or groups that it applies to? Address nexus billing or shipping?

Re: Our Zip Code being entered in shipping information

Posted: Mon May 19, 2014 1:04 pm
by Katie
Ok, I can finally reproduce it consistently. First, you have to use the shipping estimate control from the basket.aspx page

and

Taxes must be active for the product being purchased. The bug here is that the taxes are being calculated before we know what the customer's billing address is.

Only when you do both of these together (as a new user) will the postal code pre-populate with the store's zip. I am going to try and reproduce this in R7 now...

Re: Our Zip Code being entered in shipping information

Posted: Mon May 19, 2014 1:54 pm
by Brewhaus
We have just one tax code, and it is applicable in just one state (TX). It applies to all groups (no filter) and is based on the shipping address.

Re: Our Zip Code being entered in shipping information

Posted: Mon May 19, 2014 2:48 pm
by Katie
I have reported this as a bug. Here are the steps to reproduce:

1. Setup a store with default warehouse (e.g. Iowa - 50540)
2. Create a zone for the same state the store warehouse is in (e.g. all of Iowa)
3. Enable tax (use default settings)
4. Create a tax rule that applies to the zone created in Step 2.
5. Make sure the tax rule has a nexus for Shipping Address
6. Apply the tax to a shippable product & make sure there is a shipping method available.
7. With a different browser or new anonymous user, add the taxable product to the basket.
8. Use the shipping estimate control from the basket.aspx page (use a zip outside of the tax zone)
9. Proceed to the next /checkout/default.aspx page. Use Guest Checkout or New Registration options.

From the Checkout/EditBillAddress.aspx page, the Zip Code will be pre-populated with the default store warehouse zip. If you return to the basket page, the shipping estimate control will also have the zip code pre-populated with the default warehouse postal code.

The problem only presents itself when the tax nexus is set to Shipping Address. With Billing Address, I cannot reproduce. Also, the Shipping Estimate control somehow triggers this to happen. If you don't use shipping estimator, then you cannot reproduce.

I'll update here after the developers can review the issue.

Re: Our Zip Code being entered in shipping information

Posted: Mon May 19, 2014 3:17 pm
by Brewhaus
Thank you, Katie. It is great to know that the problem has now been found so that it can be reported and fixed. :)

Re: Our Zip Code being entered in shipping information

Posted: Tue May 20, 2014 4:16 am
by AbleMods
Nicely done Katie!

Re: Our Zip Code being entered in shipping information

Posted: Wed May 21, 2014 12:58 am
by ForumsAdmin
Thanks to Katie for getting this reproduced.

This is happening because of something we are doing in tax calculator. A temporary address created during tax calculation causes this. We have fixed this but we are in process of detailed verification.

Re: Our Zip Code being entered in shipping information

Posted: Mon Jun 09, 2014 12:23 pm
by CGrouse
Any updates on this? We would love to get this fixed.

Re: Our Zip Code being entered in shipping information

Posted: Tue Jun 10, 2014 12:58 am
by ForumsAdmin

Re: Our Zip Code being entered in shipping information

Posted: Tue Jun 10, 2014 4:45 am
by CGrouse
So no fix available without completely upgrading to R8?

Re: Our Zip Code being entered in shipping information

Posted: Tue Jun 10, 2014 6:01 am
by nadeem
The fix is in back-end code. If you have full source code, find CalculateTaxForDelivery method inside CommerceBuilder/Services/Taxes/AbleCommerce
AbleCommerceTax.cs
, locate the following code:

Code: Select all

// ENSURE SHIPPING ADDRESS IS VALID
if (!shippingAddress.IsValidForTax)
{
    shippingAddress.CountryCode = billingAddress.CountryCode;
    shippingAddress.Province = AddressHelper.GetProvinceName(billingAddress.ProvinceId);
    shippingAddress.PostalCode = billingAddress.PostalCode;
}
and replace with the below code:

Code: Select all

// ENSURE SHIPPING ADDRESS IS VALID
 if (!shippingAddress.IsValidForTax)
 {
   // CREATE A TEMPORARY ADDRESS FOR TAX CALCULATION ONLY
   shippingAddress = new Address();
   shippingAddress.CountryCode = billingAddress.CountryCode;
   shippingAddress.Province = AddressHelper.GetProvinceName(billingAddress.ProvinceId);
   shippingAddress.PostalCode = billingAddress.PostalCode;
 }

Re: Our Zip Code being entered in shipping information

Posted: Tue Jun 10, 2014 6:18 am
by CGrouse
Thanks so much! This will help tons.

Re: Our Zip Code being entered in shipping information

Posted: Tue Jun 10, 2014 7:16 am
by AbleMods
R5 full source code does not have a method .IsValidForTax on the Address object. For R5 source, you must also modify /Users/Address.cs and insert this code immediately below the IsValid method:

Code: Select all

        /// <summary>
        /// Gets a value indicating whether address is valid for tax calculation
        /// </summary>
        public virtual bool IsValidForTax
        {
            get
            {
                if (string.IsNullOrEmpty(this.CountryCode)) return false;
                return true;
            }
        }
Once that is done, the provided fix will work in R5.