Sha256: e8da8c0553f562b545699d6bb51fbc5879fe2a66f2ff11434d43a27f75f9995b

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 Bytes

Contents

module Gemgento
  module Magento
    class PriceRulesController < Gemgento::Magento::BaseController

      def update
        if data = params[:data]
          API::SOAP::CatalogRule::Rule.sync_magento_to_local(data, data[:website_ids], data[:customer_group_ids])
        end
        render nothing: true
      end

      def destroy
        if price_rule = PriceRule.find_by(magento_id: params[:id])
          price_rule.destroy
        end

        render nothing: true
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gemgento-2.8.0 app/controllers/gemgento/magento/price_rules_controller.rb