Hi,
This seems to be a bug. Thanks for reporting it.
As a workaround, please enable Ajax to add products to cart.
Go to WooCommerce > Settings > Products and enable “Enable AJAX add to cart buttons on archives”
I will fix this in future release.
Thanks
Thread Starter
mseif
(@mseif)
Hi Sumit!
Thank you very much for your quick respose.
Great plugin by the way! 😉
I’d forgotten I added some code to show qty input beside ‘Add to cart’ buttons.
So I changed it a little bit to redirect to store after click inside search results. Its good enough for now.
Here’s the code in case is usefull for someone:
add_filter( 'woocommerce_loop_add_to_cart_link', 'qty_inputs_for_add_to_cart' );
function qty_inputs_for_add_to_cart( $html, $product ) {
if ( $product && $product->is_type( 'simple' ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold_individually() ) {
global $wp;
if(strlen($wp->request) == 0){
$html = '<form action="/tienda/' . esc_url( $product->add_to_cart_url() ) . '" class="cart" method="post" enctype="multipart/form-data">';
}else{
$html = '<form action="' . esc_url( $product->add_to_cart_url() ) . '" class="cart" method="post" enctype="multipart/form-data">';
}
$html .= woocommerce_quantity_input( array(), $product, false );
$html .= '<button type="submit" class="button alt">' . esc_html( $product->add_to_cart_text() ) . '</button>';
$html .= '</form>';
}
return $html;
}
Hi,
I have added a fixed and released a new version. Please update to the latest version.
Thanks