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

As a shopper, I can have the option to add products to a previous order on the same OC #13055

Open
RachL opened this issue Dec 30, 2024 · 10 comments

Comments

@RachL
Copy link
Contributor

RachL commented Dec 30, 2024

⚠️ Please use clockify code #12476 Flower Farms

Previous discussions

openfoodfoundation/wishlist#139

Description

- As a: shopper
- On page: permalink/shop#/shop_panel and /account#/orders
- I want to be able to do:

if the shop allows shoppers to edit their orders, when the shopper starts a second checkout, they should have the ability to add their new cart to their previous order. This would be given through a message when hitting the checkout button:

image

image

Previous order items can be removed or changed in terms of quantity (as they are currently when the hub allows editing orders).

On a shopper account, when editing on order they can see a new button "add products". This button should bring them straight to the shop.

image

Acceptance Criteria & Tests

  1. Create of a first order on a given OC with editing orders allowed

  2. Go back to the shop when order is completed and add new products to the cart: when hitting checkout button you should have the option to add to previous or complete 2 separate orders (see design above)

  3. If you choose to create a new order, checkout proceeds has currently with step 1

  4. If you choose to add to previous order, you are taken to the /cart page where previous line items + new line items are listed. They can add or remove items (no matter if they are previously paid or not). Items are listed in order of selection (if I'm not mistaken, that's how cart is ordering today).

  5. Proceeding with checkout should then follow as usual with one aspect to check: if there isn't anything to pay anymore, payment step should not ask to fill payments details (this already exist, e.g. when using a voucher that covers the order total entirely - but we need to test this scenario)

  6. Check that you can see the "add products" button when editing an order from your account. /account#/orders This button brings you back to the shop, with the same OC selected.

  7. Check that without the shop preference to edit orders, no message is shown when creating a second order. edition is not allowed in user account.

@dacook
Copy link
Member

dacook commented Jan 8, 2025

@RachL , I wanted to get a better picture of how this would work, so started putting together a prototype in Figma. You can view it here:
https://www.figma.com/design/7IjJsb2NDOQd2q1jfl6lUW/Add-to-existing-order?t=ks9uYj5RF9Tdy7HI-1
Can you please review and see if this makes sense and raises any new questions?
I think I may be able to grant you edit access, if you send me the email address of a figma account I will try.

Alternatively, we could discuss grouping orders together when printing invoices and packing sheets.
I note that these are often generated in bulk, so we could potentially group them then (only when all customer and delivery details match perfectly). But the invoice data structure can't currently handle this.

@RachL
Copy link
Contributor Author

RachL commented Jan 8, 2025

Thanks @dacook 💚 A couple of questions:

Note that it's possible to have multiple orders open

What do you mean by this? To my knowledge if you start a new cart you loose the previous one. We don't allow multiple carts.

FYI for me clicking "yes add to previous order" would move the user to the cart page indeed (cart with 3 products, all editable).

If contact info is edited, do we edit existing order?

For me yes

Alternatively, we could discuss grouping orders together when printing invoices and packing sheets.

Indeed, the only problem is that users won't have the choice anymore to pick up separate orders. Maybe we can live with it. @tschumilas what do you think? This idea would go in another direction: we merge parking and invoice info, but not orders.

@tschumilas
Copy link

Merging packing and invoice info but not orders is possible. But some things to think about there: if I have an existing order paid by credit card, and then I place a second order paid by cash - what happens on the invoice? It would need to show a partial payment received - and would it also need to show WHICH items have been paid for and which have not?

If I place one order for pickup at location A, and a second order for delivery - the packing should not be merged. So - packing would only be merged IF the same delivery method is selected on the orders. And then what happens if one of the orders is edited by the hub manager, and the delivery method is changed so now the customer is going to get all items at pickup location A. So, when a delivery method is changed on an order, does the packing report change?

If a customer needs an item removed - poor quality or something - AFTER the order is invoiced - the hub manager/store manager needs to be able to find the item on an order. Right now its easy - the customer gives the invoice number. But if there are multiple orders contributing to a single invoice - it could be harder for the hub manager to find the item in question.

And right now, an order number = invoice number - doesn't it always? So, if there is not a 1:1 relationship between order number and invoice number, then I think ALL of our reports that currently have one of those numbers, need to have both numbers.

The other comment I have - the figma images made me wonder when does the customer see the popup asking them if they want to add the items to an existing order? Ideally, the shopper only sees this popup once. So if I have an existing order, and I start shopping a second time, can I see the popup as soon as I start my shopping? I don't want to see it every time I chose an item in that second shopping experience because I could be adding 20 or 30 items.....

@RachL
Copy link
Contributor Author

RachL commented Jan 8, 2025

If a customer needs an item removed - poor quality or something - AFTER the order is invoiced - the hub manager/store manager needs to be able to find the item on an order. Right now its easy - the customer gives the invoice number. But if there are multiple orders contributing to a single invoice - it could be harder for the hub manager to find the item in question.

I think this point is a problem that will remain here whatever solution we choose. We don't have an order edit trail. so items that are removed can't be found once the order is edited. One solution for this is to finish the invoice work that was started. It does not give an order edit trail, but it stores all invoices versions.
Or the managers prints invoices at different times. But it's really tricky to compare.

the figma images made me wonder when does the customer see the popup asking them if they want to add the items to an existing order?

What I've proposed in the issue was to have the popup only once they hit the checkout button.
But @dacook also proposed to add a button in the top banner. I guess it makes sense since we open a new cart as soon as the shopper visits the shop. My understanding, but best for david to confirm, would be that this button remains accessible as long as it's not used (so not a popup, but a banner behavior).

@tschumilas
Copy link

What I've proposed in the issue was to have the popup only once they hit the checkout button.
But @dacook also proposed to add a button in the top banner. I guess it makes sense since we open a new cart as soon as the shopper visits the shop. My understanding, but best for david to confirm, would be that this button remains accessible as long as it's not used (so not a popup, but a banner behavior).

Either of these work I think. I just didn't want the popup coming every time the shopper puts a new item in their cart.

My comment abourt the hub manager finding an item to remove from an order - if items selected are merged onto an existing order, this is no problem. The order number and the invoice number will be the same - because in effect there is only one order.
I'm thinking about the possible path forward of grouping information together for packing and invoicing. I was flagging potential problems if the order number is not the same as the invoice number. But maybe I'm not understanding this option.

@dacook
Copy link
Member

dacook commented Jan 9, 2025

Great discussion. I agree the popup shouldn't appear multiple times in a session!

As we've found that

Note that it's possible to have multiple orders open

What do you mean by this? To my knowledge if you start a new cart you loose the previous one. We don't allow multiple carts.

I don't mean having multiple "carts", but you can have multiple checked-out "orders" for the same order cycle. So this banner appears at the top of the shop page (existing functionality) and links to the order page where you can edit the order.

Screenshot 2025-01-10 at 9 52 16 am

Therefore, we can give the user early notice, and perhaps let them choose to add to their existing order before even adding a product. The popup can still appear when adding first item to cart, or at checkout (but I agree it shouldn't appear multiple times!).

Whatever the timing, we would need to "merge" the new cart with the existing order in some way. Note that the cart is actually just an order in "cart" state, so perhaps we can move the existing order backwards to "cart" state.. but this might require some more thought and planning..
Another thought is that we mark the cart as linked to the existing order, so that when we go through checkout, we process the products onto the existing order then.
I think this requires a bit more thought and maybe a workshop.


I'm thinking about the possible path forward of grouping information together for packing and invoicing. I was flagging potential problems if the order number is not the same as the invoice number. But maybe I'm not understanding this option.

I think you're understanding it better than me. I haven't looked into it further, but yes currently invoice/order is a 1:1 relationship, and it's probably not a trivial thing to change!

🤔 Hmm.. sorry if this was already covered, but can we just group the packing sheets (leaving the invoices separate)?
That is, orders (and invoices) are collated at the last minute, and if any of them happen to have the same recipient name and address, they are packed together. I haven't actually looked at the packing sheet format yet, but assume we could re-work it to include (for example) multiple invoice numbers.

_Edit: I just looked for packing reports and couldn't find a packing sheet (only a tabular output of customer names and products). So maybe we don't have a packing sheet, and that's what invoices are used for?

Why can't the packers just sort the invoices by name and choose to combine orders where the name+address match?

@tschumilas
Copy link

I love how issues get more curly as we dive into them - it really builds my understanding of the app.

I am checking in with hubs who have asked for this - I want to make sure I'm clear on the problem. I don't think the problem is with the packing. Today, when you run a packing report by customer, the report doesn't separate them out by order anyway. It just lists all the items, from all the orders, for that customer . So if a hub is packing with a packing report, multiple orders are not an issue. I think its only an issue when hubs pack by invoice - which likely some do. And often hubs stick the invoice in with the order - so right now, they have to stick in multiple invoices. I'm not sure if this is an issue or not.

I THINK the hubs that raised this are more concered about invoicing when there are multiple orders from the same customer. A customer could receive 5 or more invoices and then has to add them together for payment (most hubs are take bank transfer payments after the orders are received. People send the wrong amount and hub managers need to figure out which orders to credit partial payment to, etc. (We don't use credit card payment much because fees are too high.) So hubs want to send one invoice per oc to the customer. So I suspect that if we could merge orders into a single invoice on the backend that would solve the problem and we wouldn't have to touch the shopping/cart experience. So for example - as a manager, if I select all the orders in an order cycle,, and select the bulk action to send invoices, orders with the same user login (or same name? not sure) would be merged onto one invoice. We would have to sort out what happens if customers have put different delivery address on the orders, or if they have selected different payment/shipping methods.

And we need to think about the implications of this to any report that organizes data by order number or invoice today.

Anyway - for now, I'm checking with hubs to make sure I understand the problem well, and will let you know what I find.

If we went the route of 'merging multiple orders into a single invoice' route, it could be an opportuntity maybe to finish the other invoicing work we started and abandoned maybe.

I'm happy to participate in a meeting with whoever wants to wade in to discuss.

@sigmundpetersen
Copy link
Contributor

Linking this related Discourse https://community.openfoodnetwork.org/t/a-shopper-can-add-products-to-an-existing-order/1728

@RachL
Copy link
Contributor Author

RachL commented Jan 14, 2025

Thank you all for these inputs!

After thinking a little bit more about this I wanted to add to the mix that adding products to the order is something that is often asked from a shopper point of view. As Theresa points out:

  • it's easier to process payments from both the shopper and the hubs point of view
  • it avoids having to keep track of several orders

but also

  • when they are fees at the delivery/pick up method it avoids paying them twice.

So I have the feeling that trying to work on the invoices will provide an alternative that can be as complex (we are touching a legal area) and is solving the hub's issues but not the shopper's.

But this is a gut feeling at this stage. happy to do a workshop about this to get it through.

I will DM you on slack to find a date and will communicate it to the rest of the team afterwards in case more brains want to join the party :)

@dacook
Copy link
Member

dacook commented Jan 14, 2025

when they are fees at the delivery/pick up method it avoids paying them twice.

Of course, thank you for reminding me of this! This seems quite important, and as you say means it's worth trying to solve it at checkout time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Dev ready 👋
Development

No branches or pull requests

4 participants