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
a7be7aaa
Commit
a7be7aaa
authored
May 08, 2021
by
Shaphen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AFP-47 Shaphen Pangburn]: Modify promo display to better show savings
parent
88e3674e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
8 deletions
+41
-8
product-market.jsx
ecom-web/src/components/product-market/product-market.jsx
+14
-7
product-market.css
ecom-web/src/resources/stylesheets/product-market.css
+27
-1
No files found.
ecom-web/src/components/product-market/product-market.jsx
View file @
a7be7aaa
...
@@ -42,14 +42,21 @@ export default class ProductMarket extends Component {
...
@@ -42,14 +42,21 @@ export default class ProductMarket extends Component {
<
img
id=
"prod-img"
src=
{
prod
.
productImageUrl
?
prod
.
productImageUrl
:
"-no photo-"
}
/>
<
img
id=
"prod-img"
src=
{
prod
.
productImageUrl
?
prod
.
productImageUrl
:
"-no photo-"
}
/>
<
p
id=
"prod-name"
>
{
prod
.
productName
}
</
p
>
<
p
id=
"prod-name"
>
{
prod
.
productName
}
</
p
>
<
p
id=
"prod-description"
>
{
prod
.
productDescription
}
</
p
>
<
p
id=
"prod-description"
>
{
prod
.
productDescription
}
</
p
>
<
p
id=
"prod-price"
>
$
{
prod
.
price
}
</
p
>
<
p
id=
"prod-price"
>
<
p
id=
"prod-promotion"
>
{
prod
.
promo
?
{
prod
.
promo
?
"Order now for "
<
div
id=
"promo-show"
>
+
prod
.
promo
<
p
id=
"promo-show-text-original"
>
+
"% off, making it "
$
{
prod
.
price
}
+
this
.
calculateDiscount
(
prod
.
price
,
prod
.
promo
)
</
p
>
+
"!"
:
""
}
<
p
id=
"promo-show-text"
>
$
{
this
.
calculateDiscount
(
prod
.
price
,
prod
.
promo
)
}
</
p
>
</
p
>
</
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
>
<
button
id=
"add-to-cart-button"
>
Add to Cart
</
button
>
</
div
>
</
div
>
:
:
...
...
ecom-web/src/resources/stylesheets/product-market.css
View file @
a7be7aaa
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
text-align
:
center
;
text-align
:
center
;
font-size
:
30px
;
font-size
:
30px
;
margin
:
15px
0px
10px
;
margin
:
15px
0px
10px
;
cursor
:
default
;
}
}
...
@@ -45,12 +46,19 @@
...
@@ -45,12 +46,19 @@
height
:
200px
;
height
:
200px
;
}
}
#prod-name
,
#prod-description
,
#prod-price
{
#prod-name
,
#prod-description
,
#prod-price
,
#prod-promotion
{
width
:
100%
;
width
:
100%
;
text-align
:
center
;
text-align
:
center
;
cursor
:
default
;
cursor
:
default
;
}
}
#prod-promotion
{
color
:
red
;
}
#add-to-cart-button
{
#add-to-cart-button
{
cursor
:
pointer
;
cursor
:
pointer
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
...
@@ -61,3 +69,21 @@
...
@@ -61,3 +69,21 @@
color
:
gray
;
color
:
gray
;
cursor
:
default
;
cursor
:
default
;
}
}
#promo-show
{
display
:
flex
;
justify-content
:
center
;
}
#promo-show-text
,
#promo-show-text-original
{
margin
:
0px
3px
;
}
#promo-show-text-original
{
text-decoration
:
line-through
;
color
:
gray
;
}
#promo-show-text
{
}
\ 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