uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
More than 5 shipping options

Knowledge Base Lobby : uShop Support Conference : Tax, Shipping, and Handling Questions
Nov-18-17 10:55 AM EST
Original Message
More than 5 shipping options
Author Les on 08-08-2002 at 06:31 (EST)
Can this be done?

We need 6 options for people to choose instead of 5, how can we add another option.

Thanks in advance.
TABLE OF CONTENTS

Table Of Contents
  RE: More than 5 shipping options Bill Weiner, 2002-08-09 04:20:08 (1)
            RE: More than 5 shipping options" Les, 2002-08-09 10:44:11 (2)
                 RE: More than 5 shipping options Bill Weiner, 2002-08-13 04:16:42 (3)

Messages In This Discussion
         1. RE: More than 5 shipping options
        Author Bill Weiner on 08-09-2002 at 04:20 (EST)
Usually that can be accomplished by utilizing the 5 shipping options in combination with the "custom" shipping option. That is, depending on the shipping options you want... you can usually reduce the shipping choices to be within five, such as:

1) First Class
2) Standard
3) Overnight
4) Priority
5) Ground

... and then implement the "custom_shipping" subroutine to automatically perform any other calculations... such as determine "First Class" charges based on the customers "$billing_country" or "$shipping_country".

I could provide more information if I new what shipping options you wanted.

Refer to the uShop Programmer's Guide:

http://www.uburst.com/uShop/reference/programmers_guide.html

For more about custom shipping calculations.
TABLE OF CONTENTS
                 2. RE: More than 5 shipping options"
                Author Les on 08-09-2002 at 10:44 (EST)
Bill,

I need 6 options. Charges are in brackets but I don't need them to be shown on the selection display.

Royal Mail - mainland UK (2.00 chage)
Royal Mail - non-mainland UK & rest of Europe (3.00 chage)
Royal Mail - Rest of the world (5.00 chage)

Courier - mainland UK (10.00 chage)
Courier - non-mainland UK & rest of Europe (20.00 chage)
Courier - Rest of the world (30.00 chage)

Can I set up the script so that I only have 2 different dropdown selections, 1 Royal Mail and the other Courier.

I presume I need to use a CUSTOM shipping method and (for example on the Courier example) have something like France,20.00,Italy,20.00 but when I add it into the box it won't work.

If you could just give me a quick example of how to set up the first one then I can work out the rest.

Also will this work with a dropdown country selection of will the customer have to enter the country themselves.


Thank you for your help

Les
TABLE OF CONTENTS
                         3. RE: More than 5 shipping options
                        Author Bill Weiner on 08-13-2002 at 04:16 (EST)
As mentioned in the email to you last week, you could have just two shipping options setup EXACTLY like this:

Shipping Method 1
Calculation Type: CUSTOM
Shipping Name: Royal Mail
Shipping Table/Value:

Shipping Method 2
Calculation Type: CUSTOM
Shipping Name: Courier
Shipping Table/Value:

And then edit the "custom_shipping" subroutine in your ushop.pl file to be like this:

(Avoid line wraps in the code below).

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

# Make a list of European countries. (Keep the first "LIST")
$european_values = "LIST,BELGIUM,BULGARIA,CROATIA,CZECH REPUBLIC,DENMARK,FINLAND,FRANCE,GERMANY,GREECE,HUNGARY,IRELAND,ITALY,LIECHTENSTEIN,LITHUANIA,LUXEMBOURG,NETHERLANDS,NORWAY,POLAND,PORTUGAL,ROMANIA,SCOTLAND,SLOVAKIA,SLOVENIA,SPAIN,SWEDEN,SWITZERLAND,TURKEY,WHALES,YUGOSLAVIA";

# Make a list of UK mainlain countries/values. (Keep the first "LIST")
$uk_values = "LIST,UNITED KINGDOM,UK,ENGLAND";

# Initialize the return value.
$ret_value = 0.0;

# Determine the country.
if ($shipping_country eq "")
{
$country = ",$billing_country";
}
else
{
$country = ",$shipping_country";
}

# Determine shipping based on method and country.
if ($shipping_method eq "Courier")
{
if ($uk_values =~ /$country/i)
{
$ret_value = 10.0;
}
elsif ($european_values =~ /$country/i)
{
$ret_value = 20.0;
}
else
{
$ret_value = 20.0;
}
}
else
{
if ($uk_values =~ /$country/i)
{
$ret_value = 2.0;
}
elsif ($european_values =~ /$country/i)
{
$ret_value = 3.0;
}
else
{
$ret_value = 5.0;
}
}

# Add any shipping modifiers.
$totals_shipping_modifier = &strip_letters($totals_shipping_modifier);
$ret_value += $totals_shipping_modifier;

return ($ret_value);
}
# End of custom_shipping()
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.