Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebuild shipping framework #14

Closed
jedateach opened this issue Mar 8, 2012 · 18 comments
Closed

Rebuild shipping framework #14

jedateach opened this issue Mar 8, 2012 · 18 comments
Assignees
Milestone

Comments

@jedateach
Copy link
Contributor

Shipping is a complex part of an online shopping system. The shop module uses modifiers, with specific calculators that only really do a good job for basic 1-tier delivery rates. An effort is needed to provide regionalised/zoned shipping options.

  • Provide different priced / spec'd options for delivery, but possibly require that one be chosen before order is placed. eg: economy 3-4 days vs premium overnight
  • Restrict to only specific countries, which may reside in particular zones.
  • Free shipping calculation
  • Pick up from store option
  • Connect to carrier APIs

Related: #11 #39

@jedateach
Copy link
Contributor Author

@ghost ghost assigned jedateach Jun 13, 2012
@jedateach
Copy link
Contributor Author

Ideas

Fixed - define a set of priced shipping options, choose the name of each type of shipping, which might be a place name, service provider, length of time, or a combination. Customer chooses which option they want, and merchant just notifies the customer if they can't ship there.

This could also benefit from some system that allows admins to make adjustments to an order, after negotiating a new price with the customer. see #66

Dynamic - expanding on the fixed system by changing options/pricing based on shipping zone, type of products, weight, etc etc.

@onefatsheep
Copy link

Yippie! sounds good man!

@jedateach
Copy link
Contributor Author

The shop needs to allow varying degrees of granularity. That is, shops may be set up that cater for:

  • Local delivery
  • National delivery
  • International delivery
  • Combinations of the above - eg seller may have cheap local rates, and flat rates to overseas, and other rates entirely for domestic delivery.

In a more advanced setting, a shop may have multiple physical locations.

@jedateach
Copy link
Contributor Author

I've fleshed out some of these ideas in a sub-module:
https://github.com/burnbright/silverstripe-shop-zonedshipping

@jedateach
Copy link
Contributor Author

Just found this: https://github.com/Shopify/active_shipping ...looks like a useful place to start for figuring out a comprehensive shipping solution.

@nimeso
Copy link
Contributor

nimeso commented Oct 12, 2012

Just found this https://github.com/patbolo/nzpost_ratefinder
It's already made for SS... any help? worth looking at?

@onefatsheep
Copy link

shot jam

On Sat, Oct 13, 2012 at 8:07 AM, nimeso notifications@github.com wrote:

Just found this https://github.com/patbolo/nzpost_ratefinder
It's already made for SS... any help? worth looking at?


Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-9390329.

kind regards,
Rupert Deans_Venture Director

AUS Office
Level 10, 50 Market St Melbourne CBD 3000
Tel +61 3 9016 3196
Mob +61 4 49583662
Email rupert@onefatsheep.com rupert@vizualise.co.nz
Skype rupert.deans

Like Us http://www.facebook.com/Onefatsheep
Follow Us @onefatsheep
LinkedIn http://www.linkedin.com/in/rupertdeans

NZ Office
Phone: +64 3 6690649
Mobile: +64 21101837
http://www.onefatsheep.com

PO Box 36618
Merivale
Christchurch

@jedateach
Copy link
Contributor Author

@nimeso yep, very useful thanks!

@jedateach
Copy link
Contributor Author

I have made significant progress rebuilding the shipping framework, as you can see here: https://github.com/burnbright/silverstripe-shop-shippingframework

I'm currently focusing on the TableShippingOption, which allows you to set rates for ranges. Range values can be weight, volume, value, and/or quantity. You can also restrict a rate to a region. This approach will provide great flexibility for merchants to customise their shipping calculations.

My current problem to solve is storing null values for table rate ranges. With the default SilverStripe db field types, you can't store NULL for a numeric field...but I possibly need to distinguish between 0 and NULL. Eg a weight range might be from 0 - 10, but the other range types (volume, value, quantity) will store their ranges as 0 - 0.

@nimeso
Copy link
Contributor

