Hello.
I'm building a dropshipping store and almost all of my products have multiple variations of colors and sizes, most of them are shipped from a lot of countries too.
The thing is, I'm only buying the products from China and even when I delete all the "Ships from" variations it keeps appearing on the products pages with only one option to be selected.
I've tried the solutions @Nitin_Kujur posted here: https://community.shopify.com/c/Shopify-Design/Remove-drop-downs-of-options-with-1-variant-in-Simple...
The first code worked just fine, but it only works for single variant products, the second one seemed to work for other people, but I'm using Venture theme and it didn't work at all for me.
Resuming: I want a solution to hide all my dropdown menus that has only one option to be selected on the Venture theme.
Store link (it's in portuguese): https://www.quatropatas.club (https://quatro-patas-club.myshopify.com/)
Store pw: naitsa
Product example (I wanna hide the "Entrega" menu): https://quatropatas.club/collections/transporte/products/mochila-de-transporte-dobravel
I will really appreciate any help, I'm just starting this Shopify journey and I'm really exited!
Single variant product:
Single variant product with @Nitin_Kujur solution:
Multiple variants product with single variant dropdown menu:
Solved! Go to the solution
This is an accepted solution.
Try to add the JS script to the end of theme.js
$(document).ready(function(){
for (const select of $(".template-product select")) {
if ($(select).children().length == 1) {
$(select).closest(".selector-wrapper").hide();
}
}
})
Woooah, that worked almost perfectly. Thank you so, so much!
Just a perfectionist question, the dropdown menu is visible for something like a second when I open the page, is it possible to make it invisible even for this period of time?
I know it's a silly question, but as I've said, I'm a perfectionist. But your answer helped me a lot already. Thank you again
It is a client side solution, so I don’t think it is possible to make that perfect
If you have any problems in the future for your Shopify, you can visit my YouTube channel, I am keeping posting videos on how to fix different problems on Shopify store, you may have some thing useful there
@Bflaherty03 it should work for debut theme
User | Count |
---|---|
550 | |
213 | |
129 | |
81 | |
44 |