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

Option to set synced products/collections as draft #94

Open
3 tasks
leo-cheron opened this issue Jul 9, 2020 · 4 comments
Open
3 tasks

Option to set synced products/collections as draft #94

leo-cheron opened this issue Jul 9, 2020 · 4 comments

Comments

@leo-cheron
Copy link

leo-cheron commented Jul 9, 2020

When products are synced from Shopify, they are currently automatically marked as published in Sanity.

This behaviour can be troublesome if we decide to extend shopifyProduct / shopifyCollection with required field (a slug, for instance) as it could prevent the front-end to work as expected.

Would it be possible to add a saneShopifyConfig option to create drafts instead of published documents on Shopify sync document creation?

Todo:

  • Add plugin configuration with autoPublish boolean in sanity plugin config
  • Add the same config to the hooks server creation
  • Add a checkbox to sync UI to enable/disable auto publishing
@good-idea
Copy link
Owner

Hmm, this is a good thought. Were you thinking that this would happen only when new documents are created, or for updates / re-syncs as well?

@leo-cheron
Copy link
Author

Hmm, this is a good thought. Were you thinking that this would happen only when new documents are created, or for updates / re-syncs as well?

I think it should only be stated as draft on creation because it needs to be manually populated before the first publication. Then, if it has already been published once, it would make sense to automatically republish it on Shopify sync (let's avoid republishing manually numerous products !).

@good-idea
Copy link
Owner

Got it, that sounds good. I added this to the 1.1 milestone, but will aim to get it into 1.0 since I don't think it will be that complicated.

@leo-cheron
Copy link
Author

Got it, that sounds good. I added this to the 1.1 milestone, but will aim to get it into 1.0 since I don't think it will be that complicated.

Thank you sir, this lib begins to be quite mature and I'm planning to use it for production on my next project. Keep up the good work, Sanity really needs a solid Shopify sync plugin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants