Download & Extend

Products doesn't update on import unless I skip hash check

Project:Commerce Feeds
Version:7.x-1.3
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)

Issue Summary

On a vanilla install, I created this importer:

$feeds_importer = new stdClass();
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'products_regular_update';
$feeds_importer->config = array(
  'name' => 'Products regular update',
  'description' => '',
  'fetcher' => array(
    'plugin_key' => 'FeedsFileFetcher',
    'config' => array(
      'allowed_extensions' => 'txt csv tsv xml opml',
      'direct' => FALSE,
    ),
  ),
  'parser' => array(
    'plugin_key' => 'FeedsCSVParser',
    'config' => array(
      'delimiter' => ',',
      'no_headers' => 0,
    ),
  ),
  'processor' => array(
    'plugin_key' => 'FeedsCommerceProductProcessor',
    'config' => array(
      'product_type' => 'product',
      'author' => '1',
      'tax_rate' => TRUE,
      'mappings' => array(
        0 => array(
          'source' => 'SKU',
          'target' => 'sku',
          'unique' => 1,
        ),
        1 => array(
          'source' => 'Quantity',
          'target' => 'commerce_stock',
          'unique' => FALSE,
        ),
        2 => array(
          'source' => 'Regular Price',
          'target' => 'commerce_price:amount',
          'unique' => FALSE,
        ),
        3 => array(
          'source' => 'Sale Price',
          'target' => 'field_sale_price:amount',
          'unique' => FALSE,
        ),
        4 => array(
          'source' => 'Non-Set Price',
          'target' => 'field_non_set_price:amount',
          'unique' => FALSE,
        ),
        5 => array(
          'source' => 'Product ETA Note',
          'target' => 'field_backorder_message',
          'unique' => FALSE,
        ),
      ),
      'update_existing' => '2',
      'input_format' => 'plain_text',
      'skip_hash_check' => 0,
    ),
  ),
  'content_type' => '',
  'update' => 0,
  'import_period' => '0',
  'expire_period' => 3600,
  'import_on_create' => 1,
  'process_in_background' => 0,
);

The products simply doesn't update. It only gives the message "There are no new commerce products."
If I tick "Skip hash check", it works.

Comments

#1

Category:bug report» support request
Priority:major» normal

Please provide test data to reproduce the problem.

#2

Do you mean a CSV file?

SKU,Quantity,Regular Price, Sale Price, Non-Set Price, Product ETA Note
ABB1PB,4,1300,,,Currently on backorder. Estimated arrival in up to 5 weeks.
ADJCD,10,1900,,,Currently on backorder. Estimated arrival in up to 5 weeks.
ADOPC,1,700,,,Not actively stocked. Expect delivery in up to 5 weeks.
AECDNG,0,1400,,,Not actively stocked. Expect delivery in up to 5 weeks.

My ABB1PB has stock 2. It should update to 4 but it didn't. Unless I 'skip hash check'.

#3

Status:active» postponed (maintainer needs more info)

Yeah, a "before" csv and a "after" would be ideal

#4

I can't attach CSVs so here it is:

Before:

SKU,Quantity,Regular Price, Sale Price, Non-Set Price, Product ETA Note
ABB1PB,2,1300,,,Currently on backorder. Estimated arrival in up to 5 weeks.
ADJCD,10,1900,,,Currently on backorder. Estimated arrival in up to 5 weeks.
ADOPC,1,700,,,Not actively stocked. Expect delivery in up to 5 weeks.
AECDNG,0,1400,,,Not actively stocked. Expect delivery in up to 5 weeks.

After:

SKU,Quantity,Regular Price, Sale Price, Non-Set Price, Product ETA Note
ABB1PB,4,1300,,,Currently on backorder. Estimated arrival in up to 5 weeks.
ADJCD,10,1900,,,Currently on backorder. Estimated arrival in up to 5 weeks.
ADOPC,1,700,,,Not actively stocked. Expect delivery in up to 5 weeks.
AECDNG,0,1400,,,Not actively stocked. Expect delivery in up to 5 weeks.

#5

Status:postponed (maintainer needs more info)» active

#6

I have the same issue here. Eve if i enable the "Skip hash check" option. The csv i want to import is pretty simple.

with sku set as unique and a stock

#7

Status:active» postponed (maintainer needs more info)

Just did a quick test with this, using your files with just SKU, quantity as integer field and price and works just ok, initial import and subsequent updates.

nobody click here