10 replies [Last post]
seth's picture
Offline
Joined: 12/08/2009
Juice: 23
Was this information Helpful?

So I'm being really lazy today. Sorry about that. I looked at a few postings but could not find what I needed.

I am currently setting up an Ubercart system for a customer and have run into a snag regarding shipping.

They use tubes to ship their products. These products are composed of paper materials divided into N amount of panels per product. Each tube can have a maximum of 8 panels. If a product or a combination of products goes over 8 panels total then another tube is required, same applies for > 18 panels, > 24 panels, etc.

The rate per tube is $9 so 1 tube (8 panels or less) = 9$ shipping, 2 tubes ( between 9 and 18 panels ) = $18, and so on.

Right now I do not see a way to achieve this using the current flat rate, or weight based shipping quote methods. With flat rate, there is a way to check weight ( like if I assumed that a weight measurement corresponded to the number of panels instead of actual weight ) using the conditions, but there is no clear way to define an action to add another $9 to the shipping quote if the order exceeds the tube limit.

Perhaps I am missing something here but has anyone come across a situation like this and found a solution for it. If there is something more advanced I could do like create a predicate or trigger or conditional action outside of what is already provided that would work too.

Any help would be greatly appreciated.

Thanks

--
Seth

j.mead's picture
Offline
Joined: 07/27/2009
Juice: 385
Re: Custom Flat Rate Shipping Calculations

a real quick and lazy answer on my part, set a condition for the number of items in the order total. do this for different quantities and shipping charges

8 items or less = $9
9-16 = $18 You need 2 conditions for a range, 1 equal to or greater (9) + 1 equal to or less (16)
etc... ($27 = 17-24) ($36 = 25-32)

do this with condition groups and pay attention to those equal to less than and more than qualifiers on the conditions.

i used a similar process to return shipping quotes for USPS Intl orders based on # of items, as they don't return very good quotes for my purposes

it's not really very elegant and isn't too much work if there's a reasonable limit to the number of panels they'll ship in total. it might also work to put in an option to call for a shipping quote for very large numbers

the sites i'm always breaking.... www.sew-la-fabric.com
http://lostpetsla.com (though i hope i never break this one too bad)

seth's picture
Offline
Joined: 12/08/2009
Juice: 23
Re: Re: Custom Flat Rate Shipping Calculations

I *think* this will work but the only problem I see is that its not per item its based on the number of panels an item has vs how many panels can fit into a shipping tube.

For example one product could have 4 panels. Another one only 2, and then another 3 panels. That would be 4+2+3 = 9 panels = 2 tubes = $18 shipping. Using your method its only 3 items at $9. So the quote would be wrong.

Is it possible to modify this to look at a product weight (such as ounces) which I could fake as being the number of panels and use the same algorithm for that?

Thanks for your response it is helping me get my gears turning on this.

j.mead's picture
Offline
Joined: 07/27/2009
Juice: 385
Re: Re: Re: Custom Flat Rate Shipping Calculations

i misunderstood the panels per item part, sorry about that.

you can set the conditions for an order's weight, so a similar approach should work.
assuming of course that the individual panels will always be a specific weight, and/or, yeah just fake it if actual weight isn't a necessary factor.

the sites i'm always breaking.... www.sew-la-fabric.com
http://lostpetsla.com (though i hope i never break this one too bad)

seth's picture
Offline
Joined: 12/08/2009
Juice: 23
Re: Re: Re: Re: Custom Flat Rate Shipping Calculations

Great that is what I was hoping for!

Now for the actions screen. Where do you tell it to make something a particular price? I see fetch a shipping quote, and update the order status ( among other options that dont fit the bill for this condition ).

Am I missing a page some place?

--
Seth

j.mead's picture
Offline
Joined: 07/27/2009
Juice: 385
Re: Re: Re: Re: Re: Custom Flat Rate Shipping Calculations

It looks like I may not have clarified that my "solution" was to create multiple flat rates, so the amount of work really depends on how many tubes will ever be needed.

When you first create the flat rate you just set the base rate to whatever you need, leave default shipping per item at zero, and for an action I just went with the default, 'Display a message to the user'. Default per item would be however much $x added to your $9, so for a simple flat rate you skip it.

As an example you set a new flat rate method for each number of tubes, kind of if you were using small, medium, large boxes etc...
rate#1 - small (1 tube)= $9 less than or equal to 8 panels (or # of weight units)
rate#2 - medium (2 tubes)= $18 9-16 panels (determined by weight again)
etc

If you set it correctly, the customer will only see the rate that applies to their order, not a list of options.

I did it like this as it turned out to be faster to create a flat rate for each option, rather than spend a lot of time hunting around for a better solution. 30 minutes and I had flat rate options for both Domestic and International customers with a variety of sizes, and they are all determined by the country and number of items in the order, so the customer is only quoted the appropriate flat rate(s). A one time job, no future module problems and I can adjust the rates whenever I need to.

the sites i'm always breaking.... www.sew-la-fabric.com
http://lostpetsla.com (though i hope i never break this one too bad)

seth's picture
Offline
Joined: 12/08/2009
Juice: 23
Re: Re: Re: Re: Re: Re: Custom Flat Rate Shipping Calculations

ahhhhh now I see. I couldnt connect the dots.

Thanks so much for your help on this. You have definitely saved me hours of headache.

regards

--
Seth

seth's picture
Offline
Joined: 12/08/2009
Juice: 23
Re: Re: Re: Re: Re: Re: Re: Custom Flat Rate Shipping Calculatio

This totally worked. It would be nice to have something that could do dynamic calculations (like a math formula) but this solved the problem and the shipping is working for my implementation.

Thanks a bunch j.mead for your help!

--
Seth

j.mead's picture
Offline
Joined: 07/27/2009
Juice: 385
Re: Custom Flat Rate Shipping Calculations

Glad it worked for you. Again there may be another way to do it, I just felt that sometimes you can't overlook the simplistic approach.

the sites i'm always breaking.... www.sew-la-fabric.com
http://lostpetsla.com (though i hope i never break this one too bad)

Lsparrow's picture
Offline
Joined: 05/12/2010
Juice: 14
Similar Problem with More Products

I'm glad I found this thread.

I have a client with similar shipping conditions, they ship trays of products.
2-3 trays are shipped per box with the following shipping rates.

1 tray = $36/box
2-14 trays = $45/box
15+ trays = $40/box

I setup 3 flatrate methods for each scenario above and would like to avoid having to setup a method for every possible scenario, ie. 2-3 trays, 4-6 trays, 7-9 trays, etc. This can get pretty tedious if there is a potential for ordering 20 trays.

Is that my only option with Flatrate? Is it possible to use an equation somewhere like, shipping rate = round(qnty/3) * 45?

Thanks!
Lehua

StephenGWills's picture
Offline
Uber DonorBug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik
Joined: 08/07/2007
Juice: 414
Where to calculate conditional base_rate?

I'm bumping this because I want to apply a tax to a shipping rate based on the zone it is shipping to... IF.... taxes can be applied in that zone.

I have the logic for deciding when to tax
and at what rate to tax

but I do not understand how to apply the rate to the base_rate of a flat shipping quote. Where does this data live during the flatrate ca call?

Is this even the appropriate place to do this?