Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Flat Rate Shipping 1 Category only

Flat Rate Shipping 1 Category only

Locked

Views: 1,440

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
22 Apr 2009, 17:09
#1
db_r avatar

db_r

New Zenner

Join Date:
Apr 2009
Posts:
2
Plugin Contributions:
0

Flat Rate Shipping 1 Category only

I have many categories and products in my store, BUT I have this one category of products, which is small parts, and I would like it to go this way with the shipping when someone orders:

customer buys 1 or more items, from this category, shipping charge is always the same, $9. No matter what qty.

Reason is the parts are so small that even if they ordered 1000+ qty they would still likely fit in a USPS flat rate box.

Problem is, I have other products in my store that I DO NOT want to offer flat rate shipping as an option for but when I enable Flat Rate shipping module it becomes availible for ALL items, and not just the category that I want it to be availible for.

How do I correct this?

22 Apr 2009, 17:41
#2
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Flat Rate Shipping 1 Category only

What should happen if someone buys some of the tiny parts and also some larger items that can't go flat rate?

22 Apr 2009, 17:52
#3
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Flat Rate Shipping 1 Category only

You could work something like this into flat.php

$s_cart = $_SESSION['cart']->get_products();
$cant_ship = 0;
foreach($s_cart as $item)
{
// count number of non-tiny-things
if($item['category'] != '250')
{
$cant_ship++;
}
}

Now add the $cant_ship to the line that tests if to use the flat rate.

(about line 43)

Change '250' to the category id of your tiny parts.

Now if there is anything else besides tiny parts, the flat rate will not be shown.

Clear as mud?

22 Apr 2009, 19:05
#4
db_r avatar

db_r

New Zenner

Join Date:
Apr 2009
Posts:
2
Plugin Contributions:
0

Re: Flat Rate Shipping 1 Category only

All parts orders should ship seperately and have their own shipping charge. So if someone was to make an order, of say 10 small parts and 2 or 3 large items the shipping would need to act as normally on the large items, but still charge the flat rate fee for the small parts order because it will ship seperately.

We ship large items via UPS Ground and that's it.

We ship parts orders USPS Prioirty Mail flat rate box only.

22 Apr 2009, 21:08
#5
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Flat Rate Shipping 1 Category only

Could not the tiny parts just be tucked in with the larger stuff since they are so small?

But if not, I think there is a mod available that lets you do such fancy shipping break outs. (not sure if it is free)

I can't recall the name of it, but I'm sure someone will jump in and point you to it.

23 Apr 2009, 07:31
#6
igor56 avatar

igor56

New Zenner

Join Date:
Apr 2009
Posts:
29
Plugin Contributions:
0

Re: Flat Rate Shipping 1 Category only

Sounds like this thread could help you. There is a code modification which determines if there are products from one category in your cart which will then turn on or turn off certain shipping options. Isn't this more or less what you need?

The simplest solution would seem to be to give the small parts stuff a model code so whenever that model code is in the shopping cart, the UPS module is turned off and the flat rate of $9 is turned on.

You don't mention if it possible to order both large and small parts, but this method is capable of handling that as well.

Here is the thread. It took me a few weeks to understand the simplicity, but perhaps you are smarter than me!

http://www.zen-cart.com/forum/showthread.php?t=91394