Custom Shopping Cart Field Verification Help
Posted: Tue Jul 01, 2003 7:36 am
Hi,
(Trying to do something tricky here, so bear with me...)
We require that all our International customers agree to assume
responsibility for any duties and taxes imposed on their order by their
local governments. Currently, this requires back and forth e-mails, a
long delay, and a lot of unanswered orders.
I'd like to use the Custom Shopping Cart field in Shopsite 6.3 Pro to
have a check box for consenting to this before they can submit the
order. I read the documentation and think I can get through that part
OK.
However, I'd LIKE to have this box required to be checked only if they
choose a country OUTSIDE the USA and Canada. So, I wrote a Javascript
verifier function as below:
-------------------------------------------------------------------------------------------------------------
<SCRIPT LANGUAGE="Javascript" TYPE="text/javascript">
<!--hide script from older browser
function submitIt(Order)
{if (Order.country.options.value != "US", "CA", "UV") &&
(Order.duties.options.value="")
{alert("International Customers must agree to assume responsibility for
any duties, taxes, or fees imposed by their national and local
governments. Please check the box to continue.") }
else return true }
//end hiding script-->
</SCRIPT>
------------------------------------------------------------------------------------------------------------
Problem 1, it seems, is that I need to put the command <FORM
onSubmit="return submitIt(this)"> into the form field within the cart
page and I don't have access to this part of the html.
Also, how do I put the verifier script from above inside the <HEAD> tags
for the cart page?
Is there any other way I can run this check without needing access to
the FORM SUBMIT html string?
THanks for the help.
Chris
MLCS
(Trying to do something tricky here, so bear with me...)
We require that all our International customers agree to assume
responsibility for any duties and taxes imposed on their order by their
local governments. Currently, this requires back and forth e-mails, a
long delay, and a lot of unanswered orders.
I'd like to use the Custom Shopping Cart field in Shopsite 6.3 Pro to
have a check box for consenting to this before they can submit the
order. I read the documentation and think I can get through that part
OK.
However, I'd LIKE to have this box required to be checked only if they
choose a country OUTSIDE the USA and Canada. So, I wrote a Javascript
verifier function as below:
-------------------------------------------------------------------------------------------------------------
<SCRIPT LANGUAGE="Javascript" TYPE="text/javascript">
<!--hide script from older browser
function submitIt(Order)
{if (Order.country.options.value != "US", "CA", "UV") &&
(Order.duties.options.value="")
{alert("International Customers must agree to assume responsibility for
any duties, taxes, or fees imposed by their national and local
governments. Please check the box to continue.") }
else return true }
//end hiding script-->
</SCRIPT>
------------------------------------------------------------------------------------------------------------
Problem 1, it seems, is that I need to put the command <FORM
onSubmit="return submitIt(this)"> into the form field within the cart
page and I don't have access to this part of the html.
Also, how do I put the verifier script from above inside the <HEAD> tags
for the cart page?
Is there any other way I can run this check without needing access to
the FORM SUBMIT html string?
THanks for the help.
Chris
MLCS