nimeso commented Oct 16, 2012

Hey ya J,

Nice work man! I'm crazy nutz busy and will have a good look asap... I'm
hoping once I get my head around your code I could do some work with you on
it.

Maybe things to help with your NULL issue
http://www.silverstripe.org/data-model-questions/show/14668
Sounds like you may want to extent the Int class with something like
a NullInt Class?

If you don't figure it out by the end of the day, I'll have a crack at it
tonight.

Cheers
J

On Tue, Oct 16, 2012 at 12:59 PM, Jeremy Shipman
notifications@github.comwrote:

I have made significant progress rebuilding the shipping framework, as you
can see here:
https://github.com/burnbright/silverstripe-shop-shippingframework

I'm currently focusing on the TableShippingOption, which allows you to set
rates for ranges. Range values can be weight, volume, value, and/or
quantity. You can also restrict a rate to a region. This approach will
provide great flexibility for merchants to customise their shipping
calculations.

My current problem to solve is storing null values for table rate ranges.
With the default SilverStripe db field types, you can't store NULL for a
numeric field...but I possibly need to distinguish between 0 and NULL. Eg a
weight range might be from 0 - 10, but the other range types (volume,
value, quantity) will store their ranges as 0 - 0.


Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-9466753.

@jedateach
Copy link
Contributor Author

Thanks for the link to NullInt db field. I was considering that approach, but I've now solved the problem without using NULLs. Using the appropriate combination of ORs and ANDs I ignore a restriction if it's max value = 0.

Here's some pesudo SQL to explain my solution, where 'value' is the current value we are checking, eg weight of a package.

minrange >= 0 AND minrange < value AND maxrange > 0 AND maxrange > value

... do this again for quantity, volume etc, and concatenate with ORs. Sort by lowest value. I'll push code shortly.

@nimeso
Copy link
Contributor

nimeso commented Oct 16, 2012

Nice :)

On Tue, Oct 16, 2012 at 2:30 PM, Jeremy Shipman notifications@github.comwrote:

Thanks for the link to NullInt db field. I was considering that approach,
but I've now solved the problem without using NULLs. Using the appropriate
combination of ORs and ANDs I ignore a restriction if it's max value = 0.

Here's some pesudo SQL to explain my solution, where 'value' is the
current value we are checking, eg weight of a package.

minrange >= 0 AND minrange < value AND maxrange > 0 AND maxrange > value

... do this again for quantity, volume etc, and concatenate with ORs. Sort
by lowest value. I'll push code shortly.


Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-9468347.

@jedateach
Copy link
Contributor Author

here we go: silvershop/silvershop-shipping@dfe82b7

...last things to do are: get regioned rates working, and integrating shipping estimates with checkout process.

@jedateach
Copy link
Contributor Author

Regioned rates working. silvershop/silvershop-shipping@1b6088b

@jedateach
Copy link
Contributor Author

I now need to provide shipping options at the checkout step, and it has made me realise I will need to make some significant architectural changes.

Currently the checkout page consists of a single OrderForm, which I've managed to keep free from javascript up until now. Because the grand total relies on a shipping total, and that shipping total relies on an Address. This will require either updating the grand total via ajax, or splitting the ordering process into multiple steps.

I'm going to try and do both. The checkout framework should be flexible enough that it can be displayed in parts: perhaps different controller actions, or worked through via ajax requests.

Fragmented checkout: #96
AJAX cart here: #49
Shop API: #33

@jedateach
Copy link
Contributor Author

I'm part-way through rearranging the checkout process to incorporate setting address before choosing shipping option.

I've just looked at this diagram: http://www.databaseanswers.org/data_models/e_commerce/index.htm
...which hints at the idea of a shipment model. This would be useful if you ship some items in an order, and not others. Order items could be marked as shipped. ...also interesting the bit about RMA

@jedateach
Copy link
Contributor Author

This has been built in a separate module, but is likely to be integrated into core later on. https://github.com/burnbright/silverstripe-shop-shippingframework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants