# Setting up shipping rates for products and digital goods

Thread began 9/09/2010 5:35 pm by blackweldermhe400113 | Last modified 9/15/2010 3:34 pm by Jason Byrnes | 741 views | 5 replies |

## 9/09/2010 5:35 pm  |  #1 blackweldermhe400113

### Setting up shipping rates for products and digital goods

I'm trying to figure out what would be the best way to accomplish this. I have a products table that has a foreign key named idcategory_product that pertains to what type of product or category the product belongs to. The categories are greeting cards, audio cds, and audio downloads. When these products apply to the cart their shipping rate is a flat rate that changes based off of the quantity of items in the cart. My problem is when a digital good is purchased it still adds to the quantity in the cart and could therefore change the shipping rate. How can I set the cart up to know that when a digital good is being purchased there shouldn't be a charge for shipping or that it shouldn't be applied to the quantity in the cart?
I need a little push in the right direction.
Thanks
James

## 9/10/2010 10:39 am  |  #2 Jason ByrnesWebAssist

you need to have another column in your products table to flag shippable and non shippable items.

The technique is identical to creating taxable and non taxable items as discussed in this thread:

## 9/14/2010 2:39 pm  |  #3 blackweldermhe400113

### Still a problem...

I'm following along with the post that you linked in your earlier reply. I can't figure out how to handle the calculation. No item in my products table has a specific shipping value. The shipping is based off the subtotal of quantity in the cart shipping rules I've already setup. For instance, 1-5 items ships for one rate, then from 6-10 items ships for another and so on. So, how do I set the calculation or do I need to rewrite my existing rules that are based off the carts subtotal of quantity?

## 9/14/2010 2:46 pm  |  #4 Jason ByrnesWebAssist

you need to rewrite the rules to use the conditional quantity.

you are using flat rate calculations, so rewrite the triggers.

use the trigger:
number of Items with a specific column value:
If the number of items where 'shipable' has a value of '1' is '>1' a value of '1'

AND
number of Items with a specific column value:
If the number of items where 'shipable' has a value of '1' is '<=' a value of '5'

This will trigger the ship amount for 1 - 5 items.

in the 6 - 10 item shipping rate:
number of Items with a specific column value:
If the number of items where 'shipable' has a value of '1' is '>=' a value of '6'

AND
number of Items with a specific column value:
If the number of items where 'shipable' has a value of '1' is '<=' a value of '10'

## 9/15/2010 1:23 pm  |  #5 blackweldermhe400113

### That working...

That worked fine. Now that the shipping rules on reference the items where shippable is = 1 the digital goods in cart work fine. But, I have one other question. I want to write two coupons. One, Buy 4 audio files get the 5th free, and two, buy five cards and get the 6th free. The card is a shippable item while the audio file is not. So, I'm assuming you could reference the shippable field again to apply the coupon, but I'm not sure. I just need a shove in the right direction. What would be the best way to accomplish this?

## 9/15/2010 3:34 pm  |  #6 Jason ByrnesWebAssist

the shippable column wouldn't really work since you may different product types than cards that are shippable.

you said before that you had a idcategory_product that could be used to set the product category, use that column in the discount.

set the discounts up similar to what I suggested before using number of Items with a specific column value for the trigger.

If there are 5 cds, in the cart discount the price of one, if there are 6 cards in the cart, discount one card.

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