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

Can't use parseTwig to generate SKU when importing Commerce Product #1035

Open paulgoodfield opened 3 years ago

paulgoodfield commented 3 years ago

Description

When setting parseTwig => true in config/feed-me.php if you try to use any twig as the default value for the SKU field when importing a Commerce Product the twig doesn't get parsed but the SKU field will try to use the literal un-parsed text for the value.

Steps to reproduce

  1. Set parseTwig => true in config/feed-me.php
  2. Create a feed to import a new Commerce Product
  3. On field mapping step set SKU to Use default value and set default value field as {slug}
  4. Upon creation the new product element has the SKU "{slug}" rather than a string that matches the actual slug of the element

Additional info

Abandoned Cart for Craft Commerce 1.6.3 AsyncQueue 2.3.0 Colour Swatches 1.4.2 Cookies 1.1.15 CP Field Inspect 1.2.5 Craft Commerce 3.4.2 Environment Label 3.2.0 Freeform 3.11.10 Preparse Field 1.2.5 Redactor 2.8.8 Retour 3.1.61 Sage Pay for Craft Commerce 3.0.0 Section + Product Type 1.0.5 SEOmatic 3.4.6 Single Cat 1.2.1 Sprig 1.8.1 Super Table 2.6.8 Tags 1.0.7

Gs-Joel commented 1 year ago

I'm having the same problem.

We have a client that is wanting to migrate from Shopify, but the CSV output by Shopify doesn't match the data structure expected in craft.

For some products they have up to 64 Variants so being able to dynamically generate the Variant Sku with parseTwig would be a huge time save.

Any chance we could get some attention for this bug?

Additional Info