You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Carol again, I am new to this, but tinkered this up but it always seems to give back 0.00 as the shipping cost, instead of going to the 29.00 if the variable is not 'United States'. Do I have the right variable - is there a list a variables for the software? You said you could provide a quote, please do if I am doing something horribly wrong to try and have the option betwen USA being free and International being 29.00. :
#######################################################################
# Sub Site Store Shipping Custom #
#######################################################################
sub site_store_shipping_custom {
$custom_shipping_method_name = "Standard";
if ($usrcn = "United States") {
$custom_shipping_method_total = "0.00";
} elsif ($usrcn ne "United States") {
$custom_shipping_method_total = "$29.00";
}
print <<ENDOFTEXT;
<INPUT TYPE="HIDDEN" NAME="trship" VALUE="$custom_shipping_method_name::$custom_shipping_method_total">
The cost to ship your order is $currency_symbol$custom_shipping_method_total.<BR><BR>
ENDOFTEXT
}
#######################################################################
# Return True Value For End Of File #
#######################################################################
1;
Change:
###
if ($usrcn = "United States") {
$custom_shipping_method_total = "0.00";
} elsif ($usrcn ne "United States") {
$custom_shipping_method_total = "$29.00";
}
###
To:
###
if (($user_data_ship_country ne "$site_owner_country_num" && $user_data_ship_address ne "" && $user_data_ship_city ne "" && $user_data_ship_zip ne "") || (($user_data_country ne "$site_owner_country_num") && ($user_data_ship_address eq "" || $user_data_ship_city eq "" || $user_data_ship_zip eq ""))) {
$custom_shipping_method_total = "29.00";
} else {
$custom_shipping_method_total = "0.00";
} ######### End of if statement.
###
Offline