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

RFC: Purchase items #41

Open
rafinskipg opened this issue Jan 7, 2021 · 1 comment
Open

RFC: Purchase items #41

rafinskipg opened this issue Jan 7, 2021 · 1 comment

Comments

@rafinskipg
Copy link
Contributor

rafinskipg commented Jan 7, 2021

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.

purchasing :  {
    enabled: true,
    permissions: {
         purchase: [roles.USER],
         sell: [roles.OTHER_ROLE],
         ship: [roles.OTHER_USER],
         admin: [roles.ADMIN]
    }
}

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.

Analytics

Analytics will not be implemented

@rafinskipg
Copy link
Contributor Author

  • Checkout: Load cart and present input screen for user data and login

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

No branches or pull requests

1 participant