Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

wrong super call #150

Open
wants to merge 5 commits into
base: 3-1-stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions app/controllers/spree/admin/products_controller_decorator.rb
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion app/mailers/spree/order_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions app/overrides/decorate_admin_configurations_index.rb
Original file line number Diff line number Diff line change
@@ -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 %>')
1 change: 1 addition & 0 deletions app/overrides/decorate_admin_products_form.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Deface::Override.new(
virtual_path: "spree/admin/products/_form",
name: "multi_domain_admin_product_form_meta",
:original => '2724f51d519589f73401abeae8f8e05d9dae99c4',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blset Just curious how can I generate this original SHA1 value, from which string?

insert_bottom: "[data-hook='admin_product_form_meta']",
partial: "spree/admin/products/stores",
disabled: false)