Answer the question
In order to leave comments, you need to log in
How, after recalculating the data and refreshing the page, open it in a specific tab?
Hello! There is a site on wordpress + woocommerce with a coupon plugin installed for a basket of this kind:
<div class="coupon">
<input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php _e( 'Coupon code', 'woocommerce' ); ?>" /> <input type="submit" class="button" name="apply_coupon" value="" />
<?php do_action('woocommerce_cart_coupon'); ?>
</div>
Answer the question
In order to leave comments, you need to log in
everything is much simpler - in the file cart.php it was necessary to correct the line - add it to action .'#mycart'
<form action="<?php echo esc_url( WC()->cart->get_cart_url() ).'#mycart'; ?>" method="post">
You can use js script like this:
/*здесь условия определения что нужно открыть вкладку (Скорее всего что то в $_REQUEST хранится после обновления страницы)*/
if (mycart) {
echo '<script>$('идентификатор кнопки таба по которой надо кликнуть').click();</script>
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question