Shopify themes, liquid, logos, and UX
Hi, would really appreciate some help with this – been trying to follow some threads on this topic but to no avail.
I would like to have the second image of each product revealed on hover. Am using Debut theme.
Thanks very much!
My site is www.curiouslah.com
Solved! Go to the solution
This is an accepted solution.
Thanks for update code
also, please add the below code.
1. Go to Online Store->Theme->Edit code
2. Asset->/theme.scss.liquid->paste below code at the bottom of the file.
.grid-view-item__title {
margin-top: 20px;
}
.grid-view-item__vendor, .price__vendor {
display: none;
}
Thanks for your responose
hi @KetanKumar
My debudt theme is 17.7 how come i cant find any css.liquid file?
I also want to try this hover effect.
Effy.
it can be done some custom code
Hi,
Actually what I was look for and came across this article is to stop the behavior in the shopping cart page, when a user 1 product with the quantity button showing 1, if he will change it to zero it will automatically delete the item from the cart, no warrning.
Any idea how this case be changed?
Thanks!
if possible to share video further issue
Hey Ketan, I somehow managed to make it work with the previous mentioned steps from this post however I have one little problem. My images are literally doubled.
Can you give it a look and tell me how can I remove non-rotatable pictures of my products?
Here's the photo to better understand what I am asking for.
https://hustlebabe-shop.myshopify.com/ - password:009900
this only singale image
The upper row that I've marked, I want to remove it and have only rotatable product images to stay.
yes, please add this code
1. Go to Online Store->Theme->Edit code
2. Asset->/theme.css ->paste below code at the bottom of the file.
@media screen and (min-width: 767px) {
.has-secondary.grid-view-item__link:hover img.secondary {display: none;}
.has-secondary.grid-view-item__link:hover img.grid-view-item__image {display: block;}
}
This didn't help at all. I assume you didn't understand what I'm trying to achieve. There are duplicated pictures at the moment, right? One is static and the other is rotatable (hover over display second image), right? I want to remove all static product images and have ONLY rotatable ones displayed.
yes but what about a single image? at that time show only one
None of the products are single image, they are just displayed like that on site therefore I want to remove them and leave only double images.
https://hustlebabe-shop.myshopify.com/collections/woman - 009900
Go to this link. The images I have crossed, I want to remove because they DON'T rotate. The others that rotate, I want to keep them. Can I achieve that somehow?
I will create separate post and try to explain as best as I can what I am looking for. Thank you once again for your willingness to help !
can you try this code
1. Go to Online Store->Theme->Edit code
2. Asset->/theme.css ->paste below code at the bottom of the file.
#shopify-section-collection-template .grid-view-item.product-card {
display: none;
}
Well done and big thank you! Solved my problem.
One more thing, how do I center the next now? I will attach the photo below so you can see what I a referring to.
Also, referring to the issue you already helped me fix, how do I do the same for the photos on the Home Page, it's a featured collection and I want only rotating photos to show. Thanks in advance man !
oh sorry but i can't see your store now password protect and passwords page i can't see button
Oh sorry, I got it back for you 🙂 Check it out
Can I expect any answer for this issue? Hopefully yes, I thank you in advance.
Also, new password for the site is messaged to you, check it out.
yes i have checked its work
Hi Ketan,
Tried adding this code but the hover didn't work.
We'd like it so that if you hover on the first image, it shows the second image please. Can we have it on the homepage products but also on each product page itself too?
Thanks,
Ella
Hello,
I can not find theme.scss.liquid, just theme.css how can I do it?
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!😊
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
Hi There, I have the Debut Theme, where do I add this code to please I dont seem to have theme.scss.liquid or the alternatives mentioned on the other thread. Thanks
can you please send store url
i have check this customization On product hover or let me know DM
@JessBo Thanks, If you're comfortable working with coding languages (eg. HTML, JavaScript, CSS, and Liquid), then you can try to follow the custom coding provided by or Send DM
Hi There
My website is www.studiobhomeware.com
I have also tried to use the coding in the embedded link above and this just ended up with two images been shown one over another rather than a hoover
Thanks
if you are able to code try above code and let me know it done customization codde
Thanks you.
Which coding should I be following there’s a few linked above and I am not entirely sure I follow which one you are referring to? Some links say to update the theme and product coding and some just suggest the Theme.
Please note my store does not have theme.scss.liquid so do I use theme.css or theme.liquid
thank you
https://www.huratips.com/tech-tips/how-to-make-product-image-change-when-mouse-over-in-shopify.html
Thank you - when I do this it results in the two images being shown, please see a preview of my duplicate theme where I have added the code below
https://gsho2r052aj8c5bf-53377695903.shopifypreview.com
can you please update this code product-card-grid
{% comment %}
Renders a product card using "Grid" style
Accepts:
- max_height: {Number} Maximum height of the product's image (required)
- product: {Object} Product Liquid object (required)
- show_vendor: {Boolean} Show the product's vendor depending on the section setting (optional)
Usage:
{% include 'product-card-grid', max_height: max_height, product: product, show_vendor: section.settings.show_vendor %}
{% endcomment %}
<div class="grid-view-item{% unless product.available %} grid-view-item--sold-out{% endunless %} product-card">
<a class="grid-view-item__link grid-view-item__image-container full-width-link" href="{{ product.url | within: collection }}">
<span class="visually-hidden">{{ product.title }}</span>
</a>
{% capture img_id %}ProductCardImage-{{ section.id }}-{{ product.id }}{% endcapture %}
{% capture wrapper_id %}ProductCardImageWrapper-{{ section.id }}-{{ product.id }}{% endcapture %}
{%- assign preview_image = product.featured_media.preview_image -%}
{%- assign img_url = preview_image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
{% unless preview_image == blank %}
{% include 'image-style', image: preview_image, height: max_height, wrapper_id: wrapper_id, img_id: img_id %}
{% endunless %}
<div class="product-card__image-with-placeholder-wrapper" data-image-loading-animation>
<div id="{{ wrapper_id }}" class="grid-view-item__image-wrapper product-card__image-wrapper js">
<div style="padding-top:{% unless preview_image == blank %}{{ 1 | divided_by: preview_image.aspect_ratio | times: 100 }}%{% else %}100%{% endunless %};">
<img data-swift-lazy="1" loading="lazy" id="{{ img_id }}"
class="grid-view-item__image lazyload on-normal"
alt="{{ preview_image.alt }}"
data-src="{{ img_url }}"
data-widths="[180, 360, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]"
data-aspectratio="{{ preview_image.aspect_ratio }}"
data-sizes="auto"
data-image>
<img class="grid-view-item__image lazyload on-hover" src="{{ product.images[1] | img_url: 'master' }}" alt="{{ product.images[1] | escape }}" />
</div>
</div>
</div>
<noscript>
{% capture image_size %}{{ max_height }}x{{ max_height }}{% endcapture %}
<img data-swift-lazy="1" loading="lazy" class="grid-view-item__image" src="{{ preview_image | img_url: image_size, scale: 2 }}" alt="{{ preview_image.alt }}" style="max-width: {{ max_height | times: preview_image.aspect_ratio }}px;">
</noscript>
<div class="h4 grid-view-item__title product-card__title" aria-hidden="true">{{ product.title }}</div>
{% include 'product-price-listing', product: product, show_vendor: show_vendor %}
</div>
<style>
.on-hover {
opacity: 0;
}
.product-card:hover .on-hover {
opacity: 1;
}
</style>
User | RANK |
---|---|
187 | |
151 | |
80 | |
77 | |
65 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023