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

Variant Sync only imports 50 variants #115

Closed
kragit opened this issue May 26, 2024 · 3 comments
Closed

Variant Sync only imports 50 variants #115

kragit opened this issue May 26, 2024 · 3 comments
Assignees
Labels
bug Something isn't working Plugins → Shopify For Linear sync Plugins For Linear sync

Comments

@kragit
Copy link

kragit commented May 26, 2024

Description

It appears only 50 variants are being synced to products. This aligns with the default Shopify API response without a limit parameter.

/src/services/Api.php - Line 153 function getVariantsByProductId appears to use the get function, which does not modify the limit returned - API responses would return the default limit of 50.

  • On the other hand, /src/services/Api.php - Line 179 function getAll appears to have a params variable that is set to pull the max limit of 250 and then paginate, but this appears to be only used for Products, not Variants.

Steps to reproduce

  1. Create a Shopify product with more than 50 variants
  2. Observe the Variant list inside the Control Panel and the array returned with getVariants() only returns 50 values.

Additional info

  • Craft version: 5.1.7
  • PHP version: 8.3.7
  • Database driver & version: PostgreSQL 16.3
  • Plugins & versions: Shopify 5.1.1, Feed Me 6.0.1
@kragit kragit added bug Something isn't working Plugins For Linear sync Plugins → Shopify For Linear sync labels May 26, 2024
Copy link

linear bot commented May 26, 2024

@nfourtythree nfourtythree self-assigned this Jun 4, 2024
@nfourtythree
Copy link
Contributor

Hi @kragit

Thank you for raising this issue, we have been able to replicate it and therefore will look into getting a fix in place.

Thanks!

nfourtythree added a commit that referenced this issue Jun 18, 2024
@nfourtythree
Copy link
Contributor

Hi

Version 5.2.0 of the plugin has now been released with this fix/update included. If you have issues with rate limiting after this update we have added a --throttle option to the command line sync command which will make this initial sync slower but will ensure all data is sync'd into Craft.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Plugins → Shopify For Linear sync Plugins For Linear sync
Projects
None yet
Development

No branches or pull requests

2 participants