add_action( 'wp', function() {
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
if ( 1 !== $page ) {
remove_action( 'woocommerce_archive_description', 'shoptimizer_woocommerce_taxonomy_archive_description' );
remove_action( 'woocommerce_archive_description', 'shoptimizer_category_image', 20 );
// If you also want to remove the "Below category content" area:
remove_action( 'woocommerce_after_shop_loop', 'shoptimizer_product_cat_display_details_meta', 40 );
};
}, 20 );
Thursday, June 27, 2024
Display Category Description on First Page only Woocommerce
Friday, June 21, 2024
Wordprress, Web Design Jobs.
Hello All,
We are open to project-based /freelancing work. You can contact us on email, Upwork and Fiverr for same.
Email: Webcodeaddicted@gmail.com
Upwork: https://www.upwork.com/freelancers/~0116762a5d8c511579?viewMode=1
https://www.upwork.com/freelancers/~018e66074633ac95a7?viewMode=1
Fiverr: https://www.fiverr.com/s/dD0EAQ3
Monday, June 10, 2024
How to add To cart and custom Quantity Field in Woo commerce with Plus and minus button
Quantity Box With Add to Cart button
<form class="cart" method="post" enctype="multipart/form-data">
<div class="quantity">
<button type="button" class="minus" >-</button>
<input type="number" step="1" min="1" max="" name="quantity" value="1" title="Quantity" class="input-text qty text" size="4" pattern="[0-9]*" inputmode="numeric">
<button type="button" class="plus" >+</button>
</div>
<input type="hidden" name="add-to-cart" value="<?php echo get_the_ID(); ?>">
<button type="submit" class="single_add_to_cart_button button alt shop-button-cart"><i class="fa fa-cart-plus" aria-hidden="true"></i> Add to cart</button>
</form>
Script to make the Minus Plus button work for Quantity box
<script>
jQuery(document).ready(function($){
$('form.cart').on( 'click', 'button.plus, button.minus', function() {
var qty = $( this ).closest( 'form.cart' ).find( '.qty' );
var val = parseFloat(qty.val());
var max = parseFloat(qty.attr( 'max' ));
var min = parseFloat(qty.attr( 'min' ));
var step = parseFloat(qty.attr( 'step' ));
if ( $( this ).is( '.plus' ) ) {
if ( max && ( max <= val ) ) {
qty.val( max );
} else {
qty.val( val + step );
}
} else {
if ( min && ( min >= val ) ) {
qty.val( min );
} else if ( val > 1 ) {
qty.val( val - step );
}
}
});
});
</script>
For Professional website contact WEB CODE ADDICT
View this post on Instagram A post shared by WebCodeAddict (@webcodeaddicted)
-
Web Design ,Logo Design, graphic design, website design: Web Design : encompasses many different skills and disciplines in the production a...
-
The Wedding is Responsive HTML theme for wedding planner websites. which helps you to build your own site. Wedding Planner theme has ...
-
<!doctype HTML> <html> <head> <meta content="text/html; charset=UTF-8" /> <title>Web Code Addict Ac...