Support » Plugin: WooCommerce Side Cart (Ajax) » How can I allow “add to cart” notice?

  • Hi there,

    There are many plugins like this, but indeed this is the best one. I’d just like to allow “add to cart notice” that appears above. I want my cart to have ajax but also take the user to above screen where it shows “add to cart” notice. Please help! that’s the only missing feature now…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author xootix


    Hi @zohaibji0

    I am glad you like the plugin.
    This feature is not available in the free version , you can checkout the website for more.
    I wrote the snippet , kindly place it in your functions.php. This will show up the notification on add to cart.

    add_action( 'wp_footer', function(){
    	<script type="text/javascript">
    			$(document).on( 'added_to_cart', function(){
    				$('body').append(  '<div class="xoo-cu-wsc-notice-cont"><div class="xoo-cu-wsc-notice"> Added to cart successfully. </div></div>' );
    			} )
    	<style type="text/css">
    		.xoo-cu-wsc-notice-cont {
    		    position: absolute;
    		    top: 0;
    		    left: 50%;
    		    transform: translateX(-50%);
    		    z-index: 999999;
    		    padding: 10px 20px;
    		    color: #3c763d;
    		    background-color: #dff0d8;
    		    border-color: #d6e9c6;
    } );


    Thank you very much for your help. Yes, it’s working for sure but it shows the notice on the top and the screen doesn’t move automatically on the top so the user is still unaware. And by the time you scroll up it’s already hidden. Perhaps the better approach is to either show it on the same screen area where the user is (somewhere close to add to cart button) or if it’s on the top then the screen moves up automatically so the user is aware. Please let me know your thoughts… Many thanks.

    Hi again,

    Np, I fixed it just by changing the “absolute” to “fixed” in css. Now, it’s all perfect. I’ll let you know if anymore help required… Once again, thanks a lot for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I allow “add to cart” notice?’ is closed to new replies.