Hello Everybody
Please help me
To display the available sizes of the products when a customer hovers over the product image on the collection page in the Prestige theme
Link:- www.nainpreet.com
A user seeks help displaying available product sizes when hovering over product images on collection pages in the Shopify Prestige theme.
Solution Provided:
product-item.liquid in the snippets foldertheme.scss.liquid to hide sizes by default and show on hoverFollow-up Requests:
Status: The basic implementation was successfully provided and confirmed working, but the collection-specific targeting and overlay variant remain unresolved.
Hello Everybody
Please help me
To display the available sizes of the products when a customer hovers over the product image on the collection page in the Prestige theme
Link:- www.nainpreet.com
This is actually something I’ve implemented on a few sites before.
The exact code needed can vary a bit depending on the specific customizations and configuration of your Prestige theme.
The class names, file structure, and existing code blocks may differ.
That said, here are the steps to display available product sizes on hover for the collection page in the Prestige Shopify theme:
Open your Shopify admin and go to Online Store > Themes.
Find the Prestige theme you are currently using and click Actions > Edit Code.
Open the snippets folder and locate the file named product-item.liquid. Click it to open the file.
Look for the following code block:
{%- if show_vendor -%}
{{ product.vendor }}
{%- endif -%}
##
{{ product.title }}
{%- if show_price_on_hover == nil or show_price_on_hover -%}
{%- render 'product-item-price', product: product, show_vendor: false -%}
{%- endif -%}
<!-- code to display sizes will go here --> with the following code snippet:
{%- for variant in product.variants -%}
{%- if variant.available -%}
{{ variant.title }}
{%- endif -%}
{%- endfor -%}
This will loop through the product variants and display the size if that variant is available.
Next, open the assets folder and locate the theme.scss.liquid file. Click to open it.
Scroll to the very bottom of the file and paste the following CSS:
.ProductItem__Sizes {
display: none;
margin-top: 5px;
}
.ProductItem:hover .ProductItem__Sizes {
display: block;
}
.ProductItem__Size {
display: inline-block;
margin-right: 5px;
padding: 2px 5px;
background: #ddd;
font-size: 11px;
}
This CSS will hide the sizes by default and only show them on hover. It also styles the size labels.
Click Save in the top right to save all your changes.
The available sizes should now display under the product title when you hover over a product image on the collection pages.
Let me know if you have any other questions!
Hello @Xipirons
Thank you very much
I am really happy now before I was too stress
I pray to
God that you always be happy ![]()
Hello @Xipirons
Hope you are good I need your help please
I want to show the available product sizes on hover but only specific collection page
I want to show the hovering on this landing page only
https://nainpreet.com/collections/ready-to-ship
Could you help us to achieve this?
Hi, we would like to have availabale sizes as an overlay on images on collection page - could you do this for us?