close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Add a flat-rate shipping option to UPS list

Thread began 9/23/2009 1:32 pm by christy342106 | Last modified 9/30/2009 5:49 pm by christy342106 | 9699 views | 11 replies

Eric Mittman

I think that your switch statement is ok for displaying the service type. When it comes to getting the new flat rate shipping charges working the first thing you will need to do is add in the set session value server behavior. You can get to this in the eCart section of the server behaviors. When you add in the new session variable you can specify the trigger as the posted form element for the service select list you have. For the name just give it something meaningful like flat_shipping. For the value you can just set it to the posted select list value.

Once that has been written to the page you will need to customize it. For the condition you will need to update it so that it is not only looking for the posted element being set but also the two values that indicate flat rate shipping. So you will add in an and condition then some parenthesis to check if the value is equal to one of the flat rate values. It will look something like this when you are done with it:

php:
if(($_POST['your shipping select list'] != "") && (($_POST['your shipping select list'] == '50') || ($_POST['your shipping select list'] == '100')) )     { // I used 50 for US and 100 for internationsl

  $_SESSION["flat_shipping"] = $_POST['your shipping select list'];
}



Once you have got this session variable worked out you can then add in the new shipping rules. For the US just look for the presence of a session variable and specify the flat_shipping variable then also that the value of this session variable is set to '50'. You will do the same thing for the international but you will check to see if it is set to '100'.

Finally to edit the UPS you will just add in two more conditions, you will check to see if your flat_shipping variable is not set to '50' or not set to '100'. If these conditions are met then you should just apply the shipping quote that is returned.

If you have any questions about any part of this please let me know and I will do what I can to help clarify anything for you.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...