Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 0f61b94

Browse files
authored
Merge pull request #1775 from OpenBazaar/removeAddressListFromBuyFlow
Remove the address list from the buy flow.
2 parents 6bc461e + 770e321 commit 0f61b94

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

js/languages/en-US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@
662662
"MustAddAddress": "You must add an address to ship to",
663663
"VendorShipsTo": "Ships to:",
664664
"DoesNotShipHere": "Does not ship here",
665+
"NoShippableAddresses": "This item does not ship to any of your saved addresses.",
665666
"Send": "Send",
666667
"SendBTCtoAddress": "Send %{amount} BTC to %{recipient}",
667668
"OpenAddress": "Open in Local Wallet",

js/templates/buyAddresses.html

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1+
<% if(_.intersection(_.pluck(ob.user.shipping_addresses, 'country'), ob.vendor_offer.listing.shipping.shipping_regions).length < 1 && !ob.worldwide) { %>
12
<div class="flexRow custCol-primary custCol-border">
2-
<div class="rowItem padding10">
3-
<div class="textSize14px txt-fade padding10">
4-
<strong><%= polyglot.t('buyFlow.VendorShipsTo') %> </strong>
5-
<span>
6-
<%= ob.shipsToList %>
7-
</span>
8-
</div>
3+
<div class="rowItem padding10 txt-center">
4+
<strong><%= polyglot.t('buyFlow.NoShippableAddresses') %></strong>
95
</div>
106
</div>
7+
<% } %>
118
<% _.each(ob.user.shipping_addresses, function(address, i){ %>
129
<% if(address.city && address.country && address.displayCountry && address.name && address.postal_code && address.state && address.street) { %>
1310
<% if(ob.worldwide || ob.vendor_offer.listing.shipping.shipping_regions.indexOf(address.country) > -1){ %>

js/views/buyAddressesVw.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
var __ = require('underscore'),
44
$ = require('jquery'),
55
loadTemplate = require('../utils/loadTemplate'),
6-
baseVw = require('./baseVw'),
7-
localize = require('../utils/localize');
6+
baseVw = require('./baseVw');
87

98
module.exports = baseVw.extend({
109

@@ -30,8 +29,7 @@ module.exports = baseVw.extend({
3029
loadedTemplate(
3130
__.extend({}, self.model.toJSON(), {
3231
worldwide: self.worldwide,
33-
selected: selected,
34-
shipsToList: localize.localizeShippingRegions(self.shippingRegions)
32+
selected: selected
3533
})
3634
)
3735
);

0 commit comments

Comments
 (0)