D
D
Dmitry2016-01-16 23:07:26
PHP
Dmitry, 2016-01-16 23:07:26

How to make a popup cart in WooCommerce?

Hello.
Help solve the problem.
I want to display the cart and checkout template in the popup window.
I found this solution:

but after I removed the "add product" button, this thing stopped working.
I want to attach a click handler to another button and call the cart template in the popup.
Or tell me how you can use ajax-a to call a function that will display the woocommerce cart template.
To be able to do for example

$('.cart').click(function(){
    $('body').append('<div id="hidden_cart">'+data['div.widget_shopping_cart_content']+'</div>');
})

and the pop-up showed a standard cart template with price tags, pictures, quantity, etc.
Thank you all in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill, 2016-01-16
@quant78

pcvector.net/scripts/lightbox_dialog_overlay/257-v... here is a modal very easy to use, should not crash

<a href="#x" class="overlay" id="login_form"></a>
<div class="popup">
и сюда сам скрипт помещаешь

    <a class="close" href="#close"></a>
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question