• Resolved gabrielsoler093

    (@gabrielsoler093)


    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)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ??

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Cheers!

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    We’ve not seen any activity on this thread for a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Cheers!

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.