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

product options / taxons not updated if more than 1 #148

Open
blset opened this issue Jun 7, 2016 · 0 comments
Open

product options / taxons not updated if more than 1 #148

blset opened this issue Jun 7, 2016 · 0 comments

Comments

@blset
Copy link

blset commented Jun 7, 2016

Hello

In the backoffice, with lastest spree-0b99e882892b 3.1
and spree-multi-domain-5017b56aee41

a product is not updated correctly from the back office if more than one entry in the taxons or options field

after some research, it looks like Spree::Admin::ProductsController#update is never visited,
because of the decorator products_controller_decorator.rb


  def update
    store_ids = params[:product][:store_ids]
    if store_ids.present?
      params[:product][:store_ids] = store_ids.split(',')
    end
    super
  end

in fact the super calls Spree::Admin::ResourcesController (because of super) and not
Spree::Admin::ProductsController#update

for that reason the necessary code below is never visited

if params[:product][:taxon_ids].present?
          params[:product][:taxon_ids] = params[:product][:taxon_ids].split(',')
        end
        if params[:product][:option_type_ids].present?
          params[:product][:option_type_ids] = params[:product][:option_type_ids].split(',')
        end

thanks

arnie05 pushed a commit to arnie05/spree-multi-domain that referenced this issue Sep 20, 2016
Allow to affect multiple taxons in product when using spree-multi-domain : see spree-contrib#148
arnie05 pushed a commit to arnie05/spree-multi-domain that referenced this issue Dec 30, 2016
Allow to affect multiple taxons in product when using
spree-multi-domain : see spree-contrib#148
nnande pushed a commit to nnande/spree-multi-domain that referenced this issue Apr 12, 2017
Allow to affect multiple taxons in product when using spree-multi-domain : see spree-contrib#148
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant