Skip to content

v0.5.0 — Category-based sync and pagination fix

Choose a tag to compare

@radialmonster radialmonster released this 07 May 19:16
· 21 commits to main since this release

What's changed

Bug fix: pagination was broken

The RS API ignores the per_page parameter and returns a fixed ~20 items per page. The previous loop condition (count >= 100) was always false, meaning only the first page (~20 products) was ever fetched on each cron run. All pages are now correctly iterated.

Category-based cron sync

The scheduled sync now iterates product categories first (GET /products/categories), then fetches products per category using the category_id filter. Each query is bounded to one category's worth of products, so large catalogs no longer risk hitting the page cap. Falls back to a full paginated scan if categories cannot be fetched.

Other

  • MAX_PAGES raised from 200 to 2000 — now a true safety net
  • Added fetch_all_categories() to the API client
  • Fixed AJAX manual sync infinite loop at page limit