Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ecommerce-maven
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ascend
ecommerce-maven
Commits
d737aa3f
Commit
d737aa3f
authored
May 13, 2021
by
Christopher Cottier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
full checkout and order flow, protected from users who are not logged in
parent
a0363409
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
SubmitOrder.js
ecom-web/src/components/checkout/SubmitOrder.js
+1
-1
shopping-cart.js
ecom-web/src/components/shopping-cart/shopping-cart.js
+11
-4
No files found.
ecom-web/src/components/checkout/SubmitOrder.js
View file @
d737aa3f
...
@@ -24,7 +24,7 @@ export default function SubmitOrder(props) {
...
@@ -24,7 +24,7 @@ export default function SubmitOrder(props) {
<
button
<
button
id
=
"SubmitButtonInput"
id
=
"SubmitButtonInput"
onClick
=
{()
=>
{
handleSubmitClick
()}}
onClick
=
{()
=>
{
handleSubmitClick
()}}
disabled
=
{
currentUser
?
false
:
true
}
>
Submit
Order
<
/button
>
>
Submit
Order
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
ecom-web/src/components/shopping-cart/shopping-cart.js
View file @
d737aa3f
...
@@ -90,7 +90,7 @@ export default function ShoppingCart() {
...
@@ -90,7 +90,7 @@ export default function ShoppingCart() {
},
[
cartItems
])
},
[
cartItems
])
if
(
!
userSession
)
return
<
Redirect
to
=
"/product-market"
/>
//
if (!userSession) return <Redirect to="/product-market" />
return
(
return
(
<
div
id
=
"shoppingCartContainer"
>
<
div
id
=
"shoppingCartContainer"
>
...
@@ -110,9 +110,16 @@ export default function ShoppingCart() {
...
@@ -110,9 +110,16 @@ export default function ShoppingCart() {
})}
})}
<
/div
>
<
/div
>
<
Link
id
=
"checkoutButtonContainer"
to
=
"/checkout"
>
{
<
button
id
=
"checkoutButton"
>
Proceed
To
Checkout
<
/button
>
cartItems
.
length
>
0
?
(
<
/Link
>
<
Link
id
=
"checkoutButtonContainer"
to
=
"/checkout"
>
<
button
id
=
"checkoutButton"
>
Proceed
To
Checkout
<
/button
>
<
/Link
>
)
:
(
<
div
>
Add
more
items
to
your
cart
!<
/div
>
)
}
<
/div
>
<
/div
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment