Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
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
edx
edx-platform
Commits
c25e4ba0
Unverified
Commit
c25e4ba0
authored
Nov 30, 2017
by
Matt Tuchfarber
Committed by
GitHub
Nov 30, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16648 from edx/tuchfarber/add_price_to_marketing_button
Add pricing data to program purchase button
parents
2ad918c1
26144b4a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletions
+29
-1
lms/static/sass/views/_program-marketing-page.scss
+5
-0
lms/templates/courseware/program_marketing.html
+24
-1
No files found.
lms/static/sass/views/_program-marketing-page.scss
View file @
c25e4ba0
...
...
@@ -20,6 +20,11 @@
.btn
{
font-size
:
20px
;
font-weight
:
$font-weight-bold
;
.original-price
{
text-decoration
:
line-through
;
font-weight
:
$font-weight-normal
;
}
}
.btn
,
...
...
lms/templates/courseware/program_marketing.html
View file @
c25e4ba0
...
...
@@ -62,6 +62,8 @@ endorser_org = endorser_position.get('organization_name') or corporate_endorseme
faqs =
program['faq']
courses =
program['courses']
instructors =
program['instructors']
full_program_price_format =
'{0:.0f}'
if
program
['
full_program_price
'].
is_integer
()
else
'{
0:
.
2f
}'
full_program_price =
full_program_price_format.format(program['full_program_price'])
%
>
<div
id=
"program-details-hero"
>
<div
class=
"main-banner"
...
...
@@ -83,9 +85,30 @@ endorser_org = endorser_position.get('organization_name') or corporate_endorseme
<h2>
${program['subtitle']}
</h2>
</div>
<div>
## Note: Weird formatting to fix the inline spacing issue.
% if program.get('is_learner_eligible_for_one_click_purchase'):
<a
href=
"${buy_button_href}"
class=
"btn btn-success"
>
${_('Purchase the Program')}
<span>
${_('Purchase the Program (')}
</span
%
if
program.get('discount_data')
and
program['discount_data']['is_discounted']:
><span
aria-label=
"${_('Original Price')}"
class=
"original-price"
>
${Text(_('${oldPrice}')).format(
oldPrice=full_program_price_format.format(program['discount_data']['total_incl_tax_excl_discounts'])
)}
</span
><span
aria-label=
"${_('Discounted Price')}"
class=
"discount"
>
${Text(_('${newPrice}')).format(
newPrice=full_program_price,
)}
</span
><span
class=
"savings"
>
${Text(_('{currency})')).format(
discount_value=full_program_price_format.format(program['discount_data']['discount_value']),
currency=program['discount_data']['currency']
)}
</span>
% else:
>
<span>
${"${price})".format(price=full_program_price)}
</span>
% endif
</a>
% else:
<a
href=
"#courses"
class=
"btn btn-success"
>
...
...
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