www.uburst.com www.uburst.com

"Free shipping question"

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

General Questions
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"Free shipping question"
Posted by russomr on Feb-20-03 at 05:27 PM (EST)
I need to set up my ushop application to have free shipping if the state entered by the customer is AE (it is a military code). How can I place this condition? Any help is greatly appreciated. Thanks.
Click to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

Configuring free shipping based on ..., Microburst Support Team, Feb-25-03, (1)
RE: Configuring free shipping based..., Bill Weiner, Feb-26-03, (2)
Not working, russomr, Mar-14-03, (3)
Not working, Microburst Support Team, Mar-14-03, (4)
RE: Not working, Bill Weiner, Mar-14-03, (5)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "Configuring free shipping based on state"
Posted by Microburst Support Team on Feb-25-03 at 08:30 PM (EST)
You can set up a shipping method calculation type to "Custom" and then modify the custom_shipping subroutine.
In your custom_shipping subroutine (found in the ushop.pl script), you could add some code as shown in this example to check the billing_state and then set the shipping cost to 0.0 if the billing state is AE (see the snippet of code added near the end of this subroutine):

#---------------------------------------------------------------------------
# Subroutine to perform a custom shipping calculation.
#---------------------------------------------------------------------------
sub custom_shipping
{
local ($shipping_table) = @_;
local ($ret_value);

# Reset the return value.
$ret_value = 0.0;

#---------------------------------------------------------
# Variables that may be useful in your custom calculation.
#---------------------------------------------------------

# The name of the currently selected shipping method.
$shipping_method = $shipping_method;

# The table/value of the currently selected shipping method.
$shipping_table = $shipping_table;

# The current billing state.
$billing_state = $billing_state;

# The current billing country.
$billing_country = $billing_country;

# The current billing zip code.
$billing_zip_code = $billing_zip_code;

# The current shipping state (if any).
$shipping_state = $shipping_state;

# The current shipping zip code (if any).
$shipping_zip_code = $shipping_zip_code;

# The current shipping country (if any).
$shipping_country = $shipping_country;

# The subtotal of the items in the shopping cart (before any discounts).
$totals_subtotal1 = $totals_subtotal1;

# The subtotal of the items in the shopping cart (after any discounts).
$totals_subtotal2 = $totals_subtotal2;

# The total weight of the items in the shopping cart.
$totals_total_weight = $totals_total_weight;

# The total quantity of items in the shopping cart.
$totals_total_quantity = $totals_total_quantity;

# The total of all/any shipping modifiers that were associated with each
# product in the cart. Typically, this $totals_shipping_modifier should
# just be ADDED to the total shipping charge, such as:
# $ret_value += $totals_shipping_modifier
$totals_shipping_modifier = $totals_shipping_modifier;

# NOTE: The $ret_value should be the desired shipping charge.

# check if shipping state is AE and set shipping cost to 0 if so
if ($shipping_state eq "AE")
{
$ret_value = 0.0;
}
else
{
$ret_value = 5.0; # whatever shipping value you want here
}

return ($ret_value);
}
# End of custom_shipping()


Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . "RE: Configuring free shipping based on state"
Posted by Bill Weiner on Feb-26-03 at 07:54 AM (EST)
Another option to might be to just add a different Shipping Method that can be selected by Military Customers. Ie.

Standard Shipping
Overnight Shipping
AE Shipping

Of course this relies on the customer to choose the desired shipping.

The "custom_shipping" method described above will automate it for you.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
3 . "Not working"
Posted by russomr on Mar-14-03 at 00:39 AM (EST)
I placed the sample code in the UShop.pl file and it is not working. It is still charging for S&H. I really don't want the user to have to select the AE Shipping choice (option #2 you suggested). Any ideas on what I might be doing wrong when substituting this code in the file?
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
4 . "Not working"
Posted by Microburst Support Team on Mar-14-03 at 05:58 AM (EST)
Go ahead and fill out an official support request from this link
http://www.uburst.com/supportform.html
using your license, and give us the URL to your control panel and the password to log in.

If we can't spot the problem that way, we'll need you to e-mail us either your FTP information or your ushop.pl script.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
5 . "RE: Not working"
Posted by Bill Weiner on Mar-14-03 at 06:47 AM (EST)
Also, after making the modifications, did you remember to specify the "CUSTOM" shipping type when setting up the shipping options in the uShop Control Panel?
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.