Why does my 'Add to Cart' button cause a workflow routing error?

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

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!

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/category/shopify-job-board

Hope it helps!

Exactly what I needed! You just saved me several hours. Thanks!

I am so thankful for what you did.

Summit County Ohio Auditor Property Search