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

Checkout as Guest #183

Closed
choccy opened this issue Oct 16, 2014 · 16 comments
Closed

Checkout as Guest #183

choccy opened this issue Oct 16, 2014 · 16 comments
Assignees

Comments

@choccy
Copy link

choccy commented Oct 16, 2014

Currently, a customer is required to be registered to purchase. Purchasing items as a guest is also a common feature of other e-commerce systems. I predict that this might be have to be implemented in core though, as opposed to a package.

@aaronjudd
Copy link
Contributor

Yes, agree. Not much to modify, we can just create the account without a password. User still needs to use an email though (same as most other guest systems). Most other "guest" checkouts work the same, they still store the email, and usually create an account. You really can't have physical goods ecommerce without an account, so its just a user perception. For digital goods checkout we'd want to not collect address, so that might be a different checkout module - no account, no address, just cart and payment.

@aaronjudd
Copy link
Contributor

@prinzdezibel since you mentioned you are working on a guest checkout, and volunteered - I'm assigning to you.

@aaronjudd aaronjudd added beta help wanted For issues that have a clear solution described and are not currently prioritized core team work and removed vision labels Jan 18, 2015
@prinzdezibel
Copy link
Contributor

I propose to integrate it into the core package, but hide the functionality behind a settings.json flag. Core would depend on another package, namely artwells:meteor-guest-account (but I wait for the package owner to integrate a PR from me.)

@aaronjudd
Copy link
Contributor

I agree, I think that makes the most sense. I think it would be useful to enabled/disable in the shop settings UI as well.

@prinzdezibel
Copy link
Contributor

That would be even better as next improvement. Then the settings should go to a fixture data file (we talked about that already..)

@aaronjudd aaronjudd removed the beta label Jan 19, 2015
@aaronjudd aaronjudd added this to the Order Workflow milestone Jan 19, 2015
@prinzdezibel
Copy link
Contributor

https://github.com/reactioncommerce/reaction-core/pull/76
https://github.com/reactioncommerce/reaction-core-theme/pull/5

These changes are a first shot on the feature.

Not working yet is the conversion of a guest account into a real account. For that I need more changes in prinzdezibel:guest-accounts. Use-case would be that a logged in guest uses the sign-up dialogs to register a real user account. But then Meteor would probably complain, because of the duplicated email address.

@prinzdezibel
Copy link
Contributor

Would be happy to get some feedback. Please tell me if there are things that you guys want to have done in a different way. Thanks.

@aaronjudd
Copy link
Contributor

I'll wait for you to publish your accounts-guest package, -or- you could add to the packages directory, -or- I can fork the repo and take responsibility for publishing.

The workflow is that a user must supply an email for the order, and that creates a Meteor user record? if so, maybe https://github.com/splendido/meteor-accounts-meld would help with that workflow.

@prinzdezibel
Copy link
Contributor

The workflow is that a user must supply an email for the order, and that creates a Meteor user record?

That's correct.

if so, maybe https://github.com/splendido/meteor-accounts-meld would help with that workflow.

I'll have a look into it.

@aaronjudd
Copy link
Contributor

@aldeed I'm sort of wondering if this even needs the accounts-guest package, wouldn't it be just as easy to create a new temporary user when we create the reaction sessions? Also not sure how this is going to play with the session merging...

@prinzdezibel
Copy link
Contributor

@aaronjudd Package is published.

@aaronjudd
Copy link
Contributor

See #271 for discussion on guest account security.

@aaronjudd
Copy link
Contributor

Updated in branch so that canCheckoutAsGuest is a variable returned by app.coffee (ReactionCore.init), and moved into the shops schema, as well as added to admin 'shop settings' template. Updated shops.json, and removed as public.settings variable.

@aaronjudd
Copy link
Contributor

work in progress with the following approach:

Session management

if there is neither a sessionCart nor a userCart, create a sessionCart
if sessionCart is a not a userCart return sessionCart
if sessionCart just authenticated, add userId + email
   then copy existing userCart(s) into sessionCart and remove userCart(s)
if sessionCart just logged out, remove sessionId from sessionCart and create new sessionCart

Cart

add email as identifier
auto insert/update userId, email if authenticated

Checkout

change default step to guest checkout or login:
store email for order
add option to set password "create account" on order completion

Accounts

use new Accounts collection (previously: customers)
on account creation / login  with password, 
  if confirmed account creation email 
    create a customer collection record with this userId
    update all orders with matching email to match this userId
    copy all order addresses into Accounts.profile.addressBook
    copy all social / email info to Accounts.
    users collection locked down, nothing exposed to client, used for authentication only

  else
    if there are more orders with this email
    display on order view "Confirm email to link orders..."

Order view

add message for confirmation of email
authenticated user can see all orders where userId in list view
userAccountsDropdown icon for orders

Related issues @aldeed @prinzdezibel

#271
#16
#318
#76

Remove packages introduced in reactioncommerce/reaction-core#76

@aaronjudd aaronjudd assigned aaronjudd and unassigned prinzdezibel Feb 26, 2015
@aaronjudd aaronjudd removed the help wanted For issues that have a clear solution described and are not currently prioritized core team work label Feb 26, 2015
@aldeed
Copy link
Contributor

aldeed commented Feb 27, 2015

if sessionCart just logged out, remove sessionId from sessionCart and create new sessionCart

Wouldn't you want to delete the sessionCart and create a new blank one?

@aaronjudd
Copy link
Contributor

Yes, correct. that's what I've ended up doing.

aaronjudd added a commit that referenced this issue Mar 24, 2015
Thanks to contributions from @danielgindi `right to left internationalization` is now supported.

Take a look at the Russian or Hebrew languages to see RTL in action.

 - Resolves #176

Also contributions from  @firstred and @epson121 added Dutch and Croatian translations.

Thanks to contributions from @lovetostrike, the initial `reactioncommerce:reaction-social` package has been published, which gives basic social sharing functionality.

 - Resolves #61
 - Resolves #281

- if there is neither a sessionCart nor a userCart, create a sessionCart
  * add sessionId to cart.sessions
  * auto insert/update userId if authenticated
  * observers to ensure cart always exists (ie after deletion)
- if sessionCart is a not a userCart return sessionCart
- if sessionCart just authenticated, add userId
- only return a user cart when authenticated
  * copy existing userCart(s) into sessionCart and remove userCart(s)
- if userCart just logged out, remove sessionId from userCart and create new sessionCart
- allow multiple sessionId per cart when userCart

TODO:

- realistically this may not be very solid way to handle sessions.
- Session handling will need a **close review in the future**.
- potential edge cases where multiple session/auth/merge actions to a cart may destroy the cart
- cart really should have mirrored client and server methods and be tested offline

Issue updates:

- Remove packages introduced in reactioncommerce/reaction-core#76
- Resolves #271
- Resolves #339
- Resolves #326
- Resolves #183
- Strategic updates for issue #16
- Strategic updates for issue #318
- Strategic updates for issue #76

   * dashboard enable/disable **guest checkout**
   * change default step to **guest checkout** or create/sign-in
   * store email for order - **after order completion if guest**
   * not visible after destroyed session (ie: refresh)
   * updated checkout and progress bar to use
     cart value instead of session

TODO:

- validation on email guest entry
- add account creation instructions to an order completion email
- potentially add third prompt for account creation after email (or promos,etc)
- order emails!
- use workflow states to control checkout ui flow.

Thanks to initial contributions from @prinzdezibel!

- use new Accounts collection (previously referred to as customers)
- create account on user create, or use a session specific account
- implement Template.dynamic handling of AddressBook edit/add/grid
- changes to checkout address handling, fix accounts context
- update addressBook forms to autoform-v0.5.0 compatible (autoform not upgraded)
- change accounts/shop `email` from string to `emails` array
  - `emails: {'address': options.email, 'verified': true}`
