Shopify themes, liquid, logos, and UX
Hi guys,
I got work flow routing error when "Add to cart" botton clicked in collection. I need the following to be fixed. Highly appriciated.
If the product is sold out.
1- whenever product is sold out, I need "Add to cart" button to be dimmed. Because if you make it disappear , will look very odd. Because if you noticed, if the product is sold out, it doesnt make sense having it. besides, customers still can add it to the cart.
If the product is available.
1- When "add to cart" button clicked in collection, must not directed to the cart page, instead, get a message that "Product added to cart" and the number of purchased quantity to be added to cart, and show directly in cart icon.
Thank you,
allianceautoproducts.com
Solved! Go to the solution
This is an accepted solution.
Hi @Alliance,
Please go to Actions > Edit code > Assets > theme.scss.liquid file and paste this at the bottom of the file:
.grid-view-item--sold-out.product-card form[action="/cart/add"] input.btn {
pointer-events: none;
opacity: .5;
}
Hope it helps!
This is an accepted solution.
If the product is sold out.
1- whenever product is sold out, I need "Add to cart" button to be dimmed. Because if you make it disappear , will look very odd. Because if you noticed, if the product is sold out, it doesnt make sense having it. besides, customers still can add it to the cart.
This is an accepted solution.
Hi @Alliance,
Please go to Actions > Edit code > Assets > theme.scss.liquid file and paste this at the bottom of the file:
.grid-view-item--sold-out.product-card form[action="/cart/add"] input.btn {
pointer-events: none;
opacity: .5;
}
Hope it helps!
This is an accepted solution.
If the product is sold out.
1- whenever product is sold out, I need "Add to cart" button to be dimmed. Because if you make it disappear , will look very odd. Because if you noticed, if the product is sold out, it doesnt make sense having it. besides, customers still can add it to the cart.
Thank you for the first part....What about the second part:
If the product is available.
1- When "add to cart" button clicked in collection, must not directed to the cart page, instead, get a message that "Product added to cart" and the number of purchased quantity to be added to cart, and show directly in cart icon.
Hi @Alliance,
It is a complex requirement and I cant guide you in detail because you need to change the JS and debug it, so I recommend you hire expert in this case, they will help you to edit it fast quickly.
Refer group: https://community.shopify.com/c/Shopify-Ecommerce-Jobs/bd-p/shopify-job-board
Hope it helps!
Exactly what I needed! You just saved me several hours. Thanks!
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025