Home Forums WoodMart support forum How to add custom text before product price in a woodmart slider.

How to add custom text before product price in a woodmart slider.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #217724

    mallethenao
    Participant

    Hello, I want to achieve the next:

    I have added the next code to functions.php:

    function themeprefix_custom_price_message( $price ) { 
    	global $post;
    	if(!is_product()) {
    		$text =  '<span style="font-size:14px; line-height: 1; color: #e70000; padding-bottom:10px; font-weight:700;" class="precio-descuento">50% OFF en el 2do artículo</span>';
        	return $text . ' ' . $price;
    	}else{
    		return $price;
    	}
    }
    add_filter( 'woocommerce_get_price_html', 'themeprefix_custom_price_message', 10, 2 );
    add_filter( 'woocommerce_cart_item_price', 'themeprefix_custom_price_message', 10, 2 );

    This add a message before price for to category products, this is working fine, but for to sliders woodmart is not working.

    Look the images that i attached.

    How can I add this string to sliders woodmart?

    Attachments:
    You must be logged in to view attached files.
    #217823

    Hello,

    Now we are checking and see that it works on the slider http://prntscr.com/txlzbg

    Please provide the link where you have the problem.

    Best Regards

    #227882

    mallethenao
    Participant

    Thank you very much

    #227945

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

Viewing 4 posts - 1 through 4 (of 4 total)