Commit 921c10e32e9940b731b538ff086277f55767a582
1 parent
882b9f2c
Exists in
master
and in
23 other branches
Shopping checkout interface
* Missing the send-email implementation
Showing
2 changed files
with
16 additions
and
16 deletions
Show diff stats
plugins/shopping_cart/controllers/shopping_cart_plugin_profile_controller.rb
| ... | ... | @@ -2,7 +2,6 @@ include ShoppingCartPlugin::CartHelper |
| 2 | 2 | |
| 3 | 3 | class ShoppingCartPluginProfileController < ProfileController |
| 4 | 4 | append_view_path File.join(File.dirname(__FILE__) + '/../views') |
| 5 | - | |
| 6 | 5 | before_filter :login_required, :only => [] |
| 7 | 6 | |
| 8 | 7 | def add |
| ... | ... | @@ -114,9 +113,9 @@ class ShoppingCartPluginProfileController < ProfileController |
| 114 | 113 | render :text => { |
| 115 | 114 | :ok => false, |
| 116 | 115 | :error => { |
| 117 | - :code => 1, | |
| 118 | - :message => _("Can't join items from different enterprises.") | |
| 119 | - } | |
| 116 | + :code => 1, | |
| 117 | + :message => _("Can't join items from different enterprises.") | |
| 118 | + } | |
| 120 | 119 | }.to_json |
| 121 | 120 | return false |
| 122 | 121 | end |
| ... | ... | @@ -128,9 +127,9 @@ class ShoppingCartPluginProfileController < ProfileController |
| 128 | 127 | render :text => { |
| 129 | 128 | :ok => false, |
| 130 | 129 | :error => { |
| 131 | - :code => 2, | |
| 132 | - :message => _("There is no cart.") | |
| 133 | - } | |
| 130 | + :code => 2, | |
| 131 | + :message => _("There is no cart.") | |
| 132 | + } | |
| 134 | 133 | }.to_json |
| 135 | 134 | return false |
| 136 | 135 | end |
| ... | ... | @@ -144,9 +143,9 @@ class ShoppingCartPluginProfileController < ProfileController |
| 144 | 143 | render :text => { |
| 145 | 144 | :ok => false, |
| 146 | 145 | :error => { |
| 147 | - :code => 3, | |
| 148 | - :message => _("This enterprise doesn't have this product.") | |
| 149 | - } | |
| 146 | + :code => 3, | |
| 147 | + :message => _("This enterprise doesn't have this product.") | |
| 148 | + } | |
| 150 | 149 | }.to_json |
| 151 | 150 | return nil |
| 152 | 151 | end |
| ... | ... | @@ -158,9 +157,9 @@ class ShoppingCartPluginProfileController < ProfileController |
| 158 | 157 | render :text => { |
| 159 | 158 | :ok => false, |
| 160 | 159 | :error => { |
| 161 | - :code => 4, | |
| 162 | - :message => _("The cart doesn't have this product.") | |
| 163 | - } | |
| 160 | + :code => 4, | |
| 161 | + :message => _("The cart doesn't have this product.") | |
| 162 | + } | |
| 164 | 163 | }.to_json |
| 165 | 164 | return false |
| 166 | 165 | end |
| ... | ... | @@ -172,9 +171,9 @@ class ShoppingCartPluginProfileController < ProfileController |
| 172 | 171 | render :text => { |
| 173 | 172 | :ok => false, |
| 174 | 173 | :error => { |
| 175 | - :code => 5, | |
| 176 | - :message => _("Invalid quantity.") | |
| 177 | - } | |
| 174 | + :code => 5, | |
| 175 | + :message => _("Invalid quantity.") | |
| 176 | + } | |
| 178 | 177 | }.to_json |
| 179 | 178 | return false |
| 180 | 179 | end | ... | ... |
plugins/shopping_cart/views/cart.html.erb
| 1 | +<% enterprise_identifier = !locals[:cart].nil? ? Enterprise.find(locals[:cart][:enterprise_id]).identifier : 'bli'%> | |
| 1 | 2 | <div id="cart1" class="cart" style="display:none" |
| 2 | 3 | data-l10nRemoveItem="<%=_('Are you sure you want to remove this item?')%>" |
| 3 | 4 | data-l10nCleanCart="<%=_('Are you sure you want to clean your cart?')%>"> | ... | ... |