• Resolved golfer300

    (@golfer300)


    My site is codingmadesimple.com though it is currently under maintenance mode. The menu cart seems to link (when clicked with no products inside) to codingmadesimple.com/courses even though I deleted the original Courses page and am using a Product Category (courses) instead for that page. How can I update the link from codingmadesimple.com/courses to codingmadesimple.com/product-category/courses/
    Any help is much appreciated.

    https://www.ads-software.com/plugins/woocommerce-menu-bar-cart/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Contributor Jeremiah

    (@jprummer)

    Hi there!

    Are you using the paid version? If so we’ve implemented filters that will allow you to manually set that. If not, we’ll be adding it to the current version in the next couple of weeks. Please advise!

    Jeremiah

    Thread Starter golfer300

    (@golfer300)

    I am currently not using the paid version though I am going to upgrade once I increase cash flow. Is there anything I can do in the mean time or should I look for a way to adapt for the next couple weeks?

    Thread Starter golfer300

    (@golfer300)

    Sorry double post

    Plugin Contributor Jeremiah

    (@jprummer)

    Actually, I forgot that you shouldn’t need any filters for this. Our plugin grabs whatever page is set as your “shop base page”. If you go into WooCommerce Settings -> Pages make sure you set the “Shop Base Page” to the page you want the plugin to point to.

    Otherwise, we can do a temporary fix and then when we update to the latest version you’ll have to change it but it’ll be easy.

    Plugin Contributor Jeremiah

    (@jprummer)

    Hi golfer! Since I haven’t heard anything I assume you got this figured out. Let me know if you need any more help!

    superflymarketing

    (@superflymarketing)

    Hi Jeremiah,

    Has this version been upgraded so you can change the link when there is nothing in the cart?

    Tried changing the base page, but I want it to actually link to a page that has nothing to do with the shop!

    Please advise.

    Cheers,

    Nick

    Plugin Contributor Jeremiah

    (@jprummer)

    Yep, it has been! Although, you’ll need to download that version from here: https://www.ads-software.com/plugins/wp-menu-cart/ or search for wp menu cart in your add plugin menu to find it. Delete WooCommerce Menu Cart before activating WP Menu Cart.

    Are you familiar with filters? Actually, even if you’re not, it doesn’t really matter i guess. ?? Take the below code and add it to your theme’s functions.php file:

    /**
     * Set page url when cart is empty
     */
    //add_filter('wpmenucart_emptyurl', 'add_wpmenucart_emptyurl', 1, 1);
    function add_wpmenucart_emptyurl ($empty_url) {
    	$empty_url = 'https://yoursite.com/empty';
    	return $empty_url;
    }

    Just change $empty_url to be the url that you want. Does that all make sense?

    superflymarketing

    (@superflymarketing)

    Thanks so much for your help Jeremiah, but that didn’t work. ??

    https://shop.jameslegal.co.uk/

    Cheers!

    Nick

    Plugin Contributor Jeremiah

    (@jprummer)

    I think I know why. The add_filter function is commented out in the example I gave you. Try the following:

    /**
     * Set page url when cart is empty
     */
    add_filter('wpmenucart_emptyurl', 'add_wpmenucart_emptyurl', 1, 1);
    function add_wpmenucart_emptyurl ($empty_url) {
    	$empty_url = 'https://yoursite.com/empty';
    	return $empty_url;
    }
    superflymarketing

    (@superflymarketing)

    This worked!

    What a hero!

    Plugin Contributor Jeremiah

    (@jprummer)

    Great, glad to hear it! Enjoy. ??

    Hi guys,

    Love the plugin, great idea!

    My menu cart seems to timeout and not work when you click on it with 0 products in the cart.

    https://shop.jameslegal.co.uk/

    Any idea why?

    Cheers,

    Nick

    Plugin Contributor Jeremiah

    (@jprummer)

    Hi Nick,

    Looks like your site isn’t https, but you’re directing users to https. Just change the link in the function above to be https://shop.jameslegal.co.uk/cart/

    Hello there,

    I’m also having issues with the link (unless I’m misunderstanding something)…

    Right now, when there is nothing in the cart, if I click on the icon, it takes me to my Shop page. I was hoping if someone clicked on the cart icon, it would go to my cart page (even if it’s empty). Is this possible?

    Thanks!
    Sharon

    Plugin Contributor Ewout

    (@pomegranate)

    Sure! You just need WP Menu Cart instead of WooCommerce Menu Cart.

    Put the following snippet in your functions.php (make sure you don’t put it after any ?> at the end of the file)

    /**
     * Set page url when cart is empty
     */
    add_filter('wpmenucart_emptyurl', 'add_wpmenucart_emptyurl', 1, 1);
    function add_wpmenucart_emptyurl ($empty_url) {
    	global $woocommerce;
    	$empty_url = $woocommerce->cart->get_cart_url();
    	return $empty_url;
    }
Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Menu Cart Link Problem’ is closed to new replies.