# New user needs help with shipping calcs

Thread began 4/21/2010 11:40 pm by Dennis | Last modified 4/26/2010 12:49 pm by Dennis | 961 views | 6 replies |

## 4/21/2010 11:40 pm  |  #1 Dennis

### New user needs help with shipping calcs

Hi, I'm having troubles setting up my shipping, whch is based on the TOTAL quantity.
The rates are...
Qty 1 = \$3
Qty 2 = \$5
Qty 3-5 = \$11
Qty 6-10 = \$13

Also, how can I have a a message "Call 123-456-7890 for shipping charges" displayed for qty >=11 ?

Help would be appreciated, please be as specific as posible, this is my first time using eCart and I'm quite confused with the shipping rules, triggers and calculations.

Dennis

## 4/22/2010 11:13 am  |  #2 Jason ByrnesWebAssist

you will need to create 4 shipping rules, one for each scenario.

1 item:
Trigger:
Subtotal For Any Column.
If the Subtotal for column "Quantity" is "=" a value of "1"

Calculation:
Flat Rate.
Create a flat rate shipping of \$"3"
-----
2 item:
Trigger:
Subtotal For Any Column.
If the Subtotal for column "Quantity" is "=" a value of "2"

Calculation:
Flat Rate.
Create a flat rate shipping of \$"5"

-----
3 - 5 item:
Trigger:
Subtotal For Any Column.
If the Subtotal for column "Quantity" is ">=" a value of "3"

AND
Subtotal For Any Column.
If the Subtotal for column "Quantity" is "<=" a value of "5"

Calculation:
Flat Rate.
Create a flat rate shipping of \$"11"

-----
6 - 10 item:
Trigger:
Subtotal For Any Column.
If the Subtotal for column "Quantity" is ">=" a value of "6"

AND
Subtotal For Any Column.
If the Subtotal for column "Quantity" is "<=" a value of "10"

Calculation:
Flat Rate.
Create a flat rate shipping of \$"13"

To show the error message if there are more then 10 items in the cart, use the following code:

php:
``````<?php if(\$yourCartName->TotalColumn("Quantity") > 10) { ?>
Call 123-456-7890 for shipping charges.
<?php } ?>``````

in the code above, you will need to substitute "yourCartName" for the name of your eCart object.

## 4/22/2010 11:50 am  |  #3 Dennis

Jason,

Thanks for the precise instructions, I had no problems following them and it all appears to be working.

One problem with my logic. If the customer selects qty > 10, the message (to call) appears as planned, but they can still place the order. And because of my 4th scenario above, the shipping charges are removed.

Is there a way to prevent the order from going any futher until the qty is reduced to 10 or less.

Dennis

## 4/22/2010 12:33 pm  |  #4 Jason ByrnesWebAssist

place another if statement around the <form....> and </form> tag so that the checkout button wont do anything unless the qty is 10 or less:

find the form tag add the if statement:

php:
``````<?php if(\$yourCartName->TotalColumn("Quantity") <= 10) { ?>
<form......>
<?php } ?>``````

same if statement for the closing </form> tag:

php:
``````<?php if(\$yourCartName->TotalColumn("Quantity") <= 10) { ?>
</form>
<?php } ?>``````

## 4/22/2010 1:07 pm  |  #5 Dennis

Thanks again Jason,

Would that code also block the Clear Cart & Update buttons? They don't seem to be functioning.

I may have things screwed up in the browser, I had > 10 items in the cart, then I modified the code per your suggestions, witout first clearing the cart.

I've fiddled around so much that it may be best to recreate the page, now that I have a plan in place.

Dennis

Update, I tried it from another computer, and at qty > 10 ALL buttons seem disabled.

Here is the link, if it should be useful. TshirtOrderForm.php

## 4/22/2010 2:12 pm  |  #6 Jason ByrnesWebAssist

well, yes, if you put that on the cart display page, it will disable all buttons. you could just put the if statement around thew checkout button so the checkout button will only appear if there are 10 items or less.

## 4/26/2010 12:49 pm  |  #7 Dennis

Hey Jason,

This worked great, thanks fo your help.

Dennis

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

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

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