How can I fix pagination for over 1000 products in my inventory?

How can I fix pagination for over 1000 products in my inventory?

onlinemantra
New Member
9 0 0

Hi,

I am using shopify and I have more than 1000 products are available in my stock.

I am using a purchase theme, but I have done some coding on product detail page.

I am shwoing the related product as variant on detail page. I have used the 'Vendor' Tab inside oganization (admin end) to identify the related products.

When I have used this, it is working fine within 1000 products, but after that it don't show any variant on front end even after increasing the limit.

If I can show only in stock products option then also it can work for me as my collection is big but all are not in stock.

To get those data, I am using this concept:

{%- paginate collections.all.products by 1000 -%}
{% for products in collections.all.products %}

//logic goes inside the loop

{% endfor %}
{% endpaginate %}


Please can you give me a solution to get rid of this problem. So that it should work for all the products.

https://onlinemantra.in/collections/diplomat/products/diplomat-magnum-indigo-blue-fountain-pen (in this as it is in the first 1000 products the color varient is showing)

https://onlinemantra.in/collections/taccia/products/taccia-ukiyo-e-ink-bottle-ruri-40ml-tfpi-wd42-10 (this product goes above 1000 and the varient is not showing)

Regards

Anish Todarwal

Replies 3 (3)

Jason
Shopify Partner
11207 226 2319

You can not increase it above 1000.

In your links I don't see anything that makes it clear where you're trying to do a large loop like that. Are you able to give more details on where it is, and the code you've used? You may need to change your approach.

Looping over 1000 products with Liquid isn't efficient in any case so would suggest reconsidering your approach. There's really no need to load 1000 products on one page but open to hear why you need it.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
onlinemantra
New Member
9 0 0

Hi Jason 

I am not a developer actually. My developer used the paginate function to use tags for showing color options in the product page. A specific tag is picked on the product page and all products with tag tag show as a color varation.

This is happening for the first 1000 products only in alphabetical order. My catalogue size is more than 1000 products. But I am ok to apply this code for certain collections only. Currently the code used is

{%- paginate collections.all.products by 1000 -%}
{% for products in collections.all.products %}

//logic goes inside the loop

{% endfor %}
{% endpaginate %}

 

Can we change all products to a specific collection

 

With the variationWith the variation

The above photo as it is in the first 1000 products the variation shows

 

Without the variationWithout the variation

In the above photo the variation doesn't show as it goes above the first 1000 products.

Please help me how I can show color variations which are basically completely different product URL

negar-
Visitor
1 0 0

Hi,
It is exactly my problem now, how did you solved it? 
Thanks in advance for your help.
@onlinemantra 

negar-_0-1616771312003.png