craftcms / feed-me

Craft CMS plugin for importing entry data from XML, RSS or ATOM feeds—routine task or on-demand.
Other
287 stars 140 forks source link

Default price field can't updated by import #724

Closed maximilian-schwarz closed 1 year ago

maximilian-schwarz commented 4 years ago

Description

I have much products and want to update the prices. Now i have a .csv file with two columns "internal_id, price". If the import is running there is the notice. Element skipped because no content changed.

But the content changed. In the CMS i have the price 6,30€ and in the .csv i have the price 6,10€. If i add a custom field to the csv file and do the mapping for this field. The field is updated. But not the price. The price never updated.

If you use the default SKU field instead of "internal_id" everything is working.

Steps to reproduce

  1. Create a new Feed.
  2. Select file type CSV
  3. Type select Commerce product
  4. Select "Update existing only".
  5. Map only the fields internal_id + price
  6. Select as unique identifier the custom field for example ("internal_id") and start the import.

Additional info

reganlawton commented 3 years ago

This bug happens on import too. I had to manually modify the database schema and it then lets me import the products with 0 as the price then I have to re-run the feed sync to then have the product pricing take effect.

maximilian-schwarz commented 3 years ago

Any news here? The issue is still there

skramstad commented 3 years ago

Same issue for me.

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'price' cannot be null The SQL being executed was: INSERT INTO commerce_variants (id, productId, sku, price, width, height, length, weight, minQty, maxQty, stock, isDefault, sortOrder, hasUnlimitedStock, dateUpdated, dateCreated, uid)

Error Info: Array ( [0] => 23000 [1] => 1048 [2] => Column 'price' cannot be null )

Caused by: PDOException SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'price' cannot be null

angrybrad commented 3 years ago

@skramstad @reganlawton issue #779 is unrelated, but I've just pushed a fix for it for the next release.

@Maximilian-Schwarz I've been unsuccessful in trying to reproduce this. Can you seed your composer.json, a database dump and a sample feed over to support@craftcms.com referencing this issue so we can try to reproduce?

pdaleramirez commented 1 year ago

I am unable to reproduce this issue on feed-me latest v4. We’ll re-open again if a similar problem is received.