Shipping Calculations

Shipping Calculations, a forum discussion on Jojo CMS. Join us for more discussions on Shipping Calculations on our Plugin Support forum.

Back to Forum Index : Back to Plugin Support   RSS
Rick Rick

27 Jan 2013
Posts: 336

Hi guys, I'm looking for a bit of help with shipping calculations.

I'm trying to set them up around two types of products. One cost $1 to ship, some cost $5. Regardless of quantity. Both can be combined for $5.

So any quantity of small products costs $1 to ship. Any quantity of large products costs $5 to ship, even if you also add in small products.

I tried setting this up with three Shared Freight Models.
Small (Normal, $1 min freight)
Large (Normal, $5 min freight)
Combined (Pack Sizes, 99 items in pack = Small, 10000 items in pack = Large)

Then I set all the products to the use Shared Freight Model and use the Combined one I set up. Small products take up 1 unit, large products take up 100.

As far as I see it, this should mean that freight stays at $1 until one or more large items is added and then it should bump up to $5 but no higher.

What does happen though, is that even though large products get added to the cart they don't trigger the larger pack size.

Does anybody have any ideas? I'm starting to look through the code but it's fairly widely used so I assume it's solid and I'm just using it wrong.
antony

29 Jan 2013
Posts: 17

Hi Rick,

Harvey will be the expert, I've done some work with shipping lately and what you have described sounds logical and I would think should work.

cheers,
Antony
Harvey

Core Developer

Harvey

29 Jan 2013
Posts: 327

Hi Rick,

I'm pretty sure it's not possible to do what you want. You should be fine getting it to charge $5 for unlimited larrge items and $1 for unlimited small, but if you mix the 2 in the same order it will charge $6.

Personally, the answer is to set expectations. Everyone has their own way of doing freight and you can't accommodate everyone. So just charge people $6 if they order a mixed lot of products, no big deal.

Otherwise you can write your own freight calculations, which is easier than it sounds. There's a hook in the jojo_cart class that lets you calculate your own freight using whatever system you like. I do this on a couple of sites where their freight calcs don't fit nicely into the freight system, or I want to protect the customer from having to deal with it. You just give them a field where they can choose small or large for the freight and then use that field in your freight calcs.
Rick Rick

29 Jan 2013
Posts: 336

Thanks Harvey, I'll look into the hook.

If it worked out to $6 it would be fine, but if someone adds two different large products it comes to $10 etc. Thanks again for your help.
tom

Developer

tom

30 Jan 2013
Posts: 379

I think it's a matter of setting 'number of items to combine' to something arbitrarily large in the shipping model rather than pack sizes maybe? It will end up with $6 for mixed orders, but no more than that. Pretty sure that's how Mike did it for Sabato
Rick Rick

30 Jan 2013
Posts: 336

I set "number of items to combine" to 99, but still somehow managed to end up with not only freight costs of $6, but $10 if I added two different large products.

I'll see if I can whip up something custom for them using the hook.
tom

Developer

tom

31 Jan 2013
Posts: 379

Oh, right, sorry - read your post through again - I think the number to combine would work if the products were set to use just the large or small models - it should combine all of the products using that model into one price, so you'd end up with a $6 maximum (which is how Sabato works).

It may be the Combined model is adding an extra abstraction which is confusing it.
Back to Forum Index : Back to Plugin Support   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.