Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hello A.J.
    Please post your issues in one thread! You have now opened three threads after each other!

    The plugin is definitely compatible with WP4.0, what you saw was probably just AJAX or browser cache! When you have changed these settings, you need to close & reopen the browser tab for the changes to take effect.

    To redirect to a different page, you need to add a filter to your theme’s functions.php. Check out the instructions under “Change Empty Cart Redirection” on this page:
    https://wpovernight.com/faqs/category/menu-cart-pro/
    That FAQ is for the pro version, but that specific section also works for WP Menu Cart Pro.

    Good luck & let me know if you have any other questions.

    Ewout

    Thread Starter wp

    (@ashraf-jibrael)

    Thanks sir for your feedback,
    I want to redirect to another page , WHEN I will click on Tab Menu Cart:,

    I mean, it is empty(only when my item: 0, price: 0,).
    Please check:
    1-
    I unchecked the :
    http://grab.by/AyO8

    And , when i check my site i saw:
    http://grab.by/AyO4

    2- I added the following in my functions.php file
    add_filter(‘wpmenucart_emptyurl’, ‘add_wpmenucart_emptyurl’, 1, 1);
    function add_wpmenucart_emptyurl ($empty_url) {
    $empty_url = ‘https://google.com/’;
    return $empty_url;
    }

    But i redirect to the shop page.

    Please, how can i fix this issue ?

    Regards
    A.J.

    Thread Starter wp

    (@ashraf-jibrael)

    Please,
    Can do give the if condition for my Cart when it is empty.
    I will use the css to hide this section?

    Best regards
    A.J.

    Thread Starter wp

    (@ashraf-jibrael)

    I tried:
    ON my custom-admin.css:
    li#wpmenucartli.wpmenucart-display-standard menu-item menu-item-type-post_type.menu-item-object-page.ss-nav-menu-item-depth-0.ss-nav-menu-reg.um-flyout-align-center{
    display: none !important;
    }

    function add_wpmenucart_emptyurl ($empty_url) {
    wp_enqueue_style(‘my-admin-style’, get_template_directory_uri() . ‘/custom-admin.css’);
    $empty_url = ‘http://www.google.com/’;
    return $empty_url;
    }
    if ( sizeof( $woocommerce->cart->cart_contents ) == 0 ) {
    add_filter(‘wpmenucart_emptyurl’, ‘add_wpmenucart_emptyurl’, 1, 1);
    }

    But it is not working also.

    Plugin Contributor Ewout

    (@pomegranate)

    Without a link to your site I’m afraid I cannot help much. But I’ll repeat what I wrote in my first response:

    When you have changed these settings, you need to close & reopen the browser tab for the changes to take effect.

    This is also true for the filters!

    With your code I have three remarks:

    • $woocommerce needs to be defined (try global $woocommerce first)
    • The filter is already limited to the empty cart (hence the filter name), so the if statement is not going to make a difference
    • It’s not necessary to load the complete admin css!
    Thread Starter wp

    (@ashraf-jibrael)

    wow , Fixed.
    Thank you so much sir.

    Best regards
    A,J,

    Plugin Contributor Ewout

    (@pomegranate)

    That’s great! What fixed it, precisely?

    Thread Starter wp

    (@ashraf-jibrael)

    I mean the tab Menu is hidden , when the Cart is empty.
    I did exact what you said above.

    Thanks sir.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Hide’ is closed to new replies.