The permissions are platform wide, and also per each content type.
Shopping carts
There is an API to create, retrieve and update shopping carts. Users with the role "buy" can create shopping carts.
Orders
There is an API to create orders. This API should be called after a checkout is fulfilled in order to create the order. Later on users with the role "order" may manage the orders.
An order needs to be created for each seller.
The sellers should be able to see their orders and change the status.
The buyer should see different orders, one for each seller. With the status "shipped", "blocked", etc.
Selling
If permissions.sell is enabled for a user, a settings from will appear when creating new content:
SKU
PRICE
Allow multiple items
Product Variants (size, color, etc)
Product weight
Stock Amount
Shipping Options:
I want to ship myself
Product weight
Shipping price / Shipping time
I want to let "site name" do the shipping
Also a new option will appear on the menu: "Orders" where all the orders will be listed.The user will have the ability to mark an order as shipped, cancelled, returned.
Shipping
A user with permissions orders permission will be able to see orders, and mark them as shipped.
Admin
A user with admin permissions will be able to edit orders from any user.
Purchasing
If permission.buy is enabled for a user, a shopping button will appear on the content detail.
The shopping button will add the item (or items) to the shopping cart.
The shopping cart will be stored on every change (API)
Once the user decides to pay, it will be prompted with a form to fulfill the payment and the shipping information.
If the user is Logged, we will retrieve previous used shipping information and allow to edit it or add a new one.
If the user is not logged, we will ask the user to register or login at the end of the shopping process. And link this order with this user.
Paying
The payment process will not be implemented. Delegating this to the choice of the developer (Paypal, stripe, etc)
Leaving only the API endpoints to mark payments as completed and create the order.
Invoicing
Invoicing will not be implemented. Leaving it for the developer.
Allow items to be bought and sold.
Mark content as purchasable
In edge.config.js content can be marked as purchasable (purchasable: boolean). Add permissions to purchase.
The permissions are platform wide, and also per each content type.
Shopping carts
There is an API to create, retrieve and update shopping carts. Users with the role "buy" can create shopping carts.
Orders
There is an API to create orders. This API should be called after a checkout is fulfilled in order to create the order. Later on users with the role "order" may manage the orders. An order needs to be created for each seller. The sellers should be able to see their orders and change the status. The buyer should see different orders, one for each seller. With the status "shipped", "blocked", etc.
Selling
If permissions.sell is enabled for a user, a settings from will appear when creating new content:
Shipping
A user with permissions
orders
permission will be able to see orders, and mark them as shipped.Admin
A user with admin permissions will be able to edit orders from any user.
Purchasing
If permission.buy is enabled for a user, a shopping button will appear on the content detail. The shopping button will add the item (or items) to the shopping cart. The shopping cart will be stored on every change (API)
Once the user decides to pay, it will be prompted with a form to fulfill the payment and the shipping information. If the user is Logged, we will retrieve previous used shipping information and allow to edit it or add a new one. If the user is not logged, we will ask the user to register or login at the end of the shopping process. And link this order with this user.
Paying
The payment process will not be implemented. Delegating this to the choice of the developer (Paypal, stripe, etc) Leaving only the API endpoints to mark payments as completed and create the order.
Invoicing
Invoicing will not be implemented. Leaving it for the developer.
Analytics
Analytics will not be implemented