Skip to content

Instantly share code, notes, and snippets.

@Kadajett
Created January 11, 2019 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kadajett/a53c91133875b1012c76f5485522546f to your computer and use it in GitHub Desktop.
Save Kadajett/a53c91133875b1012c76f5485522546f to your computer and use it in GitHub Desktop.
Cart line item modification
let tempLineItems = lineItems.filter(item => item.label === "Medical Fee");
// debugger;
return products && products.length > 0 ? (
<Block>
<Block mb={combineRems(spacing.two, spacing.four)}>
{/* <CartProductList
products={products}
onDecreaseQuantity={decreaseQuantity}
onIncreaseQuantity={increaseQuantity}
onRemoveProduct={removeProduct}
/> */}
</Block>
<Block mb={4}>
<CartLineItemList items={tempLineItems} />
</Block>
<Block mb={combineRems(spacing.two, spacing.four)} />
{/* <CartPromoForm initialValues={{ discount: coupon }} handleCalculateCartTotal={handleCalculateCartTotal} /> */}
<Block mb={combineRems(spacing.two, spacing.four)} />
<CheckoutFooter>
<Button
label="NEXT"
fullWidth
onClick={handleNextStep}
testId="CheckoutCartNextButton"
/>
</CheckoutFooter>
</Block>
) : (
<CartEmpty onCtaClick={handleEmptyCartCtaClick} />
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment