I'm working on a site where I have several feeds that will update Commerce Product inventory. The issue is that I do NOT want feeds to create new products if a product isn't found. Currently my only options are "Do not update existing products" and "Update existing products." The issue is that both of these will create products. There is a patch for the feeds module that is still actively being talked-about. This patch adds another option to update existing entities only (doesn't create new ones). #1286298: Don't create new items, only update existing (see comment #7)

My first comment below will have the code necessary to handle this additional processor method.

Comments

agileadam’s picture

Here's the patch. It's very simple; only a few changes.

agileadam’s picture

Title: Support Feeds patch to allow » Support Feeds patch to allow update-only
pcambra’s picture

Status: Active » Postponed

I think more changes would be needed to fit #1286298: Don't create new items, only update existing, see #1835106: Make entity loading generic. but let's mark this postponed until something actually lands in feeds.

pcambra’s picture

Issue summary: View changes

Adds comment number reference.

flebas’s picture

Issue summary: View changes
maxplus’s picture

Also used patch from https://www.drupal.org/node/1286298 (#57) and worked perfect for me.
No new products are created anymore during import, only stock is updated like I wanted.

mchamps’s picture

Hi, Can this patch work with Feeds 8.x-3.x?
As it been ported? Thanks!

megachriz’s picture

@mchamps
For D8/D9 you could try the latest code from #3116987: Don't create new items, only update existing (D8).

mchamps’s picture

@MegaChriz
Done and that patch works great for D8. Thanks