Home Forums WoodMart support forum Frequently bought together before TABs hook

Frequently bought together before TABs hook

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #559256

    FreeRiderNSK
    Participant

    Hello!
    I need Frequently bought together before TABs hook.
    Please send me hook (filter) for function.php.

    Please see screenshot

    • This topic was modified 1 week, 5 days ago by FreeRiderNSK.
    Attachments:
    You must be logged in to view attached files.
    #559545

    FreeRiderNSK
    Participant

    Hello! Please help me 🙂

    #559813

    FreeRiderNSK
    Participant

    Hello!
    I tried the code but it doesn’t work for me (((

    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
    add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 5 );

    Please help

    • This reply was modified 1 week, 3 days ago by FreeRiderNSK.
    #559816

    FreeRiderNSK
    Participant

    As I understand it, I need a hook for woodmart_after_product_tabs

    #560440

    Hung Pham
    Keymaster

    Hi FreeRiderNSK,

    Thanks for reaching to us and appreciate your patience.

    I kindly recommend you to build Custom Single Product layout, then you can re-order product content positions without using Custom PHP code.

    Regards,

    #560618

    FreeRiderNSK
    Participant

    Hello!
    I don’t want to use layouts.
    Maybe in the next update you will add the ability to use a hook for this?
    It will be logical!

    #560903

    Hung Pham
    Keymaster

    Hi FreeRiderNSK,

    Please try to add the code below in the functions.php file in your child theme.

    add_action( 'init', function () {
        remove_action( 'woodmart_after_product_tabs', array( XTS\Modules\Frequently_Bought_Together\Frontend::get_instance(), 'get_bought_together_products' ) );
        add_action( 'woocommerce_after_single_product_summary', array( XTS\Modules\Frequently_Bought_Together\Frontend::get_instance(), 'get_bought_together_products' ), 5 );
    } );

    Regards,

    #561361

    FreeRiderNSK
    Participant

    Hello!
    It helped me! Thank you!

    #561368

    FreeRiderNSK
    Participant

    But this is a bad solution, since CSS styles are violated… (((

    #561425

    Hung Pham
    Keymaster

    Hi FreeRiderNSK,

    Above code did not affect to CSS, it just helped you to re-order sections only. It looked well on my end, please double check https://prnt.sc/SMqiwd3lpJJK

    Regards,

    #562254

    FreeRiderNSK
    Participant

    Hello!
    I added global custom CSS

    .product-tabs-wrapper .wd-fbt-wrap {
        padding-bottom: var(--wd-single-spacing);
        border-bottom: 1px solid var(--brdcolor-gray-300);
    }
    @media (max-width: 1024px) {
        .product-tabs-wrapper .wd-fbt-wrap {
            border-top:none
        }
    }

    But it still doesn’t look right.
    The border is not full width.
    Look at the screenshot.

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

    Hung Pham
    Keymaster

    Hi FreeRiderNSK,

    The border bottom reflects to container’s width https://prnt.sc/oMp4MCOkGGM0

    In order to use full-width, please add the following Custom CSS code to Theme Settings > Custom CSS > Global Custom CSS:

    .single-product .container {
        max-width: 100%
    }

    Regards,

    #562347

    FreeRiderNSK
    Participant

    Hello!
    It didn’t help, it looks bad.

    #562539

    Hung Pham
    Keymaster

    Hi FreeRiderNSK,

    Because the border inherits width of product content, so in order to display full-width, you need to stretch its container’s width as well.

    Regards,

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