# setting a negative shipping amount based on variables

Thread began 7/30/2010 5:51 am by sandy259886 | Last modified 7/30/2010 9:54 am by CraigR | 1187 views | 5 replies |

## 7/30/2010 5:51 am  |  #1 sandy259886

### setting a negative shipping amount based on variables

I want to offer free shipping if a session variable = a certain value
AND
if there are more than 2 items in the shopping cart.

However, I also want to offer free shipping if a different session variable exists
AND there are more than 3 items in the shopping cart.

I don't think I can add all of these to my baserate and increment rate shipping . I'm thinking I need to have a different shipping method that sets a negative amount of shipping if these variables are met and that negative amount will calculate to zero.

My rate charged is based on a flat rate of : \$_SESSION['BaseRate']

How do I make this amount ... \$_SESSION['BaseRate'] ... a negative amount?

## 7/30/2010 7:28 am  |  #2 CraigRBeta Tester

would it not be easier to set this up as a discount if the criteria are met. so that the level of discount matches the shipping cost.

in your cart display, the shipping would still be shown , but the 'free shipping' discount would also be shown, with the cart subtotal calculated correctly

## 7/30/2010 7:33 am  |  #3 sandy259886

### the increment?

My shipping is set to "baserate" for the first item and "incrementrate" for each additional item ... How could I do that for the incremental rate?

## 7/30/2010 9:20 am  |  #4 CraigRBeta Tester

can you show me the shipping calculations you have set up for baserate and increment rate ?

## 7/30/2010 9:33 am  |  #5 sandy259886

### shipping calculation

2 Calculations for shipping:

1) Baserate
if TotalWeight >0
calculation: Flat Rate = \$_SESSION['Baserate']

2) Increment
if TotalWeight > 1
calculation: Total Weight times \$_SESSION['Increment']
minus \$_SESSION['Increment']

## 7/30/2010 9:54 am  |  #6 CraigRBeta Tester

try putting the exact same calculations in the discounts tab of the ecart object, they should calculate the same, but as negative values, thus cancelling the shipping

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