Commit 19d0eda6 by Clinton Blackburn

Merge pull request #7952 from edx/clintonb/paypal-receipt

Hiding Billing Address for Orders without Billing Addresses
parents 2a449ade 7c75b34b
...@@ -109,16 +109,20 @@ var edx = edx || {}; ...@@ -109,16 +109,20 @@ var edx = edx || {};
purchasedDatetime: order.date_placed, purchasedDatetime: order.date_placed,
totalCost: self.formatMoney(order.total_excl_tax), totalCost: self.formatMoney(order.total_excl_tax),
isRefunded: false, isRefunded: false,
billedTo: { items: [],
billedTo: null
};
if (order.billing_address){
receiptContext.billedTo = {
firstName: order.billing_address.first_name, firstName: order.billing_address.first_name,
lastName: order.billing_address.last_name, lastName: order.billing_address.last_name,
city: order.billing_address.city, city: order.billing_address.city,
state: order.billing_address.state, state: order.billing_address.state,
postalCode: order.billing_address.postcode, postalCode: order.billing_address.postcode,
country: order.billing_address.country country: order.billing_address.country
}, }
items: [] }
};
receiptContext.items = _.map( receiptContext.items = _.map(
order.lines, order.lines,
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
<% } %> <% } %>
</div> </div>
<% if ( receipt.billedTo ) { %>
<div class="copy"> <div class="copy">
<p><%- gettext( "Billed to" ) %>: <p><%- gettext( "Billed to" ) %>:
<span class="name-first"><%- receipt.billedTo.firstName %></span> <span class="name-first"><%- receipt.billedTo.firstName %></span>
...@@ -71,6 +72,7 @@ ...@@ -71,6 +72,7 @@
<span class="address-country"><%- receipt.billedTo.country.toUpperCase() %></span>) <span class="address-country"><%- receipt.billedTo.country.toUpperCase() %></span>)
</p> </p>
</div> </div>
<% } %>
</div> </div>
</div> </div>
<% } else { %> <% } else { %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment