WordPress.org

Ready to get started?Download WordPress

Forums

WP Menu Cart
[resolved] add checkout link? (2 posts)

  1. Giellemme
    Member
    Posted 10 months ago #

    Hi there!

    I wanted to know if I can add a lick to the checkout page, and not only to the cart page. I also wanted to learn if the plugin texts can be localized into a different language or into multiple languages in case of a multilingual shop.

    Thanks a lot for your work!

    http://wordpress.org/plugins/wp-menu-cart/

  2. Ewout
    Member
    Plugin Author

    Posted 10 months ago #

    Hi Giellemme,
    You can change the link to the cart page to the checkout page by using filters (available from version 2.2.0 of the plugin).

    Add the following to your functions.php:

    add_filter('wpmenucart_fullurl', 'wpmenucart_to_checkout', 1, 1);
    function wpmenucart_to_checkout ($url) {
    	global $woocommerce;
    	$url = $woocommerce->cart->get_checkout_url();
    	return $url;
    }
    
    add_filter('wpmenucart_fulltitle', 'wpmenucart_to_checkout_title', 1, 1);
    function wpmenucart_to_checkout_title ($title) {
    	$title = 'Go to checkout'; //hover text for menu
    	return $title;
    }

    Our plugin can be used in a multi-language setup using WPML + String Translation.
    In such a case you would probably need to be able to add the Menu Cart to several different menus (one for each language). By default the Pro version enables for 3 menus, and by using extra filters we can add infinitely more in relatively simple way (update proof).

    If you are using just one language on the front end (for example Italian) and want to use English on the backend, you can use a little trick:
    duplicate the corresponding .mo & .po files (it_IT) and rename them to en_US or en_GB (depending on which is used for the base install).

    Let us know if you have any other questions!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.