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
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?
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.
Hi golfer! Since I haven’t heard anything I assume you got this figured out. Let me know if you need any more help!
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
Yep, it has been! Although, you’ll need to download that version from here: http://wordpress.org/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?
Thanks so much for your help Jeremiah, but that didn’t work. π
http://shop.jameslegal.co.uk/
Cheers!
Nick
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;
}
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.
http://shop.jameslegal.co.uk/
Any idea why?
Cheers,
Nick
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 http://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;
}