I want to change the sort order of a collection for a logged in customer. I understand there is no relation between collection and customer .
I was wondering if i can change the collection end point from shopify's server to mine(I have seen that the webpage is rendered on the server side). This way I can send request for a collection with a cookie and customize the sort order for the customer.
You can do this in liquid.
Add some code on your front end page to get the customer that's logged in. If it equals a certain name or code,
Then you could change the collection order on the front end.
Thanks for the reply olivert, I looked up liquid and theme code.
However I want the collection order to be a request sent to my app server and then rendered on the site side. I see that a hit to exampleshop.shopify.com/collections/examplecollection is a webpage rendered server side. I want to know if this is possible. I don't know if shopify caches the requests and this will not work.
So please help me understand if this is possible
This method requires all load on product display requests to be handled by my apps' server. Is shopify ok with this since I have to guarantee that my server won't go down and have a reasonable response time.
I could only think of this method because I don't see a relation between a collection and customer. So my custom sort order should come from outside of shopify. I need a custom sort order for every customer.
Where is Step 1 going to happen, client side or server side.
I may be entirely wrong on this matter, you have my gratitude for your help.