verbb / postie

A Craft Commerce shipping calculator plugin.
Other
12 stars 18 forks source link

Add Pickup Point selection to Bring #127

Closed nitech closed 1 month ago

nitech commented 2 months ago

What are you trying to do?

Bring lets you present available pickup points to the customer (https://developer.bring.com/api/pickup-point/). I'd like to see this in the Postie plugin.

What's your proposed solution?

Implement https://developer.bring.com/api/pickup-point/

Additional context

No response

engram-design commented 2 months ago

Just a point to clarify - would you like these available to customers to pick, or just in the Postie provider settings for Bring, where admin's can set the pickup location? I assume it's the former, and that might be tricky to implement with how shipping providers work.

We would have to duplicate the shipping method for each pickup point to choose from.

Otherwise, this almost needs to be a separate function in the checkout process. You can use the authenticated Guzzle client to make these calls yourself and add to your checkout steps where it makes sense.

nitech commented 2 months ago

Yes, I'd like the customer to select pick up point.

From what I've read, you don't need to utilize the Pickup Point API to get a valid shipment price (nor do book the actual shipping - although I assume Postie doesn't do that). It's more of a service to the customer where you say "yes, I know this is your address, but based on the address geolocation, these are pickup options for you".

I can for instance choose to pick up a package from the former post office (now a part of a grocery store) or a few different automatic package pick up boxes where I open the hatch of the said box with an app on my phone.)

Sounds like I'd have to implement this in a separate step, as you mention.

Just out of curiosity:

  1. Are you used to this kind of functionality from stuff you buy online? Do you get to select pickup point?
  2. Does it make sense to have the actual booking of the shipment as part of the Postie plugin? (right now I assume you'd have to use the Bring user account to find the order, print the sticker, confirm the shipment.)
engram-design commented 2 months ago

Yup, of course - this has nothing to do with the actual shipping method that Postie offers.

The tricky part of this is storage of that information. This would need to be against an order, and would require a custom field to save that. That's all starting to get into custom behaviour, which is tricky when it comes to scope-creep.

Certainly! It's a common thing for the stores that provide a "Click & Collect" service, but that's typically setup by the retailer than the shipping provider. Then again, we're pretty limited here in Australia, with AusPost being a major carrier - they also have a similar option to pickup parcels from various locations like supermarkets, shopping centers or even airports where they have parcel drop-boxes. Sounds like a similar setup to what Bring might offer.

I think this probably needs to be a custom implementation, but if enough people demand it, it's potentially something we can build in with a bit of documentation on setup (the custom field to store the picked location, etc).

One thing I might suggest right now is to open up the provider's Guzzle client. I mentioned this was possible, but I did get confused with Postie 3 which I'm actively working on, which does expose this. With this, you could make a request to their API, fetch pickup points and output them to the user in checkout. Then, you could save that to your custom field in your order.

Hope that makes sense! In summary, this will probably be a custom thing outside of Postie's functionality for the moment, but we'd like to give you the tools to make API requests to Bring to fetch this data.

nitech commented 2 months ago

Thanks for the input.

It seems over time most service providers converge their features into similar products (ie: "get shipping methods", "get parcel price", "get pickup points"). When you decided to make Postie, I am guessing it was based on observing that a whole bunch of different transportation providers really offered the same kind of products, just exposing them from different APIs.

Thinking about it, Pixel & Tonic should perhaps incorporate pickup point into the base of Craft, as they have done with addresses. Addresses are now an integral part of Craft - why? Because it is relevant information for the Customer object. Perhaps it's correct to think the same of Pickup Points.

In the meanwhile I will use their own API. I have no problems doing that. I was just wondering if there was a unified way to do it.

Again, thanks.

engram-design commented 2 months ago

Indeed this is the way Postie might go, as we're about to offer label and tracking handling for providers, there's an opportunity to provide this sort of functionality out of the box too. I'll keep this around for future reference!

nitech commented 2 months ago

Can I ask about the timeline for Postie 3.0?

engram-design commented 2 months ago

Just doing our final testing and migration handling, should be expected within the next month.

nitech commented 2 months ago

Thanks. If it will contain label and tracking handling, will you implement support for Bring’s label and tracking handling as well?

engram-design commented 2 months ago

Yup, Bring will support those features.

engram-design commented 1 month ago

Updated in 4.0.0