Add more informations in ajax tabs products

This topic has 14 replies, 2 voices, and was last updated 8 months, 4 weeks ago ago by Luca Rossi

  • Avatar: Caroline
    Caroline
    Participant
    March 19, 2024 at 10:07

    Like in my previous request I would like to add infos in the product grid on the page with the link in the private area.
    Is there a hook for that too? Or how can I do it?
    Thanks a lot for your answer

    Caroline

    Please, contact administrator
    for this information.
    13 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    March 19, 2024 at 12:30

    Dear Caroline,

    We suggest that you consider utilizing the following hooks for your implementation:

    – et_after_shop_loop_title
    – woocommerce_after_shop_loop_item

    We trust that this will be of assistance to you.

    Kind regards,
    The 8Theme Team

    Avatar: Caroline
    Caroline
    Participant
    March 19, 2024 at 12:54

    Hi i tried both but it’s not working, obviously I did something wrong again, sorry for that

    Avatar: Justin
    Luca Rossi
    Support staff
    March 19, 2024 at 13:45

    Hi @Caroline,

    Sorry for the confusion!

    The correct hooks should be:

    
    add_action('woocommerce_before_shop_loop_item', 'woocommerce_after_shop_loop_item');
    function woocommerce_after_shop_loop_item(){
    	echo'<div class="flex-chiffres chiffres">';
    	echo '<div class="assis">'.get_field('assis').'<span>assis</span> </div>';
    	echo '<div class="cocktail">'.get_field('cocktail').'<span>cocktail</span></div>';
    	echo '<div class="conference">'.get_field('conference').'<span>conference</span> </div>';
    	echo'</div>';
    }
    

    Kind regards,
    The 8Theme Team

    Avatar: Caroline
    Caroline
    Participant
    March 19, 2024 at 13:51

    Thank you and if I want it to appear after the title ?

    Avatar: Justin
    Luca Rossi
    Support staff
    March 19, 2024 at 13:59

    Hi @Caroline,

    So the hook should be:

    
    woocommerce_after_shop_loop_item
    

    Kind regards,
    The 8Theme Team

    Avatar: Caroline
    Caroline
    Participant
    March 19, 2024 at 15:27

    with this code i’ve got the result in the image attached. I would like it to appear after the title

    Files is visible for topic creator and
    support staff only.
    Avatar: Justin
    Luca Rossi
    Support staff
    March 20, 2024 at 05:15

    Hi @Caroline,

    Sorry for the confusion!

    We meant this hook: woocommerce_after_shop_loop_item

    Kind regards,
    The 8Theme Team

    Avatar: Caroline
    Caroline
    Participant
    March 20, 2024 at 06:59

    Sorry again, I got nothing with that code
    add_action(‘woocommerce_after_shop_loop_item’, ‘woocommerce_after_shop_loop_item’);
    function woocommerce_after_shop_loop_item(){
    echo’

    ‘;
    echo ‘

    ‘.get_field(‘assis’).’assis

    ‘;
    echo ‘

    ‘.get_field(‘cocktail’).’cocktail

    ‘;
    echo ‘

    ‘.get_field(‘conference’).’conference

    ‘;
    echo’

    ‘;
    }

    Avatar: Justin
    Luca Rossi
    Support staff
    March 20, 2024 at 07:26

    Hi @Caroline,

    We’ve switched back the custom codes to this:

    
    add_action('woocommerce_before_shop_loop_item', 'woocommerce_after_shop_loop_item');
    function woocommerce_after_shop_loop_item(){
    	echo'<div class="flex-chiffres chiffres">';
    	echo '<div class="assis">'.get_field('assis').'<span>assis</span> </div>';
    	echo '<div class="cocktail">'.get_field('cocktail').'<span>cocktail</span></div>';
    	echo '<div class="conference">'.get_field('conference').'<span>conference</span> </div>';
    	echo'</div>';
    }
    

    And also add this custom CSS under Theme Options > Theme Custom CSS > Global CSS:

    
    .et-advance-product-tabs .content-product {
        display: flex;
        flex-direction: column;
    }
    
    .et-advance-product-tabs .content-product .flex-chiffres.chiffres {
        order: 3;
    }
    

    Can you please check again?

    Kind regards,
    The 8Theme Team

    Files is visible for topic creator and
    support staff only.
    Avatar: Caroline
    Caroline
    Participant
    March 20, 2024 at 08:02

    Thank you

    Avatar: Justin
    Luca Rossi
    Support staff
    March 20, 2024 at 09:49

    You’re most welcome!

    Kind regards,
    The 8Theme Team

    Avatar: Caroline
    Caroline
    Participant
    March 25, 2024 at 12:40

    Hi I’m sorry but finally I want the infos to display after the image, is that possible?

    Avatar: Justin
    Luca Rossi
    Support staff
    March 25, 2024 at 12:48

    Hi @Caroline,

    With current product structure, please also add this custom CSS:

    
    .infos {
    order: 2;
    }
    

    https://prnt.sc/3S00QxHgCgqB

    Hope it helps!

  • Viewing 14 results - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.