close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Customizing the shipping rate

Thread began 6/16/2010 4:08 am by dave403891 | Last modified 6/16/2010 8:58 am by dave403891 | 1381 views | 4 replies |

dave403891

Customizing the shipping rate

I need to have a shipping rate based on the subtotal of all products in the cart that equals a minimum of $4 or 10% whichever is higher. I entered the following code in the eCart Object calculations, but it calculates on each line item rather than the subtotal.

For example, if I have three items at $15 my subtotal is $45 and shipping should be $4.50. I now get shipping at $12.00 or $4 for each item based on item totals rather than the subtotal of all items.

Here's my current code: ((([Price] * [Quantity]) * 0.10) > 4)?(([Price] * [Quantity]) * 0.10):4 How do I adjust this to get what I'm looking for?

Sign in to reply to this post

Jason ByrnesWebAssist

don't do this on the calculation tab, as you have discovered, calculations are applied on a line item basis.

Instead, do this on the shipping tab.

Create a new shipping rule:

trigger:
based on number of unique items in the cart > 0

calcualtion:
Flat Rate calculation of:
(($this->TotalColumn('TotalPrice') * 0.1) > 4)?$this->TotalColumn('TotalPrice') * 0.1:4

Sign in to reply to this post

dave403891

Jason,

Got the first part. But have a question here:

calcualtion:

Flat Rate calculation of:
(($this->TotalColumn('TotalPrice') * 0.1) > 4)?$this->TotalColumn('TotalPrice') * 0.1:4

I don't see a place after Flat rate selection in the shipping tab to insert the calculation code.

Does this go in the calculation tab and if so what goes in the calculation section of the shipping tab?

Sign in to reply to this post

Jason ByrnesWebAssist

when you select flat rate, there is a text box to enter the flat rate:
Create a Flt rate Shipping of $[text box]

enter that code in the text box
Create a Flt rate Shipping of $[(($this->TotalColumn('TotalPrice') * 0.1) > 4)?$this->TotalColumn('TotalPrice') * 0.1:4]

(Without the square brackets, I am using them to illustrate the text box)

Sign in to reply to this post

dave403891

Jason,

Everything is working. Many Thanks

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