How to show success message when product is removed from cart?

How to show success message when product is removed from cart?

accessibledev
Shopify Partner
16 1 3

Is there a way to display a success message when a product is successfully removed from the cart? 

 

For example, "[PRODUCT] was successfully removed."

Replies 2 (2)

Mac
Shopify Staff
1690 177 279

Hi, @accessibledev!

Thanks for reaching out in our Community forums and for sharing your concern, I’d be happy to help.

 

The outcome when a customer removes a product while on the cart page typically depends on the theme that is being used. For instance, most themes simply remove the product completely, while some trigger an alert message stating "are you sure you would like to remove this product", and I'm sure some alert customers that they have successfully removed the product. Depending on your theme, this customization will require third party code. Are you able to provide some more information regarding your current theme, and more about your requirements for this?

 

You can also speak directly with Shopify Experts. This is a marketplace that connects you to professionals in a variety of fields related to your e-commerce business. Doing so will allow you to outline your exact requirements and specifications to create a tailored solution. If you would like to know more about finding the right Expert, please click here.

 

Kindly reply back to this thread with any questions or updates and we can continue our conversation further!

Mac | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

accessibledev
Shopify Partner
16 1 3

Hi @Mac,

 

Thanks for the reply. We are currently using the Impulse theme and need to implement this to increase the accessibility of the cart page so that screen reader users are aware that their action was successful. 

 

I am trying to find where this has been implemented somewhere so that I can see how it's done and apply it to this theme since I don't see an option to set this by default. Here is code for the current remove option:

 

<p class="cart__product-meta">
<a href="/cart/change?line={{ forloop.index }}&amp;quantity=0" class="removebtn btn btn--small">
{{ 'cart.general.remove' | t }}
</a>

</p>

 

Thanks!