longclaw icon indicating copy to clipboard operation
longclaw copied to clipboard

More complex shipping options

Open JamesRamm opened this issue 6 years ago • 2 comments

#204 will implement functionality to allow an (advanced) user to implement any manner of custom shipping calculations.

For 2.0, providing out-of-the box support for some common scenarios could be interesting. For example, shipping by item weight, dimensions...

JamesRamm avatar Feb 03 '19 17:02 JamesRamm

If you are happy with the direction of issue #204 / pr #228 I can tackle this as well. Once #204 is handled then I need "packaging options" and this. I am planning an abstract mechanism for these that can be extended for specific providers. I am leaning towards using Django polymorphic and an abstract base class "RateProvider" and "PackagingOption" or something like that.

thenewguy avatar Mar 19 '19 13:03 thenewguy

Is this the right thread for questions or suggestions regarding shipping?

I’d like to implement shipping calculations based on weight, size, customer and destination country, using different shipping providers whose calculations differ wildly; we usually use the cheapest alternative, if the customer doesn’t choose a faster variant:

  • Service PRO is only available for some registered business customers and based on the exact weight (kg tariff).
  • Service POST is used for small and light stuff that fits in an envelope. Several weight and size levels.
  • Service PKG1 is good for light packages regardless of size (because we don’t ship stuff that’s too big for their limits). Several weight levels.
  • Service PKG2 is good for heavy packages, price is only based on size (several levels).
  • All except the first can also send to other countries, of course for higher rates and with different sets of countries/regions. (That means, I need different regions per provider.)
  • I wouldn’t use foreign APIs (I don’t know if all services have an API; one of them charges a fee for using it), but some own tables.

So, if my products have weight and size fields, I can calculate the total weight (plus buffer for shipping material) and an approximate total size, check what every provider would charge, chose the cheapest and offer a shipping rate to the customer.

This is so complicated that I probably will get lost in the implementation (I tried once to enhance Plata, the shop of FeinCMS, this way) and keep doing everything manually... Any suggestions? How do others handle this?

EDIT: I realized Longclaw doesn’t fit my needs in several regards, will try again to enhance Plata instead. But maybe this is interesting for others, thus I don’t just delete the post.

fiee avatar May 04 '20 19:05 fiee