close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Shipping by Region

Thread began 1/11/2010 12:05 pm by jon392819 | Last modified 2/24/2010 6:41 pm by Eric Mittman | 1531 views | 12 replies |

jon392819

Shipping by Region

Hi, what is the best approach for adding the shipping to the total before checkout. Lets say I have the following 3 regions which have a flat rate each. The customer needs to select a shipping region before checkout

Ireland
UK
North America

It does not matter the number of items and the items have no weight recorded.

It is planned to pass the total to Paypal using normal payment.

Many thanks

Jon

Sign in to reply to this post

Eric Mittman

To make the flat rate shipping for these selections you would need to first capture the selected country that the user chooses and store the value in a session variable. Next you would craft your shipping charge rules and based on the value held in this session variable you would use one rate versus another.

To capture the country in a session variable add a set session value server behavior to your page. For the trigger use the bindings and select the checkout form element for the country. For the value you will choose the same element.

Once you have done this you can create the rule. In your charge rules you will first check to see if the session variable that holds the value for the country exists, if it does then the next condition in the trigger will be to see if it equals your first country value. If it does then you would apply the flat rate for that country in the calculation portion.

You would repeat this for each of the countries making sure to apply the correct flate rate amount for each. Please post back with any additional questions that you have about any part of this.

Sign in to reply to this post

jon392819

toshumber

Many thanks Eric. Is it possible to prevent checkout until a country has been selected?

Its my first attemp at using E-Cart. Will the above make more sense after completing the sample store or is there a good guide I can read?

Thanks again Eric

Sign in to reply to this post

Eric Mittman

You can add validation to the checkout form to ensure that the user selects a country before proceeding. If you have either CSS Form Builder or Validation Toolkit you can apply either client side or server side validations for the checkout form country selection. If the user does not select one you have have an error show letting them know to select a country. If you have either of these products you should try running the validation wizard on your checkout page.

As for a guide or reference to help you make sense of the charge rules here is a link to one that references the Blue Sky store:

ecart_discount_sr.pdf

This is for discounts but the concept and interfaces are the same for shipping, tax, and charge rules. The only difference between these and a discount rule is that discount amounts are subtracted from the total and charge amounts are added to the total. Please post back with any specific questions that you have about any part of this and I will help you with whatever I can.

Sign in to reply to this post

jon392819

Voyagermoon.com

Hi Eric,

I saw with interest the example site on the webassist site and was wondering if you know how they handle the shipping as its exactly how I would like to do it.

I am not sure whether PayPal is sending back info to website using IPN or if paypal are adding the shipping with no shipping detail costs happening on the site.

Many Thanks

Jon

Sign in to reply to this post

Eric Mittman

Are you referring to the PowerStore Demo site? Was it a flat rate shipper you were looking at? Please post back with the details about the example you are referring to and I will be glad to help lead you in the rite direction.

Sign in to reply to this post

jon392819

Found it on here:

showcase.php

Voyagermoon.com

I liked the way she has the shipping note at checkout.

J

Sign in to reply to this post

Eric Mittman

This particular site is using an implementation of PowerStore with the shipping charges altered using the eCart.

The idea here is the same, you will check on the ship to country and store this in a session variable. Then in your shipping charge rules you will have three, one for UK, another for Ireland, and another for North America.

In your shipping charge rule you will check on this session variable to see if it is UK, and also the total of the order. If it fits that criteria then you would apply the flat rate amount you specified in that rule. You will need at least one for each country, and if you have multiple shipping rates to offer then you will need to have that setup for each country also.

You get the ship to country on the pp_confirm page. It is part of the bindings for the PayPal Express Checkout. Please post back with any questions that you have about any part of this.

Sign in to reply to this post

jon392819

Shipping by Region

Eric, This worked first time. Thanks for your help.

I used some small php if statements to check the sessions existed, and only display the checkout button if they do.

I was amazed at how the cart updates in real time as I select the country in the dropdown.

I have not looked at the code behind the shipping triggers, but am most impressed.

Thanks again. Top Job.

Jon

Sign in to reply to this post

jon392819

Checkout problem

Eric,

I spoke too soon. Small problem. All works fine on my cart page but the confirm page loses the flate rate it added on the cart page. Help! So near, but....

Thanks

Jon

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