URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: ushop_prog_tips
Thread Number: 59
[ Go back to previous page ]

Original Message
"Populating State Fields For Tax Calculation"

Posted by James on at 01:56 PM
Hi,
Had a client that was concerned about tax choices being able to be bypassed when set to shipping address. If the shipping address is the same as billing address customers do not complet form leaving the option open. Here is a resolve that will fix for state to be populated so tax calculation will work regardless of billing or shipping address settings. This can also be modified to dyamically populate same billing data into shipping address.


Hope this helps...
James


Table of contents

Messages in this discussion
"Code Posting.... "
Posted by James on at 02:03 PM
Sorry,
Coding looked fine in preview before posting. The first part of coding (onChange) to be insterted within select option tag for "billing_state" with states pull down. Then a simple text input form tag for "shipping_state" in the shipping section.

Thanks,
James


"Full Order Template Billing 2 Shipping Population "
Posted by James on at 09:47 AM
Hi,
I posted a full order template that will populate the fields onChange from Billing to Shipping. If the shipping data is different customer can easily change. This also helps by customers forgetting to choose tax options if they only complete billing side and tax settings are applied to shipping side.

http://www.hamptonplace.com/zzuShop/order_template_populate.html

enjoy,
James


"Full Order Template - Billing 2 Shipping Update / Fix"
Posted by James [mail@hamptonplace.com] on at 09:22 PM
Hi,
The version 3.3 does not work with the previous template that uses the select option code, you will get an error 500 because of a java conflict with the cgi. I altered the template removing the select options for state and country which resolves the the problem for this version of uShop.

http://www.hamptonplace.com/zzuShop/order_template_populate_v2.html

Enjoy,
James


"RE: Full Order Template - Billing 2 Shipping Update / Fix"
Posted by Bill Weiner on at 05:45 PM
I took a look at your JavaScript... and for some reason the () in the onChange methods of the state and country fields was causing that conflict. Why? I don't know. In any case, I made a change (ie. there's more than one way to skin a cat :^)

.... So check out that updated template on the developer's add-on page.