Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3086393
Product Bundle Plugin Not Compatible with Flatsome
Closed

Comments

  •  3
    Lucas started the conversation

    Hi there, 

    I use your product bundle plugin in all my  websites.. I use only flatsome for ecommerces and there is one incompatibility issue happening.

    Flatsome has this "on sale bubble" that calculate the % of the sale automatically. But It doesnt on your bundles. I reached out for the devs of flatsome and they said:

    -----------------------------------------

    "Hi Lucas! I'm afraid we have not had any compatibility testing with the smart bundles plugin. You might need to reach out to the plugin developer to assist you with this. Thanks"

    --
    Frank Olsen

    -------------------------------------------

    Is it possible for us to find a solution for that? 

    This is one of my clients. This page shows bundles with "OFERTA" and other ones with the %.

    https://rosaimperial.com.br/categoria-produto/outlet/


    Thanks in advanceee.. Lets make everything better

    Love y'all!

  •  767
    Janilyn replied

    Hi Lucas,

    Thank you for contacting WPClever Support Forum. 

    We’ve received your ticket and assigned one of our developers to help you with that. 

    He’ll be looking into your question and responding with specific instructions as soon as possible. 

    Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.

    Best regards.

    Janilyn T. - WPClever Support Agent

  •  1,226
    Dustin replied

    Hi Lucas,

    Please add the below custom code (How to add custom code?)

    add_filter( 'woocommerce_sale_flash', 'woosb_percentage_sale_flash', 99, 3 );
    function woosb_percentage_sale_flash( $badge, $post, $product ) {
        $badge_style = get_theme_mod( 'bubble_style', 'style1' );
        if ( $badge_style == 'style1' ) {
            $badge_style = 'circle';
        }
        if ( $badge_style == 'style2' ) {
            $badge_style = 'square';
        }
        if ( $badge_style == 'style3' ) {
            $badge_style = 'frame';
        }
        if ( $product->is_type( 'woosb' ) && get_theme_mod( 'sale_bubble_percentage' ) ) {
            $regular_price  = $product->get_regular_price();
            $sale_price     = $product->get_sale_price();
            $bubble_content = round( ( ( floatval( $regular_price ) - floatval( $sale_price ) ) / floatval( $regular_price ) ) * 100 );
            return '<div class="callout badge badge-' . $badge_style . '"><div class="badge-inner secondary on-sale"><span class="onsale">' . $bubble_content . '</span></div></div>';
        }
        return $badge;
    }

    If it still doesn't work, please send me your website credentials (wp-admin link, username, password) then I can check and fix it for you. You also can create a dev/staging site with the same configurations then I'll work on it.

    Best regards,
    Dustin

  •  3
    Lucas replied

    Hiii Dustin, looks almost perfect.. the number appeared but the "Minus" signal and the % did not. Its supposed to look like 

    -9%

    7650512605.png

    We are almost thereee...

    Love your plugins man! Thanks a lot

  •  153
    Henry replied

    Hi Lucas.

    Please update the below custom code (How to add custom code?)

    // New code
    add_filter( 'woocommerce_sale_flash', 'woosb_percentage_sale_flash', 99, 3 );
    function woosb_percentage_sale_flash( $badge, $post, $product ) {
        $badge_style = get_theme_mod( 'bubble_style', 'style1' );
        if ( $badge_style == 'style1' ) {
            $badge_style = 'circle';
        }
        if ( $badge_style == 'style2' ) {
            $badge_style = 'square';
        }
        if ( $badge_style == 'style3' ) {
            $badge_style = 'frame';
        }
        if ( $product->is_type( 'woosb' ) && get_theme_mod( 'sale_bubble_percentage' ) ) {
            $regular_price  = $product->get_regular_price();
            $sale_price     = $product->get_sale_price();
            $bubble_content = round( ( ( floatval( $regular_price ) - floatval( $sale_price ) ) / floatval( $regular_price ) ) * 100 );
            $bubble_content = sprintf('-%s', $bubble_content . '%');
            return '<div class="callout badge badge-' . $badge_style . '"><div class="badge-inner secondary on-sale"><span class="onsale">' . $bubble_content . '</span></div></div>';
        }
        return $badge;
    }


    Best regards,
    Henry N.

  •  3
    Lucas replied

    Too perfect man, right on it!!!!

    Sick job. 

    6695341547.jpg


  •  153
    Henry replied

    Hi Lucas.

    When you are in need of help, please submit a new ticket to let us know at our Support Forum at any time. We are always at your service. 

    Best regards,
    Henry N.

  •  3
    Lucas replied

    Alright sir... thank you very much.. looks neat right now..

  •  153
    Henry replied

    Hi Lucas.

    If you are satisfied with our plugin and support, please reward it with a full five-star ★★★★★ rating. https://wordpress.org/support/plugin/woo-product-bundle/reviews?rate=5#new-post 

    Thank you in advance!

    Best regards,
    Henry N.