Home › Forums › WoodMart support forum › How remove mines from promotion seals price
How remove mines from promotion seals price
- This topic has 6 replies, 2 voices, and was last updated 1 year, 1 month ago by
av_admin_1984.
-
AuthorPosts
-
January 16, 2024 at 1:44 am #530156
av_admin_1984ParticipantHello
How remove mines from promotion seals price?
see the image, The first one is what woodmart shows, the second one is what I want to be shown
Attachments:
You must be logged in to view attached files.January 16, 2024 at 6:37 pm #530458
Hung PhamKeymasterHi av_admin_1984,
Thanks for reaching to us,
Unfortunately, it is not possible to remove the minus. It is a part of the text.
If you have any questions please feel free to contact us.
Regards,
January 16, 2024 at 6:53 pm #530470
av_admin_1984ParticipantHi
Tell me what file is responsible for this
January 16, 2024 at 6:57 pm #530474
Hung PhamKeymasterHi av_admin_1984,
This is related to WooCommerce functionality, please reach out o their support team for more details.
Regards,
January 16, 2024 at 7:55 pm #530501
av_admin_1984ParticipantFound in your support center, so it’s is related to theme not Woocommerce and your college fix this before
https://xtemos.com/forums/topic/how-to-remove-negative-symbol/the code wont work, it’s look like the image link
if ( ! function_exists( function: 'woodmart_product_label' ) ) { function woodmart_product_label() {...} add_filter( 'woocommerce_sale_flash', 'woodmart_product_label', 10 );
January 17, 2024 at 7:00 am #530609
Hung PhamKeymasterHi av_admin_1984,
Please try to add to functions.php file in Child theme.
if ( ! function_exists( 'woodmart_product_label' ) ) { function woodmart_product_label() { global $product; $output = array(); $product_attributes = woodmart_get_product_attributes_label(); $percentage_label = woodmart_get_opt( 'percentage_label' ); if ( 'small' === woodmart_loop_prop( 'product_hover' ) ) { return; } if ( $product->is_on_sale() ) { $percentage = ''; if ( $product->get_type() == 'variable' && $percentage_label ) { $available_variations = $product->get_variation_prices(); $max_percentage = 0; foreach ( $available_variations['regular_price'] as $key => $regular_price ) { $sale_price = $available_variations['sale_price'][ $key ]; if ( $sale_price < $regular_price ) { $percentage = round( ( ( (float) $regular_price - (float) $sale_price ) / (float) $regular_price ) * 100 ); if ( $percentage > $max_percentage ) { $max_percentage = $percentage; } } } $percentage = $max_percentage; } elseif ( ( $product->get_type() == 'simple' || $product->get_type() == 'external' || $product->get_type() == 'variation' ) && $percentage_label ) { $percentage = round( ( ( (float) $product->get_regular_price() - (float) $product->get_sale_price() ) / (float) $product->get_regular_price() ) * 100 ); } if ( $percentage ) { $output[] = '<span class="onsale product-label">' . sprintf( _x( '%d%%', 'sale percentage', 'woodmart' ), $percentage ) . '</span>'; } else { $output[] = '<span class="onsale product-label">' . esc_html__( 'Sale', 'woodmart' ) . '</span>'; } } if ( ! $product->is_in_stock() && 'thumbnail' === woodmart_get_opt( 'stock_status_position', 'thumbnail' ) ) { $output[] = '<span class="out-of-stock product-label">' . esc_html__( 'Sold out', 'woodmart' ) . '</span>'; } if ( $product->is_featured() && woodmart_get_opt( 'hot_label' ) ) { $output[] = '<span class="featured product-label">' . esc_html__( 'Hot', 'woodmart' ) . '</span>'; } if ( woodmart_get_opt( 'new_label' ) && woodmart_is_new_label_needed( get_the_ID() ) ) { $output[] = '<span class="new product-label">' . esc_html__( 'New', 'woodmart' ) . '</span>'; } if ( $product_attributes ) { foreach ( $product_attributes as $attribute ) { $output[] = $attribute; } } $output = apply_filters( 'woodmart_product_label_output', $output ); if ( $output ) { woodmart_enqueue_inline_style( 'woo-mod-product-labels' ); $shape = woodmart_get_opt( 'label_shape' ); if ( 'rectangular' === $shape ) { woodmart_enqueue_inline_style( 'woo-mod-product-labels-rect' ); } if ( 'rounded' === $shape ) { woodmart_enqueue_inline_style( 'woo-mod-product-labels-round' ); } echo '<div class="product-labels labels-' . $shape . '">' . implode( '', $output ) . '</div>'; } } }
Regards,
January 17, 2024 at 6:10 pm #530900
av_admin_1984ParticipantThanks for this code
Please close this topic -
AuthorPosts
The topic ‘How remove mines from promotion seals price’ is closed to new replies.
- You must be logged in to create new topics. Login / Register