Home Forums Basel support forum quickview bug

quickview bug

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4987

    lxyamerica
    Participant

    When you adding items through quick view, it will not show any notification message.

    For example if you have 5 items in stock, and you are trying to add 6 of them, it will jump to homepage without any error notification. Actually, If you go to any item detail page, all notification pop same time..

    #5000

    Artem Temos
    Keymaster

    Hello,

    Thank you for reporting this issue.

    The main reason of the problem is that WooCommerce notices can be shown only on shop pages (product, cart, checkout etc.). Their function that display messages can’t be added to all other pages created by additional plugins or themes. But as a workaround you can do the following steps.

    1. Add the following code snippet to the functions.php file in your child theme. It will register a new shortcode

    add_shortcode('basel_wc_messages', 'basel_wc_messages_shortcode');
    
    function basel_wc_messages_shortcode() {
    	ob_start();
    	wc_print_notices();
    	return ob_get_clean();
    }
    

    2. Then you will be able to add this shortcode to any page you have Visual Composer Products element (home page for example). Just add a text block at the top of the page and place this shortcode there

    [basel_wc_messages]

    Please write us about the result.

    Regards

    #5001

    lxyamerica
    Participant

    Thanks for your help, it works, but it break my homepage layout.

    Like quick add button, if you added item more than inventory, it will jump to item detail page and pop notification.

    Is there a quick solution for this way?

    #5008

    Artem Temos
    Keymaster

    Try to put your messages after slider to make it look better. It is the only one solution we can propose you.

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