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

Remove the checkout UI #4947

Merged
merged 23 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
544f66b
feat: remove checkout button from cart drawer
aldeed Jan 13, 2019
ae734ff
feat: remove "Checkout Now" button from CartPanel
aldeed Jan 13, 2019
0d867f9
feat: remove cart/checkout role
aldeed Jan 13, 2019
dd74585
feat: remove cart/checkout route and cartCheckout template
aldeed Jan 13, 2019
82c0c03
feat: remove checkoutLogin template
aldeed Jan 13, 2019
08bdb40
feat: remove LoginInline component
aldeed Jan 13, 2019
76ead0d
chore: remove unused client mutation
aldeed Jan 13, 2019
027833b
chore: remove unused ValidEmail helper
aldeed Jan 13, 2019
81f059f
feat: remove the checkoutAddressBook template
aldeed Jan 13, 2019
532f526
feat: remove coreCheckoutShipping template
aldeed Jan 13, 2019
6109995
feat: remove checkoutReview template
aldeed Jan 13, 2019
b68df9a
feat: remove checkoutProgressBar template
aldeed Jan 13, 2019
ffa9c86
feat: remove checkoutPayment template
aldeed Jan 13, 2019
8e3bf48
feat: remove corePaymentMethods template
aldeed Jan 13, 2019
b533d1e
feat: remove ExampleIOUPaymentForm
aldeed Jan 13, 2019
3934709
feat: remove stripeMarketplacePaymentForm template
aldeed Jan 13, 2019
7312cff
feat: remove stripePaymentForm template
aldeed Jan 13, 2019
f0316d2
chore: remove unused availablePaymentMethods query
aldeed Jan 13, 2019
86db91b
chore: remove unused mutations
aldeed Jan 13, 2019
87fd670
feat: remove react-stripe-elements package
aldeed Jan 13, 2019
141b15b
feat: remove cartCompleted template
aldeed Jan 13, 2019
3fa0bc8
fix: add back react-stripe-elements
aldeed Jan 31, 2019
797f2e4
Merge branch 'develop' into feat-aldeed-remove-checkout-ui
aldeed Jan 31, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions imports/collections/schemas/shops.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ registerSchema("MerchantShop", MerchantShop);
* @property {String} unitsOfMeasure.$.label default value: `Ounces`
* @property {Boolean} unitsOfMeasure.$.default default value: `false`
* @property {Metafield[]} metafields optional
* @property {String[]} defaultSellerRoles default values: `["owner", "admin", "seller", "guest", "manage-users", "orders", "account/profile", "product", "createProduct", "tag", "index", "cart/checkout", "cart/completed"]`
* @property {String[]} defaultSellerRoles default values: `["owner", "admin", "seller", "guest", "manage-users", "orders", "account/profile", "product", "createProduct", "tag", "index", "cart/completed"]`
* @property {Layout[]} layout optional
* @property {ShopTheme} theme optional
* @property {BrandAsset[]} brandAssets optional
Expand Down Expand Up @@ -446,7 +446,6 @@ export const Shop = new SimpleSchema({
"createProduct",
"tag",
"index",
"cart/checkout",
"cart/completed"
]
},
Expand Down
137 changes: 0 additions & 137 deletions imports/plugins/core/accounts/client/components/loginInline.js

This file was deleted.

132 changes: 0 additions & 132 deletions imports/plugins/core/accounts/client/containers/loginInline.js

This file was deleted.

2 changes: 0 additions & 2 deletions imports/plugins/core/accounts/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export { default as SignIn } from "./components/signIn";
export { default as SignUp } from "./components/signUp";
export { default as UpdateEmail } from "./containers/updateEmail";
export { default as UpdatePassword } from "./components/updatePassword";
export { default as LoginInline } from "./components/loginInline";

export { default as AccountsDashboardContainer } from "./containers/accountsDashboardContainer";
export { default as AddressBookContainer } from "./containers/addressBookContainer";
Expand All @@ -39,7 +38,6 @@ export { default as ForgotPasswordContainer } from "./containers/forgotPassword"
export { default as MainDropdownContainer } from "./containers/mainDropdown";
export { default as MessagesContainer } from "./containers/messages";
export { default as UpdatePasswordContainer } from "./containers/updatePassword";
export { default as LoginInlineContainer } from "./containers/loginInline";
export { default as VerifyAccount } from "./containers/verifyAccount";

import "./templates/accounts.html";
Expand Down
17 changes: 1 addition & 16 deletions imports/plugins/core/checkout/client/components/cartDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import PropTypes from "prop-types";
import { Components } from "@reactioncommerce/reaction-components";

const CartDrawer = ({ productItems, pdpPath, handleRemoveItem, handleCheckout, handleImage, handleShowProduct }) => (
const CartDrawer = ({ productItems, pdpPath, handleRemoveItem, handleImage, handleShowProduct }) => (
<div>
<div className="cart-drawer-swiper-container">
<div className="cart-drawer-swiper-wrapper">
Expand All @@ -23,25 +23,10 @@ const CartDrawer = ({ productItems, pdpPath, handleRemoveItem, handleCheckout, h
</div>
</div>
<div className="cart-drawer-pagination" />
<div className="row">
<Components.Button
bezelStyle="solid"
className={{
"btn-lg": true,
"btn-block": true
}}
status="cta"
id="btn-checkout"
label="Checkout now"
i18nKeyLabel="cartDrawer.checkout"
onClick={handleCheckout}
/>
</div>
</div>
);

CartDrawer.propTypes = {
handleCheckout: PropTypes.func,
handleImage: PropTypes.func,
handleRemoveItem: PropTypes.func,
handleShowProduct: PropTypes.func,
Expand Down
21 changes: 3 additions & 18 deletions imports/plugins/core/checkout/client/components/cartPanel.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
import React from "react";
import PropTypes from "prop-types";
import { Components } from "@reactioncommerce/reaction-components";
import { registerComponent } from "@reactioncommerce/reaction-components";

const CartPanel = (props) => (
const CartPanel = () => (
<div style={{ textAlign: "center" }}>
<span id="spin" >
<i className="fa fa-circle-o-notch fa-spin fa-3x fa-fw"
style={{ marginBottom: "10px", marginTop: "10px", fontSize: "2.65em" }}
/>
</span>
<div className="cart-alert-text">{}</div>
<div className="cart-alert-checkout">
<Components.Button
id="btn-checkout"
bezelStyle="solid"
className="btn-lg btn-block"
i18nKeyLabel="cartDrawer.checkout"
label="Checkout now"
onClick={props.onClick || props.checkout}
status="success"
/>
</div>
</div>
);

CartPanel.propTypes = {
checkout: PropTypes.func,
onClick: PropTypes.func
};
registerComponent("CartPanel", CartPanel);

export default CartPanel;
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { compose, withProps } from "recompose";
import { registerComponent, composeWithTracker } from "@reactioncommerce/reaction-components";
import { $ } from "meteor/jquery";
import { Session } from "meteor/session";
import { Meteor } from "meteor/meteor";
import { getPrimaryMediaForOrderItem, ReactionProduct } from "/lib/api";
import { Reaction } from "/client/api";
Expand Down Expand Up @@ -47,12 +46,6 @@ const handlers = {
if (!cart) return;

cartItemElement.fadeOut(500, () => Meteor.call("cart/removeFromCart", cart._id, token, item._id));
},

handleCheckout() {
document.querySelector("#cart-drawer-container").classList.remove("opened");
Session.set("displayCart", false);
return Reaction.Router.go("cart/checkout");
}
};

Expand Down
Loading