Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: COLLECTION SORT BY NEW

Solved

COLLECTION SORT BY NEW

B3th3sd4
Shopify Partner
7 0 0

I have imported the products from another platform, and all have the created_at, with the date of the import. What I want to achieve now, is to sort collection products by newest. But that seems imposible. Also tried Admin REST API, to change the created_at, but as it is read_only it will not change. Is there any way, if I set the collection to manual sorting, by using the REST API, to set the order of the products in the collection?

Accepted Solution (1)
jazz-jay
Shopify Partner
96 14 17

This is an accepted solution.

Hi,

 

Solution through api can be like this:

  1. Set the collection to manual sorting
  2. You need use the collect resource, get existing collects of the above collection, delete them
  3. And re-add them in the order you want to

 

 

banned

View solution in original post

Replies 3 (3)

jazz-jay
Shopify Partner
96 14 17

Hi,

 

Yes setting up the collection to manual sorting and re-ordering the products will work.

banned
B3th3sd4
Shopify Partner
7 0 0

Hi,

 

Is there any way, that I can achieve the sorting through the API? Like setting the array with product id's that I want to be ordered? 

jazz-jay
Shopify Partner
96 14 17

This is an accepted solution.

Hi,

 

Solution through api can be like this:

  1. Set the collection to manual sorting
  2. You need use the collect resource, get existing collects of the above collection, delete them
  3. And re-add them in the order you want to

 

 

banned