diff --git a/plugins/shopping_cart/controllers/shopping_cart_plugin_profile_controller.rb b/plugins/shopping_cart/controllers/shopping_cart_plugin_profile_controller.rb index 00a5f21..1dbf747 100644 --- a/plugins/shopping_cart/controllers/shopping_cart_plugin_profile_controller.rb +++ b/plugins/shopping_cart/controllers/shopping_cart_plugin_profile_controller.rb @@ -2,7 +2,6 @@ include ShoppingCartPlugin::CartHelper class ShoppingCartPluginProfileController < ProfileController append_view_path File.join(File.dirname(__FILE__) + '/../views') - before_filter :login_required, :only => [] def add @@ -114,9 +113,9 @@ class ShoppingCartPluginProfileController < ProfileController render :text => { :ok => false, :error => { - :code => 1, - :message => _("Can't join items from different enterprises.") - } + :code => 1, + :message => _("Can't join items from different enterprises.") + } }.to_json return false end @@ -128,9 +127,9 @@ class ShoppingCartPluginProfileController < ProfileController render :text => { :ok => false, :error => { - :code => 2, - :message => _("There is no cart.") - } + :code => 2, + :message => _("There is no cart.") + } }.to_json return false end @@ -144,9 +143,9 @@ class ShoppingCartPluginProfileController < ProfileController render :text => { :ok => false, :error => { - :code => 3, - :message => _("This enterprise doesn't have this product.") - } + :code => 3, + :message => _("This enterprise doesn't have this product.") + } }.to_json return nil end @@ -158,9 +157,9 @@ class ShoppingCartPluginProfileController < ProfileController render :text => { :ok => false, :error => { - :code => 4, - :message => _("The cart doesn't have this product.") - } + :code => 4, + :message => _("The cart doesn't have this product.") + } }.to_json return false end @@ -172,9 +171,9 @@ class ShoppingCartPluginProfileController < ProfileController render :text => { :ok => false, :error => { - :code => 5, - :message => _("Invalid quantity.") - } + :code => 5, + :message => _("Invalid quantity.") + } }.to_json return false end diff --git a/plugins/shopping_cart/views/cart.html.erb b/plugins/shopping_cart/views/cart.html.erb index c203a5c..e9c84ec 100644 --- a/plugins/shopping_cart/views/cart.html.erb +++ b/plugins/shopping_cart/views/cart.html.erb @@ -1,3 +1,4 @@ +<% enterprise_identifier = !locals[:cart].nil? ? Enterprise.find(locals[:cart][:enterprise_id]).identifier : 'bli'%>