P
Paul Taylor
I have a shopping cart script with a pop up menu for the shipping
variables. I have two options at present, option 0, standard 'UK
Delivery' charge rate, option 1, for 'Collect'. The default is option
0.
I would like to add a third for 'Free Delivery' (which I have added).
However the option should only be available and selectable when the
sub total of the order is 75.00 or more. The option on the pop up
should also default to 'Free Delivery' when this amount or more is
reached. Like wise the 'Free Delivery' option should not be selectable
on amounts of 74.99 or less. Is this possible?
Can anybody help as this is a little beyond my scripting ability. Many
thanks.
This is the shipping function from the code.
// ****Start of code section to display totals****
// ****and shipping/handling select box.****
function writeShipping() {
leng = 3;
options = new Array(leng);
options[0] = "UK Delivery";
options[1] = "Collect";
options[2] = "Free Delivery";
// **Begin code section for order totals calculations**
var shipCost = 0
// **Shipping charges.**
// **These definitions correspond to the shipping select**
// **options defined in the writeShipping() function.**
function shippingCost() {
shipCost = 0
itemUp = counter - 1 // variable to increment charges
multiplier = .5 // additional charge per item after first.
if (document.shopCart.ShipVia.options[0].selected) {
shipCost = 5.95 } // Standard Delivery
if (document.shopCart.ShipVia.options[1].selected) {
shipCost = 0.00 } // Collect
if (document.shopCart.ShipVia.options[2].selected) {
shipCost = 0.00 } // Free Delivery
}
*/
document.shopCart.shippingcharge.value = fix(with_Shipping)
transaction_amount = sub_total + with_Shipping
{
document.shopCart.transactionamount.value = fix(transaction_amount)
}
}
}
variables. I have two options at present, option 0, standard 'UK
Delivery' charge rate, option 1, for 'Collect'. The default is option
0.
I would like to add a third for 'Free Delivery' (which I have added).
However the option should only be available and selectable when the
sub total of the order is 75.00 or more. The option on the pop up
should also default to 'Free Delivery' when this amount or more is
reached. Like wise the 'Free Delivery' option should not be selectable
on amounts of 74.99 or less. Is this possible?
Can anybody help as this is a little beyond my scripting ability. Many
thanks.
This is the shipping function from the code.
// ****Start of code section to display totals****
// ****and shipping/handling select box.****
function writeShipping() {
leng = 3;
options = new Array(leng);
options[0] = "UK Delivery";
options[1] = "Collect";
options[2] = "Free Delivery";
// **Begin code section for order totals calculations**
var shipCost = 0
// **Shipping charges.**
// **These definitions correspond to the shipping select**
// **options defined in the writeShipping() function.**
function shippingCost() {
shipCost = 0
itemUp = counter - 1 // variable to increment charges
multiplier = .5 // additional charge per item after first.
if (document.shopCart.ShipVia.options[0].selected) {
shipCost = 5.95 } // Standard Delivery
if (document.shopCart.ShipVia.options[1].selected) {
shipCost = 0.00 } // Collect
if (document.shopCart.ShipVia.options[2].selected) {
shipCost = 0.00 } // Free Delivery
}
*/
document.shopCart.shippingcharge.value = fix(with_Shipping)
transaction_amount = sub_total + with_Shipping
{
document.shopCart.transactionamount.value = fix(transaction_amount)
}
}
}