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
Adding a Residential/Business drop down box to orders

Knowledge Base Lobby : uShop Support Conference : Programmer Tips
Nov-20-17 07:41 PM EST
Original Message
Adding a Residential/Business drop down box to orders
Author Nate Lind on 06-28-2001 at 09:26 (EST)
My employer wishes to have a Residential/Business drop down box in the ordering process so that when clients choose the respective location of where they are receiving an order we know what to charge. (UPS charges us an additional $1.50 for Residential ships)

Nate
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  Re: Adding a Residential/Business drop down box to orders Joseph Pishgar, 2001-06-29 10:41:15 (1)
  RE: Adding a Residential/Business drop down box to orders Bill Weiner, 2001-07-01 23:08:18 (2)
            RE: Adding a Residential/Business drop down box to orders Nate Lind, 2001-07-13 13:50:28 (3)
                 RE: Adding a Residential/Business drop down box to orders Bill Weiner, 2001-07-15 22:12:52 (4)
                      RE: Adding a Residential/Business drop down box to orders Nate Lind, 2001-07-16 11:23:16 (5)
                           RE: Adding a Residential/Business drop down box to orders Bill Weiner, 2001-07-17 06:24:40 (6)
                                RE: Adding a Residential/Business drop down box to orders Nate Lind, 2001-07-23 09:47:35 (7)
                                     RE: Adding a Residential/Business drop down box to orders Bill Weiner, 2001-07-25 22:59:37 (8)

Messages In This Discussion
         1. Re: Adding a Residential/Business drop down box to orders
        Author Joseph Pishgar on 06-29-2001 at 10:41 (EST)
I'll check into this.

-Joseph
TABLE OF CONTENTS
         2. RE: Adding a Residential/Business drop down box to orders
        Author Bill Weiner on 07-01-2001 at 23:08 (EST)
There are a couple of options:

OPTION 1: The easiest thing to do would be to make your shipping choices (configured in the Shipping Section of the uShop Control Panel) be name something like:

UPS (Business Drop)
UPS (Residential Drop)

.... and then just configure the shipping formula/table to add the extra $1.50 for residential drops.

OPTION 2: The second option would be to use any of the "extra" fields that are available on the "order_template.html" file. You can use the "extra" fields to add your additional business/residential selection box... but if you want the $1.50 automatically added, you'd have to modify the uShop CGI script based on the new field that you added.
TABLE OF CONTENTS
                 3. RE: Adding a Residential/Business drop down box to orders
                Author Nate Lind on 07-13-2001 at 13:50 (EST)
I like the ease of option 1, but we have several differnt UPS options such as ground, air, 2day etc. That might mean we would have two options for each of those. My employer likes Option two, but I need a little more to go on. Is there something in the reference that would explain adding another field into the script to modify the outcome of the billing?

Nate
TABLE OF CONTENTS
                         4. RE: Adding a Residential/Business drop down box to orders
                        Author Bill Weiner on 07-15-2001 at 22:12 (EST)
To add the extra "residential" drow-down to the order form, you'll just need to modify your "order_template.html" file by adding an additional "SELECT" FORM element.... perhaps using the "shipping_extra1" keyword. See section 9 in the uShop User's Guide for more information about customizing the order form:

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

As for adding the logic to your uShop CGI script such that an extra $1.50 shipping charge is added to "residential" orders, there are a couple ways to handle that. Here's one:

STEP 1: Make a backup of your ushop-lib.pl script...just in case.

STEP 2: Open your ushop-lib.pl script with any text editor such as WordPad.

STEP 3: Do a search on the following line:

$totals_shipping += &strip_letters($totals_shipping_modifier);

STEP 4: Immediately after that line, add the following lines:

if ($shipping_extra1 =~ /residential/i)
{
$totals_shipping += 1.50;
}

STEP 5: Save the file (as TEXT if your editor asks)... and try it out.

Note the above mods assume that your new SELECT that you added to your order form is named "shipping_extra1" and that the value of the selections is "residential".
TABLE OF CONTENTS
                                 5. RE: Adding a Residential/Business drop down box to orders
                                Author Nate Lind on 07-16-2001 at 11:23 (EST)
Might be kinda late, but can this be done with uShop 2.0?

I need to look into upgrading, but my employer is looking to eliminate monthly charges for ecommerce, I don't know if that is realistic.

Thanks Bill,

Nate
TABLE OF CONTENTS
                                         6. RE: Adding a Residential/Business drop down box to orders
                                        Author Bill Weiner on 07-17-2001 at 06:24 (EST)
Oh, you're using uShop 2.0.... Well, in that case, the only option would be to go back to listing separate "Residential" and "Business" shipping options in the shipping menu. In uShop 2.0 there is no limit to the number of different shipping types that are listed in the "shipping" parameter of the order applets.

Otherwise, upgrading to version 3.0 is only a one-time $49 cost.
TABLE OF CONTENTS
                                                 7. RE: Adding a Residential/Business drop down box to orders
                                                Author Nate Lind on 07-23-2001 at 09:47 (EST)
What if we added a text field similar to "Address" or "First Name"/"Last Name" called "Company Name" I've been checking the applet refereces and manual but can't find much to help me add a new field. Any ideas?

Nate
TABLE OF CONTENTS
                                                         8. RE: Adding a Residential/Business drop down box to orders
                                                        Author Bill Weiner on 07-25-2001 at 22:59 (EST)
In uShop 2.x, there was only a limited ability to add additional fields to the order applets. Check out the uShopOrderCustomCGI applet in the uShop 2.x applet reference:

http://www.uburst.com/uShop/reference2/applets.html

... It should show you how to add a "Company Name" field.
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.