Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
I'm using Prestige theme,
I want to push sold out product at the end of collection page.
My store URL is www.armansonline.com
Your help is really appreciated.
Thank You!
Hi @Sabih_Nawaz
You need to modify the code in the collection.liquid section like this. Codes may vary depending on the theme, but the main logic is like this. If you know how to code, customize it according to your needs.
<div class="ProductListWrapper">
<div class="ProductList ProductList--grid {% if paginate.pages > 1 %}ProductList--removeMargin{% endif %} Grid" data-mobile-count="{{ mobile_items_per_row }}" data-desktop-count="{{ desktop_items_per_row }}">
{%- for product in collection.products -%}
{%- if product.available == true -%}
<div class="Grid__Cell 1/{{ mobile_items_per_row }}--phone 1/{{ tablet_items_per_row }}--tablet-and-up 1/{{ desktop_items_per_row }}--{% if section.settings.filter_position == 'drawer' %}lap-and-up{% else %}desk{% endif %}">
{%- render 'product-item', product: product, show_product_info: true, show_vendor: section.settings.show_vendor, show_color_swatch: section.settings.show_color_swatch, show_labels: true -%}
</div>
{% endif %}
{%- endfor -%}
<!-- For sold out products -->
{%- for product in collection.products -%}
{%- if product.available == false -%}
<div class="Grid__Cell 1/{{ mobile_items_per_row }}--phone 1/{{ tablet_items_per_row }}--tablet-and-up 1/{{ desktop_items_per_row }}--{% if section.settings.filter_position == 'drawer' %}lap-and-up{% else %}desk{% endif %}">
{%- render 'product-item', product: product, show_product_info: true, show_vendor: section.settings.show_vendor, show_color_swatch: section.settings.show_color_swatch, show_labels: true -%}
</div>
{% endif %}
{%- endfor -%}
<!-- End sold out products -->
</div>
</div>
I'm Using Prestige theme, this code is not working on my collection.liquid
I don't know how to customize the code.
I can't make edits because I can't see the theme codes. If have any questions let me know so I can clarify, and if not, and you'd like to work together please feel free to message me directly.
Hey this code works , but I have a pagination so in that case it is sorting first page as per condition and I want all available products first and sold out at last page only. Any idea how is it possible for pagination? @MastersHub
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025