How to show added to cart message in Product Page
-
Hi.
I need to display the “Added to cart” message on the product page, not on the individual product page.
When I click on the add to cart button the product is added to the cart, but there is no alert for the user that the product is already in the shopping cart.I have tried this function, but it only modifies the message on the individual product page.
add_filter( 'wc_add_to_cart_message_html', 'wps_custom_added_to_cart_message' ); function wps_custom_added_to_cart_message() { $message = 'You cool product is in the cart!' ; return $message; }
Also note that the button has this class “button product_type_simple add_to_cart_button ajax_add_to_cart”.
I hope you can help me, thank you very much.
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to show added to cart message in Product Page’ is closed to new replies.