Shopify themes, liquid, logos, and UX
Hello so I've recently finished building my website and now I've noticed the product image whenever I click to zoom it occupies the whole screen and I don't want it to happen could someone help code wise? Thank you
Store - Vanbesky.com
Solved! Go to the solution
This is an accepted solution.
Sorry about that, please follow the instructions below instead.
1. From your Admin store, go to Online store > Themes > Click Actions > Edit code
2. Open the Section folder, and find the main-product.liquid file.
3. Find the code below and delete it.
<script src="{{ 'product-modal.js' | asset_url }}" defer="defer"></script>
4. Same in feature-product.liquid, still at the Section folder.
5. Find the code below and delete it.
<script src="{{ 'product-modal.js' | asset_url }}" defer="defer"></script>
6. Next, open the base.css under the Asset folder and paste the code below.
.product__modal-opener .product__media-icon {
display: none !important
}
oh sorry for that issue can you please disable on click zoom can do hover enable if you theme allow
Hi @Vanbesky,
What do you want to happen instead? You can adjust the width of the product modal by using the code here.
1. From your Admin store, go to Online store > Themes > Click Actions > Edit code
2. Open the Asset folder, and find the base.css file.
3. Add the code below.
.product-media-modal__dialog {
width: 50%;
margin: auto;
}
That fixed it on the desktop version but ruined it on the mobile version, any way to make that command desktop specific? thank you
Hi @Vanbesky,
Yes just add the media call.
@media only screen and (max-width: 750px) {
.product-media-modal__dialog {
width: 50%;
margin: auto;
}
}
Sadly that one just introduced the problem back again to both mobile and desktop. Honestly I'd just like to disable zoom overall but the theme Ride doesn't have that option
Hi @Vanbesky,
You can simply hide the modal by using the code below.
span.product__media-icon.motion-reduce.quick-add-hidden {
display: none !important
}
.product-media-modal {
display: none !important
}
Unfortunately that did not work 😕 after using that code, if I click the product image, page freezes and no way to undo.. Sorry to bother 😞
This is an accepted solution.
Sorry about that, please follow the instructions below instead.
1. From your Admin store, go to Online store > Themes > Click Actions > Edit code
2. Open the Section folder, and find the main-product.liquid file.
3. Find the code below and delete it.
<script src="{{ 'product-modal.js' | asset_url }}" defer="defer"></script>
4. Same in feature-product.liquid, still at the Section folder.
5. Find the code below and delete it.
<script src="{{ 'product-modal.js' | asset_url }}" defer="defer"></script>
6. Next, open the base.css under the Asset folder and paste the code below.
.product__modal-opener .product__media-icon {
display: none !important
}
Fantastic, that worked! Thank you 🙂
Hello there,
I've been trying this solution for myself, but don't have an equivalent of the code in the feature product liquid Snippet. I did the other steps without but nothing has changed. Any ideas?
I tried this but would like to put it back again. Does the code I took out need to go back in a certain place?
User | RANK |
---|---|
208 | |
177 | |
63 | |
51 | |
47 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023