- changed Shops, Accounts email to an array `emails`
- userAccountsDropdown icon for orders, profile
- user view of order history

TODO:

- merge session accounts to user account upon email confirmation (and email saved on cart)
- reduce / cleanup garbage sessions  (merge will help)
- session / accounts/ cart garbage collector
- account profile / settings
- on account creation / login  with password
    - if confirmed account creation email
      - create a account collection record with this userId
      - update all orders with matching email to match this userId
      - copy all order addresses into Accounts.profile.addressBook
      - copy all social / email info to Accounts.
      - users collection locked down, nothing exposed to client, used for authentication only
    - else
      - if there are more orders with this email
      - display on order view "Add order"

* moves user orders from cart/checkout folder to dashboard/orders
* add message for confirmation of email
* authenticated user can see all orders where userId in list view
* admin can see all in list view
* userAccountsDropdown icon for orders
* add cartId to Orders (instead of using cartId as orderId)

TODO:

- integrate the admin view of list into dashboard admin flow
- this is possibly a breaking change to the orders dashboard.
- remove sessionId from orders on logout

* updates to handling settings from registry (public, private)
* rename and move settingGeneral to shop/settings
* rename and move settingsAccounts to shop/accounts

**Multi-shop/vendor**

* shop account updates to prep multi-shop dashboard
* shopId added to cart.items (variants)

Issue updates:

- Strategic updates for issue #236
- Strategic updates for issue #327

* added settings.public to publish public settings to ReactionCore.xxx

Thanks to contributions and docs from @spencern

- Test coverage for product methods
- Fix, add coverage for core methods

* Upgrade to Meteor 1.0.4.2
* Implements `check` and `audit-argument-checks`
* Implements `browser-policy`
* Fixed footer layout pages loading.
* Updates CFS, removes FileStorage collection.
* **Contributions from @aldeed @prinzdezibel @spencern @boboci9 @evliu @ceh @gouthamve @KEFIRCHIK @epson21 @firstred
**
jshimko pushed a commit that referenced this issue Dec 3, 2015
==============================

*Ticket: #183

