You are here

protected function FeedsCommerceProductProcessor::entityLoad in Commerce Feeds 7

Loads an existing product.

File

plugins/FeedsCommerceProductProcessor.inc, line 43
Class definition of FeedsCommerceProductProcessor.

Class

FeedsCommerceProductProcessor
Creates products from feed items.

Code

protected function entityLoad(FeedsSource $source, $product_id) {
  $product = parent::entityLoad($source, $product_id);
  if ($this->config['update_existing'] == FEEDS_UPDATE_EXISTING) {
    $product->log = 'Updated by FeedsCommerceProductProcessor';
  }
  else {
    $product->log = 'Replaced by FeedsCommerceProductProcessor';
  }
  return $product;
}