Home › Forums › WoodMart support forum › Frequently bought together before TABs hook
Frequently bought together before TABs hook
- This topic has 13 replies, 2 voices, and was last updated 10 months ago by
Hung Pham.
-
AuthorPosts
-
April 21, 2024 at 9:52 pm #559256
FreeRiderNSKParticipantHello!
I need Frequently bought together before TABs hook.
Please send me hook (filter) for function.php.Please see screenshot
-
This topic was modified 10 months, 2 weeks ago by
FreeRiderNSK.
Attachments:
You must be logged in to view attached files.April 22, 2024 at 5:37 pm #559545
FreeRiderNSKParticipantHello! Please help me 🙂
April 23, 2024 at 1:46 pm #559813
FreeRiderNSKParticipantHello!
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 10 months, 2 weeks ago by
FreeRiderNSK.
April 23, 2024 at 1:51 pm #559816
FreeRiderNSKParticipantAs I understand it, I need a hook for woodmart_after_product_tabs
April 25, 2024 at 6:21 am #560440
Hung PhamKeymasterHi 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,
April 25, 2024 at 1:45 pm #560618
FreeRiderNSKParticipantHello!
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!April 26, 2024 at 9:26 am #560903
Hung PhamKeymasterHi 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,
April 27, 2024 at 10:23 pm #561361
FreeRiderNSKParticipantHello!
It helped me! Thank you!April 27, 2024 at 11:31 pm #561368
FreeRiderNSKParticipantBut this is a bad solution, since CSS styles are violated… (((
April 28, 2024 at 1:01 pm #561425
Hung PhamKeymasterHi 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,
April 30, 2024 at 9:44 pm #562254
FreeRiderNSKParticipantHello!
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.May 1, 2024 at 10:36 am #562321
Hung PhamKeymasterHi 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,
May 1, 2024 at 11:21 am #562347
FreeRiderNSKParticipantHello!
It didn’t help, it looks bad.May 2, 2024 at 8:03 am #562539
Hung PhamKeymasterHi 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,
-
This topic was modified 10 months, 2 weeks ago by
-
AuthorPosts
- You must be logged in to create new topics. Login / Register