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
5f15f8c1
Commit
5f15f8c1
authored
May 10, 2021
by
Shaphen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AFP-47 Shaphen Pangburn]: Show discount details on produc details modal
parent
b49c9405
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
product-details.jsx
ecom-web/src/components/product-market/product-details.jsx
+10
-0
product-item.jsx
ecom-web/src/components/product-market/product-item.jsx
+3
-2
product-market.css
ecom-web/src/resources/stylesheets/product-market.css
+14
-0
No files found.
ecom-web/src/components/product-market/product-details.jsx
View file @
5f15f8c1
...
@@ -29,6 +29,16 @@ export default class ProductDetails extends Component {
...
@@ -29,6 +29,16 @@ export default class ProductDetails extends Component {
<
p
>
Free Delivery:
<
span
>
Everywhere!
</
span
></
p
>
<
p
>
Free Delivery:
<
span
>
Everywhere!
</
span
></
p
>
<
p
>
Get it by:
<
span
>
Never!
</
span
></
p
>
<
p
>
Get it by:
<
span
>
Never!
</
span
></
p
>
</
div
>
</
div
>
{
this
.
props
.
product
.
promo
?
<
div
>
<
p
id=
"prod-details-promo-percentage"
>
This is currently
{
this
.
props
.
product
.
promo
}
% off!
</
p
>
<
p
id=
"prod-details-promo-discount-number"
>
Buy now for $
{
this
.
props
.
discount
}
</
p
>
<
p
id=
"prod-details-promo-original-price"
>
Normally: $
{
this
.
props
.
product
.
price
}
</
p
>
</
div
>
:
""
}
<
input
type=
"number"
id=
"prod-details-quantity"
placeholder=
"Quantity"
/>
<
input
type=
"number"
id=
"prod-details-quantity"
placeholder=
"Quantity"
/>
<
button
id=
"prod-details-add-to-cart"
>
<
button
id=
"prod-details-add-to-cart"
>
Add to Cart
Add to Cart
...
...
ecom-web/src/components/product-market/product-item.jsx
View file @
5f15f8c1
...
@@ -22,6 +22,7 @@ export default class ProductItem extends Component {
...
@@ -22,6 +22,7 @@ export default class ProductItem extends Component {
}
}
render
()
{
render
()
{
let
discount
=
this
.
calculateDiscount
(
this
.
props
.
item
.
price
,
this
.
props
.
item
.
promo
)
return
(
return
(
<
div
className=
"product-item"
>
<
div
className=
"product-item"
>
<
div
id=
"more-details-img-box"
>
<
div
id=
"more-details-img-box"
>
...
@@ -41,7 +42,7 @@ export default class ProductItem extends Component {
...
@@ -41,7 +42,7 @@ export default class ProductItem extends Component {
$
{
this
.
props
.
item
.
price
}
$
{
this
.
props
.
item
.
price
}
</
p
>
</
p
>
<
p
id=
"promo-show-text"
>
<
p
id=
"promo-show-text"
>
$
{
this
.
calculateDiscount
(
this
.
props
.
item
.
price
,
this
.
props
.
item
.
promo
)
}
$
{
discount
}
</
p
>
</
p
>
</
div
>
:
"$"
+
this
.
props
.
item
.
price
}
</
div
>
:
"$"
+
this
.
props
.
item
.
price
}
</
div
>
</
div
>
...
@@ -79,7 +80,7 @@ export default class ProductItem extends Component {
...
@@ -79,7 +80,7 @@ export default class ProductItem extends Component {
}
}
}
}
}
}
>
>
<
ProductDetails
product=
{
this
.
props
.
item
}
/>
<
ProductDetails
product=
{
this
.
props
.
item
}
discount=
{
discount
}
/>
</
Modal
>
</
Modal
>
</
div
>
</
div
>
)
)
...
...
ecom-web/src/resources/stylesheets/product-market.css
View file @
5f15f8c1
...
@@ -304,6 +304,20 @@
...
@@ -304,6 +304,20 @@
background-color
:
rgb
(
207
,
205
,
205
);
background-color
:
rgb
(
207
,
205
,
205
);
}
}
#prod-details-promo-percentage
,
#prod-details-promo-discount-number
{
font-size
:
16px
;
text-align
:
center
;
color
:
green
;
}
#prod-details-promo-original-price
{
text-align
:
center
;
font-size
:
14px
;
opacity
:
0.7
;
margin-bottom
:
10px
;
}
input
::-webkit-outer-spin-button
,
input
::-webkit-outer-spin-button
,
input
::-webkit-inner-spin-button
{
input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
;
-webkit-appearance
:
none
;
...
...
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