Answer the question
In order to leave comments, you need to log in
How to change the link of the cart icon (mini-cart)?
Good afternoon!
This is my first time creating an online store on WP using the Woocommerce plugin. I decided to design the "Cart" and "Checkout" pages in my own way. To do this, I deleted the old versions of the pages, created new pages and assigned them the same links as they were before. As a result, the cart icon (mini-cart) in the menu stopped working (screenshot), and the link took on the form https://site.ru/# or https://site.ru/page/# (when going to the site pages).
In the site folder I found a place where you can change the link of the cart icon (/wp-content/plugins/elementor-pro/modules/woocommerce/module.php)
<div class="elementor-menu-cart__toggle elementor-button-wrapper">
<a id="elementor-menu-cart__toggle_button" href="#" class="elementor-menu-cart__toggle_button elementor-button elementor-size-sm" aria-expanded="false">
<span class="elementor-button-text"><?php echo $sub_total; ?></span>
<span class="elementor-button-icon" <?php echo $counter_attr; ?>>
<i class="eicon"></i>
<span class="elementor-screen-only"><?php esc_html_e( 'Cart', 'elementor-pro' ); ?></span>
</span>
</a>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question