Skip to content

Commit

Permalink
add reverse to move grouping as bug work around (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
tekhaus committed May 30, 2024
1 parent add4c78 commit 980840c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
7 changes: 6 additions & 1 deletion docs/auto-sort-collections-by-inventory-levels/script.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,12 @@
{% endif %}
{% endfor %}

{% assign move_groups = moves | in_groups_of: 250, fill_with: false %}
{% comment %}
-- using reverse filter below due to a bug in the collectionReorderProducts mutation
-- this filter will NOT affect the sort order determined above
{% endcomment %}

{% assign move_groups = moves | reverse | in_groups_of: 250, fill_with: false %}

{% for move_group in move_groups %}
{% action "shopify" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,12 @@
collection: collection.title
%}

{% assign moves_in_groups = moves | in_groups_of: 250, fill_with: false %}
{% comment %}
-- using reverse filter below due to a bug in the collectionReorderProducts mutation
-- this filter will NOT affect the sort order determined above
{% endcomment %}

{% assign moves_in_groups = moves | reverse | in_groups_of: 250, fill_with: false %}

{% for move_group in moves_in_groups %}
{% action "shopify" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,12 @@
{% endif %}
{% endfor %}

{% assign move_groups = moves | in_groups_of: 250, fill_with: false %}
{% comment %}
-- using reverse filter below due to a bug in the collectionReorderProducts mutation
-- this filter will NOT affect the sort order determined above
{% endcomment %}

{% assign move_groups = moves | reverse | in_groups_of: 250, fill_with: false %}

{% for move_group in move_groups %}
{% action "shopify" %}
Expand Down
2 changes: 1 addition & 1 deletion tasks/auto-sort-collections-by-inventory-levels.json

Large diffs are not rendered by default.

Loading

0 comments on commit 980840c

Please sign in to comment.