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

Okay
  Public Ticket #3079580
Seperator Text between bundle products
Closed

Comments

  •  2
    Lukas started the conversation

    Hey WPClever-Team,

    I would like to add some Text between the single products in the bundle. So im basically looking for something like this:

    https://wpc.ticksy.com//ticket/3069398/

    But can't make it work for the product bundles.


    Hope you can help me out :)


    Thanks and best regards,

    Lukas

  •  767
    Janilyn replied

    Hi Lukas,

    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

  •  153

    Best regards,
    Henry N.

  •  2
    Lukas replied

    Yes, exactly :)

  •  153
    Henry replied

    Hi

    1. If you want to insert text between each product, please add the below custom code (How to add custom code?)

    // insert text between each product
    add_action('woosb_before_item', function($_product, $product, $order) {
        echo '<h3>Your text here</h3>';
    }, 99, 3);

    2. If you want to insert text as a grouping ( https://www.screencast.com/t/d2srLo9xJc ), please add the below custom code (How to add custom code?)

    // custom code here
    add_action('woosb_before_item', function($_product, $product, $order) {
        
        // Group #1
        // step 2: 888 is ID of Bundled 
        // Replace "888" with your product_id
        if($_product->get_id() == 888) {
            echo '<h3>Group name #1</h3>'; // step 3: Replace "Group name #1" by the your text
        }
        // Group #2
        // step 2: 999 is ID of Bundled
        // Replace "999" with your product_id 
        if($_product->get_id() == 999) {
            echo '<h3>Group name #2</h3>'; // step 3: Replace "Group name #2" by the your text
        }
    }, 99, 3);

    For the 2nd code snippet to work:

    1. In the Bundles admin, you need to sort the products by dragging and dropping them.
    2. Next, determine the ID of the first product in the group and replace it in the code snippet.
    3. Replace "Group name #1" with your text

    Screenshot: https://www.screencast.com/t/Qwsqxo8j7q

    Best regards,
    Henry N.

  •  2
    Lukas replied

    Thank you very much! That is exactly what I was looking for :)