Home Forums WoodMart support forum Custom add to cart message

Custom add to cart message

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #94980

    annachi
    Participant

    Hello

    I added the below code at woodmart -> functions.php but not working. Any idea ?

    /**
    * Custom Add To Cart Messages
    * Add this to your theme functions.php file
    **/
    add_filter( ‘wc_add_to_cart_message’, ‘custom_add_to_cart_message’ );
    function custom_add_to_cart_message() {
    global $woocommerce;
    // Output success messages
    if (get_option(‘woocommerce_cart_redirect_after_add’)==’yes’) :
    $return_to = get_permalink(woocommerce_get_page_id(‘shop’));
    $message = sprintf(‘%s %s’, $return_to, __(‘Continue Shopping →’, ‘woocommerce’), __(‘Product successfully added to your cart.’, ‘woocommerce’) );
    else :
    $message = sprintf(‘%s %s’, get_permalink(woocommerce_get_page_id(‘cart’)), __(‘View Cart →’, ‘woocommerce’), __(‘Product successfully added to your cart.’, ‘woocommerce’) );
    endif;
    return $message;
    }
    /* Custom Add To Cart Messages */

    Thanks

    #94981

    annachi
    Participant

    Here my website access.

    #94985

    annachi
    Participant

    I want cart added message like on attached picture. Kindly help me.

    Attachments:
    You must be logged in to view attached files.
    #94995

    Hello,

    If you want just to change the wording, remove the code you have added. You can rewrite all theme and plugin texts via PO file in WordPress. Here is a video tutorial that should help you translate your website texts with a Loco Translate plugin https://www.youtube.com/watch?v=D3NsDdMzsls&list=PLMw6W4rAaOgKKv0oexGHzpWBg1imvrval&index=3

    Best Regards

    #95003

    annachi
    Participant

    Thanks for your reply.

    I don t want to translate, on my shop, the “succesfully added cart” message doesn t appear at all.
    Please check my website and try to add from Shop page, no any notifications.

    I enabled themes -> shop -> No action.
    I don t want open cart on sidebar but just showing a message that product has been added.

    NB: I removed the code of my previous message.

    Thanks

    #95046

    Hello,

    If you want just message you need to choose “Show popup” http://prntscr.com/lsxv4y

    Best Regards

    #95056

    annachi
    Participant

    Yes something like that but without disturbing client navigation, the popup disturb each time when we add on product. How we can make it secretly a pop up from bottom ? And just inform that product is added not display every time on middle of the screen.

    Kindly help me… 😉

    Thanks

    #95058

    annachi
    Participant

    Moreover we need to click on continu shopping to add another product, we don t want that behaviour. If client add 50 products, need to click “continu shopping ” ? It s not user friendly navigation.

    I hope you understand what i want.

    #95080

    Hello,

    There is no option to show in the bottom. You have an icon in the header and each time a buyer adds the product he will see it on the icon.

    In order to keep shopping after adding a product to cart, navigate to Woodmart > Settings and disable redirecting to the cart after product adding.

    Best Regards

Viewing 9 posts - 1 through 9 (of 9 total)