Last few collection automated with products that have either 1 or 2 left in stock for all variants

Tourist
28 0 1

Hi there,

 

I'm looking to create an automated custom collection template called "Last Few" that will ideally pull in products that have more than 0 inventory and less than or equal to 2 inventory for all variants. Is this possible? I know the liquid syntax that is used to check inventory (variant.inventory_quantity) only checks inventory for each variant of a product instead of the total inventory that a product has. 

 

Also wondering if there is a way to have pagination work correctly for automated custom templated collections? For future reference, I'd like to be able to have more than 48 products in a custom collection. 

 

Thanks!

0 Likes
Shopify Partner
113 7 21

Arigato can do this for you, along with a million other things.

 

I put together a quick workflow that does this for you. https://www.apps.bonify.io/arigato-automation-shopify/workflows/maintain-collection-items-are-nearly...

0 Likes

Hi,

 

You can set the inventory for the Collection as shown in attached screenshot.

Please let me know if it works for you.

 

inventory stock.png

Thanks & Regards
Perennial Solution

Would like to add new functionality or customize an existing one, please hire us.
If helpful then please Like and Accept Solution .
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
0 Likes
Tourist
28 0 1

This is currently how I have the collection set up and it's not working the way I want it to. Instead of checking the total inventory, it's checking all the variants of a product and pulling in the products with variants that have 1-2 items left in stock and ignoring the rest. So for example, some products being pulled in have 2 left in stock for size M, and 7 left in size L and it's still being pulled in.

0 Likes

Okay, so as per my understanding, you want only those products that have a total of 0-2 inventory for all the variants. If any product having more than 2 inventory for any of the variants then that product should not be pulled off. Please correct me if I'm wrong.

If this is the case, then that would be code level change and you need to provide me access to your store in order to make this fix.

 

Looking forward to your response.

Thanks & Regards
Perennial Solution

Would like to add new functionality or customize an existing one, please hire us.
If helpful then please Like and Accept Solution .
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
0 Likes
Tourist
28 0 1

Yes, this is correct. I am a developer looking to make changes on a custom template for this collection myself. Just wanted to see if anyone has achieved this before and could maybe give me some boilerplate code to use/modify.

1 Like

Hi,

 

Since this is a code level change and it requires both time and efforts so I need to have access to your store and it incurs some additional cost as well.

Please let me know your thoughts.

 

 

Thanks & Regards
Perennial Solution

Would like to add new functionality or customize an existing one, please hire us.
If helpful then please Like and Accept Solution .
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
0 Likes
Shopify Partner
113 7 21

For what it's worth, Arigato can handle those types of very specific requirements with a couple of clicks. It's not possible to add/remove/modify collections in liquid templates. You'd need to make API calls to make those changes. As far as I'm aware anyway. 

0 Likes
Highlighted
New Member
1 0 0

Did you ever figure this out?  I came here searching for the same solution!

0 Likes