close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

UPS shipping options on shopping cart page based on zip code

Thread began 3/07/2012 5:06 pm by toni272059 | Last modified 11/25/2013 2:54 pm by Jason Byrnes | 1342 views | 7 replies |

toni272059

UPS shipping options on shopping cart page based on zip code

I would like to add an option on the shopping cart page for customers to see UPS shipping option prices -- ground, next day, 2nd day, etc -- based on the shopping cart contents and a zip code entered by the shopper on the shopping cart page.

This would happen before they select Checkout where they enter all their shipping details

I found the eCart snippet for UPS Services but not sure how to link to zip code field and service option price results fields

The UPS shipping calculation is working on the confirm page so that part of the eCart has been setup. I want to utilize the calculation earlier, on the shopping cart page (if possible)

JPEG attached with screen shot showing shopping cart and added form fields

Is there a tutorial somewhere I can refer to?
Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to add a UPS Shipping rate server behavior. go to Window -> Server behaviors. In the server behaviors panel, click the plus button and select eCart -> Shipping -> UPS.

set the trigger to use the Get Shipping button pressed. For service type, click the lightning bolt and select the service select list. on step 4 where you set the shipping destination, click the lightning bolt next to zip code and select the zip code form element.

Sign in to reply to this post

toni272059

OK, I followed those steps and setup the server behaviour.

Next question -- what do I do to make the shipping quote appear in the Shipping Quote: box?

I tried binding <?php echo $eCart1->GetRuleValueByName("Shipping", urldecode("UPS Shipping")); ?> which generates a 0.00 in the table cell. But when I enter a zipcode and click Get Shipping Price nothing happens, the 0.00 remains.

If I continue thru the Checkout to the Order Confirmation page there is a price for shipping

Also, on another note -- is there a way to have the information entered in the Checkout box remain should someone decide to go back from the Order Confirm page to Modify Information?

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

there must be an issue with looking up the quote.

in the bindings panel, expand the binding group for UPS Shipping, and add the full request and full response bindings, this will contain info on what the problem is.

to retain the selections that are made, you will need to store them in session variables using the eCart Set session value behavior, then use the session variables as the intial values for the form elements.


to add a set session value behavior, go to the server behaviors panel, click the plus button and select eCart -> General -> Set Session Value. for the trigger and value, click the lightning bolt and select the form element. For the name, use the same name as the form element to make it easier to identify.

Sign in to reply to this post

toni272059

I added the full request/response.
The problem is it does not recognize there are items in the cart.

The errors that show in the attached screen grab remain the same
-- when the page first opens (redirected from detail page)
-- after I enter the zip code, select a shipping option, and click Get Shipping Price.

The shipping option code is inside the eCart form.

I have attached the cart.php (with UPS client account details removed)
I notice there are two eCart Continue Shopping Button server behaviors....?

Attached Files
cart.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

jocelyne.lavergne349586

Cannot find the "service select list"

Originally Said By: Jason Byrnes
  you would need to add a UPS Shipping rate server behavior. go to Window -> Server behaviors. In the server behaviors panel, click the plus button and select eCart -> Shipping -> UPS.

set the trigger to use the Get Shipping button pressed. For service type, click the lightning bolt and select the service select list. on step 4 where you set the shipping destination, click the lightning bolt next to zip code and select the zip code form element.  


where do I find this dynamic data?
Thank you

Sign in to reply to this post

Jason ByrnesWebAssist

you have to add the ser ice select list to the page first, go to the bindings panel and select WA eCart -> Shipping -> UPS Service.


the select list will need to be added to the checkout page.


for every form element that you add to the checkout page, you will need to add 2 things to the confirm page:

1) the confimr page has a collection of hidden form elements to capture the values posted from the checkout page, you need to add a new hidden form element with the same name as the one from the checkout page:

php:
<input name="OrderPromotionalCode" type="hidden" id="OrderPromotionalCode" value="<?php echo((isset($_POST["OrderPromotionalCode"]))?$_POST["OrderPromotionalCode"]:""?>" />




2) Each form element has a corespondin set session value behavior on the confirm page.
on the sever behaviors panel, click the plus button and select eCart -> General -> Set Session Value.

Set the trigger to any form post.

set the name to the same as the form element.

click the lightning bolt next to value and select the corresponding form element from the form collection.

in the ups shipping behavior, bind the service to the session variable.

Sign in to reply to this post

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