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
5b4f2f7d
Commit
5b4f2f7d
authored
May 08, 2021
by
Shaphen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AFP-47 Shaphen Pangburn]: Add input field for quantity next to Add to Cart button
parent
94de113b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
product-market.jsx
ecom-web/src/components/product-market/product-market.jsx
+5
-2
product-market.css
ecom-web/src/resources/stylesheets/product-market.css
+27
-0
No files found.
ecom-web/src/components/product-market/product-market.jsx
View file @
5b4f2f7d
...
...
@@ -53,13 +53,16 @@ export default class ProductMarket extends Component {
<
p
id=
"promo-show-text"
>
$
{
this
.
calculateDiscount
(
prod
.
price
,
prod
.
promo
)
}
</
p
>
</
div
>
:
prod
.
price
}
</
div
>
:
"$"
+
prod
.
price
}
</
p
>
{
prod
.
promo
?
<
p
id=
"prod-promotion"
>
{
"Save "
+
prod
.
promo
+
"% on your order!"
}
</
p
>
:
""
}
<
button
id=
"add-to-cart-button"
>
Add to Cart
</
button
>
<
div
className=
"add-cart-and-quantity"
>
<
input
id=
"order-quantity"
type=
"number"
placeholder=
"Qty"
/>
<
span
id=
"add-to-cart-button"
>
Add to Cart
</
span
>
</
div
>
</
div
>
:
<
div
className=
"product-item"
>
...
...
ecom-web/src/resources/stylesheets/product-market.css
View file @
5b4f2f7d
...
...
@@ -100,6 +100,15 @@
#add-to-cart-button
{
cursor
:
pointer
;
margin-bottom
:
10px
;
padding
:
5px
40px
;
border-radius
:
5px
;
border
:
1px
solid
black
;
font-size
:
15px
;
transition
:
all
0.3s
;
}
#add-to-cart-button
:hover
{
background-color
:
rgb
(
207
,
205
,
205
);
}
#prod-not-available
{
...
...
@@ -127,4 +136,22 @@
#promo-show-text
{
font-size
:
18px
;
padding-top
:
2px
;
}
#order-quantity
{
width
:
23px
;
height
:
13px
;
border-radius
:
5px
;
margin
:
1px
5px
;
padding
:
6px
;
}
.add-cart-and-quantity
{
display
:
flex
;
}
input
::-webkit-outer-spin-button
,
input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
;
margin
:
0
;
}
\ No newline at end of file
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