close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple Shipping costs

Thread began 9/11/2009 6:56 am by kelly291243 | Last modified 10/07/2009 4:02 pm by Jason Byrnes | 2548 views | 15 replies |

kelly291243

Multiple Shipping costs

Hi,

I would like to add a 2nd option for shipping on my eCart website. At the moment I only have a single shipping cost of £3.75 which is applied to all orders. I am based in the UK and would like to have a shipping cost of £5.75 for all orders I need to ship outside of the UK so I would have:

UK Shipping - £3.75
International Shipping - £5.75

Please could you tell me the best way to do this? Do I need to put this on the cart page or the checkout page? Could I set the shipping cost based on the country chosen from the drop-down menu on the checkout page or just give a checkbox for those outside the UK to tick and have that update the shipping cost?

I understand that a Session may have to be created for this but I am very new to session variables so would appreciate a real step-by-step approach.

The website I have created with eCart is www.tube-shop.com

many thanks for your time

Kelly

Sign in to reply to this post

Jason ByrnesWebAssist

A session variabel is already created that can be used for this.

In the eCart object you will need to create two shipping charges, one for UK orders, one for international orders:

UK Orders:
Triggers:
Session Variable Exists -
Session Variable name: [eCartCheckoutForm_shipping_country]

AND
Based on Session Variable Value -
If the value of session variable [eCartCheckoutForm_shipping_country] is [=] a value of [UK]

Calculation:
Flat Rate charge of 3.75

----
International Orders:
Triggers:
Session Variable Exists -
Session Variable name: [eCartCheckoutForm_shipping_country]

AND
Based on Session Variable Value -
If the value of session variable [eCartCheckoutForm_shipping_country] is [!=] a value of [UK]

Calculation:
Flat Rate charge of 5.75

Sign in to reply to this post

kelly291243

Thank you for the response.

I have tried to add the shipping options you have suggested but at the moment I am getting the following error message:


Microsoft VBScript compilation error '800a0401'

Expected end of statement

/WA_eCart/Adv_CO_Scripts/PP_PayProUK_VB.asp, line 143

httpObj.setRequestHeader "X-VPS-CLIENT-TIMEOUT, "30"


I would like to double check to see if I am sentering the information correctly.

1. Am I to enter the session variable name and value with square brackets around them?

2. For the international shipping you have suggested I put [!=] but this option does not appear in teh drop down list. I get teh following options

>
>=
=
<>
<=
<

I am guessing I should be using [<>] as I think i'm trying to pick thos countries that are not UK.

I also have other shipping options that I have set up so I will put the details below:

1. UK Shipping

Total number of items > 0
AND Subtotal of items < 65.22
AND If session variable exists: [eCartCheckoutForm_shipping_country]
AND If session variable [eCartCheckoutForm_shipping_country] = [UK]

Calculation - Flat Rate 3.75

This gives a shipping fee of 3.75 for all orders under £65.22 to be shipped to the UK

2. UK Shipping with discount

UK Shipping

Total number of items > 0
AND Subtotal of items >= 65.22
AND If session variable exists: [eCartCheckoutForm_shipping_country]
AND If session variable [eCartCheckoutForm_shipping_country] = [UK]

Calculation - Flat Rate 0

This gives a shipping fee of £0.00 for all orders over £65.22 to be shipped to the UK

3. International Shipping

Total number of items > 0
AND If session variable exists: [eCartCheckoutForm_shipping_country]
AND If session variable [eCartCheckoutForm_shipping_country] <> [UK]

Calculation - Flat Rate 5.75

This gives a shipping fee of £5.75 for all orders shipped outside the UK

Sign in to reply to this post

Jason ByrnesWebAssist

To fix the error change line 143 to:
httpObj.setRequestHeader "X-VPS-CLIENT-TIMEOUT", "30"


I'm looking at my copy of that file and it is correctly coded. I cant see why yours would be missing the quotation mark.

Your rules look to be correct, though the second one is not really needed.

Sign in to reply to this post

kelly291243

OK, that's great. Could you please confirm whether I need to use the Square brackets or not?

Thanks again

