           console.warn "Ignoring variant as no match by SKU found for: ", variant
     _.map productsToUpdate
 
-  getCustomAttributeValue: (variant) ->
+  getCustomAttributeValue: (variant, name) ->
     variant.attributes or= []
     attrib = _.find variant.attributes, (attribute) =>
-      attribute.name is @customAttributeNameToMatch
+      attribute.name is (@customAttributeNameToMatch unless name)
     attrib?.value
 
   match: (entry) ->

CONS = require './constants'
GLOBALS = require './globals'
Validator = require './validator'

# TODO:
# - better organize subcommands / classes / helpers

      # TODO: resolve with a summary of the import
      console.log "Finished processing #{_.size result} product(s)"
      Promise.resolve result

  changeState: (publish = true, remove = false, filterFunction) ->
    @publishProducts = true
