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

Clearing UPS Shipping Calculation when leaving checkout pages

Thread began 9/21/2009 12:15 pm by crespo7271184 | Last modified 9/21/2009 9:15 pm by Dani Chankhour | 1650 views | 5 replies |

Robert Crespo

Clearing UPS Shipping Calculation when leaving checkout pages

I am trying to clear the shipping calculation after a customer decides to go back to my website to add or remove products from the shopping cart. I do not think it is the best user experience for my customers see the previously calculated UPS shipping charge in the shopping cart.

Is it possible to set a session variable or cookie that would ONLY remove the shipping data if a customer decides to go back and adjust his order? As of right now, the only way a customer can clear the shipping data of the previous UPS calculation is to click the "clear cart" button.

Any suggestions on how to do this will be greatly appreciated.

Sign in to reply to this post

Dani Chankhour

Yes.

You can add this code to the page where you want your UPS shipping cost cleared:

<?php
if(isset($_SESSION["WA_Store_Cart_UPS_Quote"])) {
unset($_SESSION["WA_Store_Cart_UPS_Quote"]);
}
?>

Sign in to reply to this post

Robert Crespo

Still trying to clear the shipping from the shopping cart

Thank you for posting the code. However, after placing the code on the shopping cart page the shipping is still there. Is there any particular place the code needs to be placed? Also, are there any possible triggers that need to be added for the code to work properly?

Sign in to reply to this post

Dani Chankhour

Please try this code again:

<?php
if (!session_id()) session_start();
if(isset($_SESSION["WA_Store_Cart_UPS_Quote"])) {
unset($_SESSION["WA_Store_Cart_UPS_Quote"]);
}
?>

I have added the session start to the top.

You will need to add this code to the top of your confirm page, since that where the shipping cost is being calculated.

Sign in to reply to this post

Robert Crespo

It's working well

Thank you for your continued help. I have one more issue: how do I equally remove the sales tax variable as well?

Sign in to reply to this post

Dani Chankhour

The tax does not get stored in a session a variable and should get calculated every time based on the products in your cart.

Are you experiencing similar issues with tax as of the shipping rule?

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