S
S
Skinner2016-02-03 12:22:39
PHP
Skinner, 2016-02-03 12:22:39

How to make it so that when you click on the cart, it immediately leads to the checkout?

I cannot resolve this issue. When I add an item to the cart and click on it later, I have a choice: ec723e9276414f9b8576227248d206d5.png
. How can I make it so that when I click on the cart, I immediately lead to the checkout of the goods (check out)? WordPress website with woocomerse plugin

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WP Panda, 2016-02-03
@wppanda5

In this particular case, the cart output code looks something like this:

<ul class="site-header-cart menu">
      <li class="<?php echo esc_attr( $class ); ?>">
        <!-- код вывода подробностей о текущем состоянии корзины -->
      </li>
      <li>
                                 <!-- выпадающий блок корзины-->
        <?php the_widget( 'WC_Widget_Cart', 'title=' ); ?>
      </li>
    </ul>

Should be replaced with this
<ul class="site-header-cart menu">
      <li class="<?php echo esc_attr( $class ); ?>">
        <?php a href="<?php echo esc_url( WC()->cart->get_cart_url() ); ?>"><!-- код вывода подробностей о текущем состоянии корзины --></a>
      </li>
    </ul>

Well, it is possible to disable the js that shows the drop-down basket on hover

Z
Zhainar, 2016-02-03
@zhainar

admin -> woocommerce -> products -> display -> Add to cart behavior Check the box
Redirect to cart after successful addition

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question