diff --git a/app/controllers/spree/admin/products_controller_decorator.rb b/app/controllers/spree/admin/products_controller_decorator.rb index b5903c5d..0f282179 100644 --- a/app/controllers/spree/admin/products_controller_decorator.rb +++ b/app/controllers/spree/admin/products_controller_decorator.rb @@ -1,17 +1,11 @@ Spree::Admin::ProductsController.class_eval do - update.before :set_stores - +alias :spree_update :update def update store_ids = params[:product][:store_ids] if store_ids.present? params[:product][:store_ids] = store_ids.split(',') end - super + spree_update end - private - - def set_stores - @product.store_ids = nil unless params[:product].key? :store_ids - end end diff --git a/app/mailers/spree/order_mailer.rb b/app/mailers/spree/order_mailer.rb index 82514e93..5c215e1b 100644 --- a/app/mailers/spree/order_mailer.rb +++ b/app/mailers/spree/order_mailer.rb @@ -3,7 +3,9 @@ class OrderMailer < BaseMailer def confirm_email(order, resend = false) @order = order.respond_to?(:id) ? order : Spree::Order.find(order) subject = (resend ? "[#{Spree.t(:resend).upcase}] " : '') - subject += "#{@order.store.name} #{Spree.t('order_mailer.confirm_email.subject')} ##{@order.number}" + storename = @order.store.present? ? @order.store.name : Spree::Store.default.name + subject += "#{storename} #{Spree.t('order_mailer.confirm_email.subject')} ##{@order.number}" + mail_params = {to: @order.email, subject: subject} if @order.store.present? && @order.store.mail_from_address.present? mail_params[:from] = @order.store.mail_from_address diff --git a/app/overrides/decorate_admin_configurations_index.rb b/app/overrides/decorate_admin_configurations_index.rb index 3a58ccdf..b14cff0c 100644 --- a/app/overrides/decorate_admin_configurations_index.rb +++ b/app/overrides/decorate_admin_configurations_index.rb @@ -1,4 +1,5 @@ Deface::Override.new(virtual_path: 'spree/admin/shared/sub_menu/_configuration', name: 'add_stores_to_admin_menu', + :original => '41c9125ad4022e7dac858458620c2a141e4f49d0', insert_bottom: '[data-hook="admin_configurations_sidebar_menu"]', text: '<%= configurations_sidebar_menu_item Spree.t(:stores_admin), spree.admin_stores_url %>') diff --git a/app/overrides/decorate_admin_products_form.rb b/app/overrides/decorate_admin_products_form.rb index 2e605753..5eaa4a64 100644 --- a/app/overrides/decorate_admin_products_form.rb +++ b/app/overrides/decorate_admin_products_form.rb @@ -1,6 +1,7 @@ Deface::Override.new( virtual_path: "spree/admin/products/_form", name: "multi_domain_admin_product_form_meta", + :original => '2724f51d519589f73401abeae8f8e05d9dae99c4', insert_bottom: "[data-hook='admin_product_form_meta']", partial: "spree/admin/products/stores", disabled: false)