# shipping variables

Thread began 3/09/2010 11:21 pm by JBWebWorks | Last modified 3/10/2010 9:51 pm by Eric Mittman | 1334 views | 3 replies |

## 3/09/2010 11:21 pm  |  #1 JBWebWorks

### shipping variables

not sure how to write shipping rules that have several variables.

three item types
1
2
3

owner wants these shipping variables
item 1 and item 3
qty 1-3 shipping is \$6.50
4 and over shipping is \$10.70

item 2
qty 1 shipping is \$6.50
2 and over shipping is \$10.70

Any combination of item 1, 2 or 3
shipping is \$10.70

thanks
Jim B

## 3/10/2010 3:50 pm  |  #2 Eric Mittman

You can set these shipping charge rules directly in the cart object. There is no need for any variables, you can write the rules like how you have them here.

For the first example you would craft the rule like this:

Presence of an item in the cart, if item 1 exists in the cart
AND quantity of a specific item in the cart, if the quantity of item 1 in the cart is <= 3
OR Presence of an item in the cart, if item 3 exists in the cart
AND quantity of a specific item in the cart, if the quantity of item 3 in the cart is <= 3

The charge would be a flat rate of 6.50. I'm including a screen shot of this so you have a visual reference as well. You should be able to craft the other charge rules in a similar fashion.

## 3/10/2010 9:22 pm  |  #3 JBWebWorks

thanks Eric

that helped me a lot.

one problem i am having is different shipping rules overlapping.

for instance i have the rule for item 1 and 3 qty being <= 3 shipping is \$6.50
another rule is item 2 qty = 1 shipping is \$6.50
another rule is qty of unique items >= 2 shipping is \$10.70

so if the cart has 1 of item 1 shipping is \$6.50 and cart also has 1 of item 2 shipping is \$6.50 and the combination of item 1 and 2 has shipping of \$10.70, so total shipping is \$23.70.

## 3/10/2010 9:51 pm  |  #4 Eric Mittman

You will need to decide what shipping rule will take precedence, then for the other shipping rules you can check on the opposite of the conditions for the main rule.

So if you wanted the first rule in your scenario to take precedence you would need to alter the other two rules like this:

item 2 qty = 1 shipping is \$6.50
In this rule you would need to add the opposite condition of the first rule, so in here you would add a condition that says 'and if item 1 or item 3 does not exist in the cart'. You would do the same in third rule, you would need to add a condition to make sure that items 1 and 3 are not in the cart.

The charge rules are very flexible and you can account for many situations, you just need to determine in advance how exactly you would like the charges to occur then based on this configure them to fit your scenario.

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

## Everything else!

Close Window

Account or customer service questions?

Need technical support?

Content

Layout

Ease of use

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 Window

## We were unable to retrieve the attached file

Close Window

### Attach and remove files

• Text Formatting
• Insert Element
• Block Formatting
• Cancel
Close Window

Close Window

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