Tagged: sale, woocommerce
Hi there,
Do you smartfolks here know what would be the best way to move the salebadge on archive pages on top of the image above, I know I can css that with a top:-100px orso but it isnt optimal considering responsiveness. I see a action in /config-woocommerce/config.php:
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
but replacing it with
#remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
#add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
doesnt seem to do anything… any ideas?
Cheers,
Thomas
Hey Thomas!
If you want to comment those lines use //, not #.
//remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
//add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
Best regards,
Josue
ah thx :) still showing it in same place, you have any idea how I can get this badge above the <figcaption>….</figcaption> instead of inside it?
<span class="onsale">Sale!</span>
Hi,
Can you post the link to your Shop please?
Regards,
Josue
No sorry, its still runnin local with xamp, here is a screenshot if it helps!
Hi,
Try adding this at the end of js/avia.js:
jQuery(function() {
jQuery('.av-inner-masonry-content').each(function(){
jQuery(this).before(jQuery(this).find('.onsale').detach());
});
});
Regards,
Josue
Uncaught SyntaxError: Unexpected token &
oh my bad, it works!!!!
thx you very much! you may close this thread :)
You are welcome, glad we could help :)
Regards,
Josue