-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**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
- Loading branch information
Showing
91 changed files
with
2,802 additions
and
988 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
packages/reaction-core/client/templates/accounts/accounts-ui/login_buttons_dropdown.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +0,0 @@ | ||
loginButtonsSession = Accounts._loginButtonsSession | ||
|
||
Template._loginButtonsLoggedOutPasswordService.helpers | ||
# Build a decorator to wrap the original function from Accounts package. When called, | ||
# just modify the visible property of the password field. | ||
fields: ((func) -> | ||
-> | ||
fields = func() | ||
unless loginButtonsSession.get("inSignupFlow") | ||
fields.forEach (item, i) -> | ||
if item.fieldName is "password" | ||
item.visible = -> | ||
not Session.get("Reactioncommerce.Core.loginButtons.inLoginAsGuestFlow") | ||
return | ||
return fields | ||
)(Blaze._getTemplateHelper(Template._loginButtonsLoggedOutPasswordService, "fields")) | ||
|
||
inLoginAsGuestFlow: -> | ||
return Session.get "Reactioncommerce.Core.loginButtons.inLoginAsGuestFlow" | ||
|
||
inLoginFlow: -> | ||
return not Session.get("Reactioncommerce.Core.loginButtons.inLoginAsGuestFlow") and | ||
not loginButtonsSession.get("inSignupFlow") and | ||
not loginButtonsSession.get("inForgotPasswordFlow") | ||
|
||
resetLoginFlow: -> | ||
Session.set 'Reactioncommerce.Core.loginButtons.inLoginAsGuestFlow', false | ||
loginButtonsSession.set "inSignupFlow", false | ||
loginButtonsSession.set 'inForgotPasswordFlow', false | ||
|
||
canCheckoutAsGuest: -> | ||
!!ReactionCore.canCheckoutAsGuest | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Template.loginInline.helpers | ||
allowGuestCheckout: -> | ||
return ReactionCore.allowGuestCheckout | ||
|
||
Template.loginInline.events | ||
'click .continue-guest': () -> | ||
Session.set "guestCheckoutFlow", true |
19 changes: 18 additions & 1 deletion
19
packages/reaction-core/client/templates/accounts/inline/inline.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,22 @@ | ||
<template name="loginInline"> | ||
<div class="accounts-dialog accounts-inline"> | ||
{{>_loginButtonsLoggedOutAllServices inline="inline"}} | ||
{{#if allowGuestCheckout}} | ||
<div class="col-md-6 pull-left checkout-guest"> | ||
<div class="guest-checkout"> | ||
<p class="text-justify" data-i18n="checkoutLogin.guestMessage">Continue as a guest, and you can create an account later. | ||
</p> | ||
<div class="login-button single-login-button continue-guest"> | ||
<span data-i18n="checkoutLogin.continueAsGuest">Continue as Guest</span> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-6 pull-right checkout-login"> | ||
{{>_loginButtonsLoggedOutAllServices inline="inline"}} | ||
</div> | ||
{{else}} | ||
<div class="checkout-login"> | ||
{{>_loginButtonsLoggedOutAllServices inline="inline"}} | ||
</div> | ||
{{/if}} | ||
</div> | ||
</template> |
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
packages/reaction-core/client/templates/accounts/profile/profile.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<template name="accountProfile"> | ||
<div class="row"> | ||
<h3>Hello!</h3> | ||
</div> | ||
<div class="row"> | ||
{{> dashboardOrdersList}} | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/reaction-core/client/templates/cart/cartIcon/cartIcon.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.