Class: Gemgento::ProductAttributeOption

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/gemgento/product_attribute_option.rb

Overview

Author:

  • Gemgento LLC

Instance Method Summary collapse

Instance Method Details

#sync_local_to_magentoVoid

Push local attribute option changes to magento.

Returns:

  • (Void)


27
28
29
30
31
32
33
34
35
36
37
# File 'app/models/gemgento/product_attribute_option.rb', line 27

def sync_local_to_magento
  response = API::SOAP::Catalog::ProductAttribute.add_option(self, self.product_attribute)

  if response.success?
    self.sync_needed = false
    return true
  else
    errors.add(:base, response.body[:faultstring])
   return false
  end
end