Archived topic
Slide out shopping cart menu
5 replies · Started by blademike on April 19, 2019
Viewing posts 1–6 of 6
Hi,
How do I enable the woocommerce shopping cart menu on the menu to be slide out instead of going to the cart page when clicked.
Hi there,
So if you click the cart icon in the menu, it would open the off canvas panel?
Let me know :)
Hi Tom,
Yes, correct.
Try adding this function:
add_action( 'wp_enqueue_scripts', function() {
$script = "jQuery( document ).ready( function($) {
$( '.wc-menu-item a' ).on( 'click', function( e ) {
e.preventDefault();
generateOffside.open();
} );
} );";
wp_add_inline_script( 'generate-offside', $script );
} );
Let me know :)
How can we add the cart contents to show on the off canvas menu??
Edit (never mind i found a custom way)
Glad to hear.
This archived topic is closed to new replies.