Guest checkout is enabled with the following settings in settings.json:

  >   "public": { "CHECKOUT_AS_GUEST": true }

  Depends on the following package:
      `prinzdezibel:accounts-guest`
      (https://github.com/prinzdezibel/meteor-accounts-guests)
aaronjudd added a commit that referenced this issue Dec 3, 2015
Changes that refactor the `ReactionCore.registerPackage`
implementation to a more flexible, and structured template
registry. `ReactionCore.registerPackage` moves to server.
package.registry is published to client.

These are not backwards compatible changes.

Updated documentation at docs/packages.md

Initial commit for issue #314

Strategic updates for Issue #273
Strategic updates for Issue #306
Strategic updates for Issue #305
Strategic updates for Issue #246
Strategic updates for Issue #183
Strategic updates for Issue #155
Strategic updates for Issue #16
Strategic updates for Issue #148

Resolves #53
Resolves #308
Resolves #178

*Remaining tasks*

solve undefined error
convert the rest of the payment packages
context sensitive widgets (context?)
update with detailed docs
(document all the existing "provides")
aaronjudd added a commit that referenced this issue Dec 3, 2015
##package-registry-refactor
Changes that refactor the `ReactionCore.registerPackage`
implementation to a more flexible, and structured template
registry. `ReactionCore.registerPackage` moves to server.
package.registry is published to client.

cycle = Core, Stable, Testing (todo: => correlates package semver)
container = combine multiple registry entries

These are not backwards compatible changes.

Updated documentation at docs/packages.md

Initial commit for issue #314

Strategic updates for Issue #273
Strategic updates for Issue #306
Strategic updates for Issue #305
Strategic updates for Issue #246
Strategic updates for Issue #183
Strategic updates for Issue #155
Strategic updates for Issue #16
Strategic updates for Issue #148
Strategic updates for Issue #146

Resolves #53
Resolves #308
Resolves #178
aaronjudd added a commit that referenced this issue Dec 3, 2015
**Cart**

*The goal is a reactive offline / online multisession-multishop-multidevice cart.*

- if there is neither a sessionCart nor a userCart, create a sessionCart
  * add sessionId to cart.sessions
  * auto insert/update userId if authenticated
  * observers to ensure cart always exists (ie after deletion)
- if sessionCart is a not a userCart return sessionCart
- if sessionCart just authenticated, add userId
- only return a user cart when authenticated
  * copy existing userCart(s) into sessionCart and remove userCart(s)
- if userCart just logged out, remove sessionId from userCart and create new sessionCart
- allow multiple sessionId per cart when userCart

TODO:

- realistically this may not be very solid way to handle sessions.
- It will need a close review in the future.
- there are some edge cases where multiple authentications
or merges to the same cart may destroy the cart
- Cart really should have mirrored client and server methods
to allow adding to cart while offline
- allow multiple sessionId per cart when userCart
- consider implementation of this as part of Accounts

Updates issues:

- Remove packages introduced in reactioncommerce/reaction-core#76
- Resolves #271
- Resolves #339
- Resolves #326
- Resolves #183
- Strategic updates for issue #16
- Strategic updates for issue #318
- Strategic updates for issue #76

**Checkout**

   * dashboard enable/disable guest checkout
   * change default step to guest checkout or create/sign-in
   * store email for order - after order completion if guest
   * not visible after destroyed session (ie: refresh)
   * updated checkout and progress bar to use
     cart value instead of session

TODO:

- validation on email guest entry
- add account creation instructions to an order completion email
- potentially add third prompt for account creation after email (or promos,etc)
- order emails!
- use workflow states to control checkout ui flow.

**Accounts**

  * use new Accounts collection (previously referred to as customers)
  * userAccountsDropdown icon for orders, profile

  TODO:

- account profile / settings
- on account creation / login  with password:

    if confirmed account creation email
      create a account collection record with this userId
      update all orders with matching email to match this userId
      copy all order addresses into Accounts.profile.addressBook
      copy all social / email info to Accounts.
      users collection locked down, nothing exposed to client, used for authentication only
    else
      if there are more orders with this email
      display on order view "Add order"

**Packages**

* added settings.public to publish public settings to ReactionCore.xxx

**Orders**

* moves user orders from cart/checkout folder to dashboard/orders
* add message for confirmation of email
* authenticated user can see all orders where userId in list view
* admin can see all in list view
* userAccountsDropdown icon for orders
* add cartId to Orders (instead of using cartId as orderId)

TODO:

- integrate the admin view of list into dashboard admin flow
- this is possibly a breaking change to the orders dashboard.

**Dashboard**

* updates to handling settings from registry
* rename and move settingGeneral to shop/settings
* rename and move settingsAccounts to shop/accounts

**Multi-shop/vendor**

* shop account updates to prep multi-shop dashboard
* shopId added to cart.items (variants)

Strategic updates for issue #236
Strategic updates for issue #327

**General**

* Fixed footer layout pages loading.
* Updates CFS, removes FileStorage collection.

Related issues @aldeed @prinzdezibel
aaronjudd added a commit that referenced this issue Dec 3, 2015
Thanks to contributions from @danielgindi `right to left internationalization` is now supported.

Take a look at the Russian or Hebrew languages to see RTL in action.

 - Resolves #176

Also contributions from  @firstred and @epson121 added Dutch and Croatian translations.

Thanks to contributions from @lovetostrike, the initial `reactioncommerce:reaction-social` package has been published, which gives basic social sharing functionality.

 - Resolves #61
 - Resolves #281

- if there is neither a sessionCart nor a userCart, create a sessionCart
  * add sessionId to cart.sessions
  * auto insert/update userId if authenticated
  * observers to ensure cart always exists (ie after deletion)
- if sessionCart is a not a userCart return sessionCart
- if sessionCart just authenticated, add userId
- only return a user cart when authenticated
  * copy existing userCart(s) into sessionCart and remove userCart(s)
- if userCart just logged out, remove sessionId from userCart and create new sessionCart
- allow multiple sessionId per cart when userCart

TODO:

- realistically this may not be very solid way to handle sessions.
- Session handling will need a **close review in the future**.
- potential edge cases where multiple session/auth/merge actions to a cart may destroy the cart
- cart really should have mirrored client and server methods and be tested offline

Issue updates:

- Remove packages introduced in reactioncommerce/reaction-core#76
- Resolves #271
- Resolves #339
- Resolves #326
- Resolves #183
- Strategic updates for issue #16
- Strategic updates for issue #318
- Strategic updates for issue #76

   * dashboard enable/disable **guest checkout**
   * change default step to **guest checkout** or create/sign-in
   * store email for order - **after order completion if guest**
   * not visible after destroyed session (ie: refresh)
   * updated checkout and progress bar to use
     cart value instead of session

TODO:

- validation on email guest entry
- add account creation instructions to an order completion email
- potentially add third prompt for account creation after email (or promos,etc)
- order emails!
- use workflow states to control checkout ui flow.

Thanks to initial contributions from @prinzdezibel!

- use new Accounts collection (previously referred to as customers)
- create account on user create, or use a session specific account
- implement Template.dynamic handling of AddressBook edit/add/grid
- changes to checkout address handling, fix accounts context
- update addressBook forms to autoform-v0.5.0 compatible (autoform not upgraded)
- change accounts/shop `email` from string to `emails` array
  - `emails: {'address': options.email, 'verified': true}`
- changed Shops, Accounts email to an array `emails`
- userAccountsDropdown icon for orders, profile
- user view of order history

TODO:

- merge session accounts to user account upon email confirmation (and email saved on cart)
- reduce / cleanup garbage sessions  (merge will help)
- session / accounts/ cart garbage collector
- account profile / settings
- on account creation / login  with password
    - if confirmed account creation email
      - create a account collection record with this userId
      - update all orders with matching email to match this userId
      - copy all order addresses into Accounts.profile.addressBook
      - copy all social / email info to Accounts.
      - users collection locked down, nothing exposed to client, used for authentication only
    - else
      - if there are more orders with this email
      - display on order view "Add order"

* moves user orders from cart/checkout folder to dashboard/orders
* add message for confirmation of email
* authenticated user can see all orders where userId in list view
* admin can see all in list view
* userAccountsDropdown icon for orders
* add cartId to Orders (instead of using cartId as orderId)

TODO:

- integrate the admin view of list into dashboard admin flow
- this is possibly a breaking change to the orders dashboard.
- remove sessionId from orders on logout

* updates to handling settings from registry (public, private)
* rename and move settingGeneral to shop/settings
* rename and move settingsAccounts to shop/accounts

**Multi-shop/vendor**

* shop account updates to prep multi-shop dashboard
* shopId added to cart.items (variants)

Issue updates:

- Strategic updates for issue #236
- Strategic updates for issue #327

* added settings.public to publish public settings to ReactionCore.xxx

Thanks to contributions and docs from @spencern

- Test coverage for product methods
- Fix, add coverage for core methods

* Upgrade to Meteor 1.0.4.2
* Implements `check` and `audit-argument-checks`
* Implements `browser-policy`
* Fixed footer layout pages loading.
* Updates CFS, removes FileStorage collection.
* **Contributions from @aldeed @prinzdezibel @spencern @boboci9 @evliu @ceh @gouthamve @KEFIRCHIK @epson21 @firstred
**
aaronjudd pushed a commit that referenced this issue Dec 3, 2015
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

4 participants