I have a site with two shippable product types: T-Shirts and Bumper Stickers. I have set up flat rate shipping amounts for varying quantities as follows:

Envelope (10 stickers or less)
$1.00 + $0.02 per item

Envelope (11-50 stickers)
$2.50 + $0.02 per item

Envelope (51-100 stickers)
$4.50 + $0.01 per item

Small Package (101-500 stickers)
$7.00 + $0.01 per item

Package (501-1000 stickers)
$8.00 + $0.01 per item

Large Package (over 1000 stickers)
$9.00 + $0.01 per item

Envelope (1-2 shirts)
$0.00 + $2.50 per item

Package (3-12 shirts)
$5.00 + $1.00 per item

Large Package (over 12 shirts)
$12.00 + $0.50 per item

-----------------------------------------------------------

Then I set up conditions on each shipping method similar to this one for 3-12 shirts:

-----------------------------------------------------------

Check an order's product classes
Parameter: Order: [order], Product Classes: T-Shirt, Require all selected product classes: false, Forbid other product classes: false

Check an order's number of products
Parameter: Order: [order], Products: 2000, 2079, 2080, 2085, Product count value: 3, Operator: Total is greater than or equal to 3

Check an order's number of products
Parameter: Order: [order], Products: 2000, 2079, 2080, 2085, Product count value: 12, Operator: Total is less than or equal to 12

-----------------------------------------------------------

So long as the customer chooses ONLY Bumper Stickers or ONLY T-shirts to buy in their order, this works flawlessly. But if the customer purchases some Bumper Stickers AND some T-shirts, the shipping isn't working properly as I currently have it set up.

When I set the Conditions to Forbid other classes and an order is in the cart with BOTH Bumper Stickers and T-shirts, no shipping quote is obtainable because other classes are present in the order and so the Conditions are not being met for any of them.

When I set the Conditions to not Forbid other classes, then the shipping quote for Bumper Stickers comes up and the shipping quote for T-shirts comes up, but the quantities for the Product count value are thrown together. This results in an astronomically high shipping quote for the T-shirts if someone orders a lot of Bumper Stickers. The shipping method is set to add $2.50 for each T-shirt in the order. But when I tested what happens when someone orders 75 stickers AND 1 T-shirt, the quote used a quantity of 76 for the shirt which resulted in a $190.00 shipping charge for that one item. I'm not seeing a condition parameter for just doing a count of the specified products. The condition parameter is for counting the order's total number of products, which is causing the issue I'm having.

I know this is something where I'm just not seeing the right setting somewhere. Can you please advise how I attain the desired result?

Do I not need the Condition that checks an order's product classes? I set that up first because I didn't know that the products would be selectable within the Conditions for the order's number of products.

Thanks in advance for any help anyone can give with this.

Comments

wildlife’s picture

It looks like this D6 module was designed to do what I'm trying to do.

https://drupal.org/project/uc_multiflatrate

But that isn't going to help me on D7 as it doesn't look like there's any activity towards getting a D7 version of this module done.

TR’s picture

Have you looked into overriding the flatrate values on the product pages? Each of your flatrate methods will show up on your product edit pages. There, you may override the amount charged by the flatrate for that product. So for example, for each bumper sticker you could override the amounts charged for mixed orders.

TR’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.