Commit a7c8c2b69f17d21207e186df6e3d81f5d3556356
1 parent
1e534a73
Exists in
master
and in
29 other branches
Fixing notification
Showing
3 changed files
with
30 additions
and
8 deletions
Show diff stats
plugins/shopping_cart/views/shopping_cart_plugin/mailer/customer_notification.html.erb
... | ... | @@ -15,9 +15,21 @@ |
15 | 15 | <ul> |
16 | 16 | <li><b><%= _('Full name') %>: </b><%= @customer[:name] %></li> |
17 | 17 | <li><b><%= _('Phone number') %>: </b><%= @customer[:contact_phone] %></li> |
18 | - <li><b><%= _('Address') %>: </b><%= @customer[:address] %><br \> | |
19 | - <%= @customer[:city]+'-'+@customer[:state]+'-'+@customer[:country] %><br \> | |
20 | - <%= @customer[:zip_code] %></li> | |
18 | + <% if !@customer[:address].blank? || !@customer[:city].blank? || !@customer[:zip_code].blank? %> | |
19 | + <li><b><%= _('Address') %>:</b> | |
20 | + <% end %> | |
21 | + <% if !@customer[:address].blank? %> | |
22 | + <%= @customer[:address] %><br \> | |
23 | + <% end %> | |
24 | + <% if !@customer[:city].blank? %> | |
25 | + <%= @customer[:city] %><br \> | |
26 | + <% end %> | |
27 | + <% if !@customer[:zip_code].blank? %> | |
28 | + <%= @customer[:zip_code] %> | |
29 | + <% end %> | |
30 | + <% if !@customer[:address].blank? || !@customer[:city].blank? || !@customer[:zip_code].blank? %> | |
31 | + </li> | |
32 | + <% end %> | |
21 | 33 | </ul> |
22 | 34 | |
23 | 35 | <p><%=_('Here are the products you bought:')%></p> | ... | ... |
plugins/shopping_cart/views/shopping_cart_plugin/mailer/supplier_notification.html.erb
... | ... | @@ -13,11 +13,22 @@ |
13 | 13 | |
14 | 14 | <ul> |
15 | 15 | <li><b><%= _('Full name') %>: </b><%= @customer[:name] %></li> |
16 | - <li><b><%= _('Email') %>: </b><%= @customer[:email] %></li> | |
17 | 16 | <li><b><%= _('Phone number') %>: </b><%= @customer[:contact_phone] %></li> |
18 | - <li><b><%= _('Address') %>: </b><%= @customer[:address] %><br \> | |
19 | - <%= @customer[:city]+'-'+@customer[:state]+'-'+@customer[:country] %><br \> | |
20 | - <%= @customer[:zip_code] %></li> | |
17 | + <% if !@customer[:address].blank? || !@customer[:city].blank? || !@customer[:zip_code].blank? %> | |
18 | + <li><b><%= _('Address') %>:</b> | |
19 | + <% end %> | |
20 | + <% if !@customer[:address].blank? %> | |
21 | + <%= @customer[:address] %><br \> | |
22 | + <% end %> | |
23 | + <% if !@customer[:city].blank? %> | |
24 | + <%= @customer[:city] %><br \> | |
25 | + <% end %> | |
26 | + <% if !@customer[:zip_code].blank? %> | |
27 | + <%= @customer[:zip_code] %> | |
28 | + <% end %> | |
29 | + <% if !@customer[:address].blank? || !@customer[:city].blank? || !@customer[:zip_code].blank? %> | |
30 | + </li> | |
31 | + <% end %> | |
21 | 32 | </ul> |
22 | 33 | |
23 | 34 | <p><%=_('And here are the items bought by this customer:')%></p> | ... | ... |
plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb
... | ... | @@ -10,7 +10,6 @@ |
10 | 10 | <fieldset><legend><%=_('Delivery Address')%></legend> |
11 | 11 | <%= labelled_form_field(_('Address (street and number)'), f.text_field(:address)) %> |
12 | 12 | <%= labelled_form_field( _("City"), f.text_field(:city)) %> |
13 | - <%= labelled_form_field( _("State"), f.text_field(:state)) %> | |
14 | 13 | <%= labelled_form_field(_('ZIP code'), f.text_field(:zip_code)) %> |
15 | 14 | </fieldset> |
16 | 15 | <div id="cart-form-actions"> | ... | ... |