openfoodfoundation / wishlist

This repository welcomes ideas and suggestions to improve the OFN software.
3 stars 0 forks source link

Enable producers to view/edit their items in orders placed through Hub #85

Open jaycmb opened 3 years ago

jaycmb commented 3 years ago

What is the need / problem?

Some Hubs or Farmers Markets want a more ‘hands off’ approach to the orders and transactions i.e. they want the customer to be able to place one order and pay once, but order adjustments to be handled by farmers rather than centrally by a Hub

Currently when an Order is placed the Producer can see their items in reports, but they cannot see the Order itself in the orders or BOM pages, and they cannot edit it i.e. remove items that they aren’t able to fulfil

This was a design decision in the early days when we were working on conversion of a single user ecommerce platform to multi-user. It was the same rationale as not allowing the Producer to see the Customer names on reports, which it is now clear does not meet the needs of many of our users (and is currently getting sorted)

This is also related to Split Payments (currently considering experiments with manual processing through Stripe to clarify the rules). If we do an interim split payments offering by handling directly through Stripe Connect, we only want to do the transfers once all the order information is correct.

If the Hub’s are ‘hands off’ it is better for the Producers to be able to amend orders that they haven’t been able to fulfil themselves

Which type of users does this problem affect (and how many, if known)?

Potential solutions that will solve the problem?

Remembering that we made all these choices and set up the permissions for who could see and do what on each page - products, reports, order cycles etc - it occurred to me that there is no real reason why we can’t just change the rules on the Orders page and the order editing

So the new rules for viewing and editing orders would be similar to order cycles. They would likely follow the new authorisation from the Hub to allow Producers to see Customer names or require creation of a new permission i.e. Hub allows Producer to manage orders

If a Hub authorises Producers to manage orders, then as a Producer

Connected wishlist and discovery discussions

Migrated from Discourse: https://community.openfoodnetwork.org/t/enable-producers-to-see-edit-their-items-in-orders-placed-through-hub/1919

audez commented 2 years ago

Yes we often have questions from producers who don't understand why orders don't appear in the orders list. They ask for them to be available in the Orders page. Could a first step be to simply display the orders in the Orders page? We could deactivate the "edit" button. At least the producers would see the orders, and don't have to go to the reports page.. Maybe It would be a papercut then?

RachL commented 2 years ago

@audez there is a spike that was selected as UK papercut. Once the spike is through, we will be able to know how to move forward https://github.com/openfoodfoundation/wishlist/issues/450

Just displaying is not a papercut as you need to introduce the test to be sure the producer can't edit. Also you need to display only products of this producer within the order and therefore perhaps there are many info we need to hide from the order (customer info if hub didn't allow them, order total, payment info etc). Perhaps the order page is not the best place for that? That's why we have a spike first to understand how to scope this work.

audez commented 2 years ago

ooh ok i didn't see the spike, thanks!

tschumilas commented 2 years ago

fyi - it seems this is related to another issue which is designated for a spike - beyond just seeing their orders, should a supplier to a hub be able to edit their orders? We have producer/suppliers here who sell items weighed out at time of delivery. So each time, these producers need to inform the hub manager of the correct weight being delivered so the hub manager can adjust the product's weight. Producers would like to be able to do this directly on theorder when they cut the product. https://github.com/openfoodfoundation/wishlist/issues/172