Kelly

Sign in to reply to this post

Jason ByrnesWebAssist

I put the square brackets in to highlight form input. you should not enter them, just the information inside the square brackets.

Sign in to reply to this post

kelly291243

The shipping charge is still not working correctly. I no longer get the error message so that part is fixed, I just think it's the shipping rules. Just to confirm again what my shipping rules are, I have listed them below in the order they appear in the shipping tab in my cart object:

1. UK Shipping

Total number of items > 0
AND Subtotal of items < 65.22
AND If session variable exists: [eCartCheckoutForm_shipping_country]
AND If session variable [eCartCheckoutForm_shipping_country] = [UK]

Calculation - Flat Rate 3.75

This gives a shipping fee of 3.75 for all orders under £65.22 to be shipped to the UK

2. UK Shipping with discount

UK Shipping

Total number of items > 0
AND Subtotal of items >= 65.22
AND If session variable exists: [eCartCheckoutForm_shipping_country]
AND If session variable [eCartCheckoutForm_shipping_country] = [UK]

Calculation - Flat Rate 0

This gives a shipping fee of £0.00 for all orders over £65.22 to be shipped to the UK

3. International Shipping

Total number of items > 0
AND If session variable exists: [eCartCheckoutForm_shipping_country]
AND If session variable [eCartCheckoutForm_shipping_country] <> [UK]

Calculation - Flat Rate 5.75

This gives a shipping fee of £5.75 for all orders shipped outside the UK


So if I go through my rules:

1. If subtotal of cart is less than 65.22 and country is UK then charge £3.75 shipping

2. If subtotal of cart is equal to or greater than 65.22 and country is UK then charge £0 shipping.

3. If country is not UK then charge £5.75


You mentioned in a previous reply that the second rule doesn't need to be there but how can I add free shipping if an order is over a specific value and in UK only?

Sign in to reply to this post

kelly291243

I figured out why the rules were not working :)

I was using the value for eCartCheckoutForm_country as UK but it should have been GB.

I have the page working fine now, thanks for all your help.

However, my client has now asked for another option which I will require the customer selecting an option.

Currently, my shipping options are:

Standard UK Shipping - £3.75
Free shipping on orders over £75 inc vat
International Shipping £5.75

My client now would like a guaranteed next day shipping option with a value of £5.75. I am guessing that if the customer clicks a checkbox for next day shipping I will need to add £2 to the standard UK shipping charge. What would be the best way to impliment this and which page would this appear on, the cart page or confirm page?

Many thanks again

Kelly

Sign in to reply to this post

Jason ByrnesWebAssist

add the checkbox to the checkout page.

also add a hidden form element with the same name to the confirm page:

to checkout:
<input type="checkbox" name="nextDay" value="1" />

to confirm:
<input type="hidden" name="nextDay" value="<?php echo isset($_POST['nextDay']?$_POST['nextDay']:""); ?>" />


On the confirm page, add a set session value server behavior. On the Server behavior panel, click the plus button and select eCart -> General -> Set Session Value.

For both the trigger and the value, click the lightning bolt and select the nextDay form element.


set the name of the session variable to "nextDay"

now create a new shipping rule using the Session Variable exists "nextDay" trigger and based on session variable value trigger:
if the session variable "nextDay" is "=" to a value of "1"


and set a flat rate charge of 5.75

Sign in to reply to this post

kelly291243

Hi Jason and thank you so much for the help you have given me.

I have added the checkbox to the checkout page with the correct values and the hidden field to the confirm page, again with the correct values.

Unfortunately, I am still stuck on one small point and that is setting the session value. For some reason when I click on set session value server behavior my form element does not appear anywhere in the list. I get the usual WA sessions appear aswell as my ecart object and the local checkout response elements but not my 'nextday' form element. How would I manually enter the data in the trigger field and the value field.

I am coding in ASP rather than PhP and I know from previous experience that the form element would normally appear if the page was PhP but not necessarily in ASP.

With your help, I feel I am very close to completing my shipping charges so hope this will be the last request for help.

Thanks again

Kelly

Sign in to reply to this post
loading

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...