Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the ability to sync variant meta fields #103

Merged
merged 10 commits into from
Apr 3, 2024

Conversation

nfourtythree
Copy link
Contributor

Description

This PR introduces the ability to sync variant meta fields as well as settings around controlling what meta fields are sync'd into Craft.

The two new settings are:

  • syncProductMetafields this is true by default
  • syncVariantMetafields, this is false by default as it adds an extra API call for each variant in a product.

You can override these config settings in your project's shopify.php config file.

Related issues

#99

@AugustMiller
Copy link
Contributor

Made a couple of tweaks that collects all the Settings into a dedicated section! Otherwise, looks great! 💞


> [!NOTE]
> Setting `apiKey`, `apiSecretKey`, `accessToken`, and `hostName` via `shopify.php` will override Project Config values set via the control panel during [app setup](#create-a-shopify-app). You can still reference environment values from the config file with `craft\helpers\App::env()`.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collected syncProductMetafields and syncVariantMetafields into this section, and added keys for the other settings.

@@ -117,16 +117,16 @@ Products from your Shopify store are represented in Craft as product [elements](

### Synchronization

Once the plugin has been configured, you can perform an initial synchronization of all products via the **Shopify Sync** utility.
Once the plugin has been configured, you can perform an initial synchronization of all products via the command line.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smart inversion here. CLI is going to be more reliable for 99% of users!

@nfourtythree nfourtythree merged commit 384d727 into v4 Apr 3, 2024
5 checks passed
@nfourtythree nfourtythree deleted the feature/variant-metafield-synchronisation branch April 3, 2024 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants