craftcms / shopify

Synchronize and extend product data from your Shopify storefront.
MIT License
45 stars 25 forks source link

Product metafields not syncing #69

Closed michaelij closed 1 year ago

michaelij commented 1 year ago

Description

Project metafields don't appear to be syncing, with the value always being an empty array in the database.

Steps to reproduce

  1. Update product metafields in Shopify
  2. Utilities > Shopify Sync > Sync all products
  3. Observe meta fields are empty

Additional info

lukeholder commented 1 year ago

Thanks for reporting, I will look into this soon.

curtishenson commented 1 year ago

Ran into this so I tried to do some digging. Hopefully it will help you troubleshoot it:

After that I needed to add public array $metaFields = []; to the Product element to actually access them.

michaelij commented 1 year ago

@lukeholder Hey just a friendly follow-up to see if we've had any movement on this one.

lukeholder commented 1 year ago

Thanks for following up.

This has been fixed for the next release.

To get the fix early, change your craftcms/shopify requirement in composer.json to:

"require": {
  "craftcms/shopify": "dev-develop#411c7cbe343d7c5e16e937615c22c522c24989c5 as 3.1.1",
  "...": "..."
}

Then run composer update.

Thanks

lukeholder commented 11 months ago

4.0.0 is now out. Make sure to read the changelog item to learn what you need to do to upgrade. The readme also contains instructions.