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
19d0eda6
Commit
19d0eda6
authored
May 07, 2015
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7952 from edx/clintonb/paypal-receipt
Hiding Billing Address for Orders without Billing Addresses
parents
2a449ade
7c75b34b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
lms/static/js/commerce/views/receipt_view.js
+8
-4
lms/templates/commerce/receipt.underscore
+12
-10
No files found.
lms/static/js/commerce/views/receipt_view.js
View file @
19d0eda6
...
...
@@ -109,16 +109,20 @@ var edx = edx || {};
purchasedDatetime
:
order
.
date_placed
,
totalCost
:
self
.
formatMoney
(
order
.
total_excl_tax
),
isRefunded
:
false
,
billedTo
:
{
items
:
[],
billedTo
:
null
};
if
(
order
.
billing_address
){
receiptContext
.
billedTo
=
{
firstName
:
order
.
billing_address
.
first_name
,
lastName
:
order
.
billing_address
.
last_name
,
city
:
order
.
billing_address
.
city
,
state
:
order
.
billing_address
.
state
,
postalCode
:
order
.
billing_address
.
postcode
,
country
:
order
.
billing_address
.
country
},
items
:
[]
};
}
}
receiptContext
.
items
=
_
.
map
(
order
.
lines
,
...
...
lms/templates/commerce/receipt.underscore
View file @
19d0eda6
...
...
@@ -61,16 +61,18 @@
<% } %>
</div>
<div class="copy">
<p><%- gettext( "Billed to" ) %>:
<span class="name-first"><%- receipt.billedTo.firstName %></span>
<span class="name-last"><%- receipt.billedTo.lastName %></span>
(<span class="address-city"><%- receipt.billedTo.city %></span>,
<span class="address-state"><%- receipt.billedTo.state %></span>
<span class="address-postalcode"><%- receipt.billedTo.postalCode %></span>
<span class="address-country"><%- receipt.billedTo.country.toUpperCase() %></span>)
</p>
</div>
<% if ( receipt.billedTo ) { %>
<div class="copy">
<p><%- gettext( "Billed to" ) %>:
<span class="name-first"><%- receipt.billedTo.firstName %></span>
<span class="name-last"><%- receipt.billedTo.lastName %></span>
(<span class="address-city"><%- receipt.billedTo.city %></span>,
<span class="address-state"><%- receipt.billedTo.state %></span>
<span class="address-postalcode"><%- receipt.billedTo.postalCode %></span>
<span class="address-country"><%- receipt.billedTo.country.toUpperCase() %></span>)
</p>
</div>
<% } %>
</div>
</div>
<% } else { %>
...
...
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