Single product builder hooks for custom taxonomy

This topic has 5 replies, 3 voices, and was last updated 1 years, 3 months ago ago by Farcela

  • Avatar: Farcela
    Farcela
    Participant
    January 10, 2023 at 11:54

    Hi there,

    I’ve added a custom taxonomy in functions.php and I’m trying to find the right hook to display the taxonomy at the desired place. I’ve tried the following hooks but without success:

    etheme_woocommerce_template_single_add_to_cart:
    https://prnt.sc/hAtqTW2PgQ1_

    woocommerce_single_variation:
    https://prnt.sc/ti01v8IAhJ3b

    woocommerce_before_add_to_cart_quantity:
    https://prnt.sc/TktVfkBPTu19

    The custom taxonomy text is shown in red rectangle and the desired place = where the blue arrow is pointing at (between woocommerce-variation-availability and woocommerce-variation-add-to-cart variations_button woocommerce-variation-add-to-cart-enabled).

    Regards

    4 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 10, 2023 at 14:40

    Hello,

    We changed hook to the next one -> ‘woocommerce_before_add_to_cart_button’ https://prnt.sc/xmNVYIGVVm9t
    We changed your custom CSS -> https://prnt.sc/wWSlKwFi3B-F
    Results: https://prnt.sc/UQry00-w1r_2 , https://prnt.sc/IuGLj_nR1gJg
    Is that ok for you or do you need to place it somewhere else ?

    Regards

    Avatar: Farcela
    Farcela
    Participant
    January 10, 2023 at 15:51

    Hello,

    Yes thanks that’s the right place!

    The only thing is that on smaller devices the taxonomy text appears in the middle instead of at the left side (it seems to happen only to pages with simple products, @variable product pages it appears at the right place).

    Page with issue:
    https://prnt.sc/4zGA_y7bDOt6

    Page without issue:
    https://prnt.sc/C6J83MF86-Vw

    By adding “width: 100%;” line to the custom CSS code it seems to solve the issue, but I’m not sure if that’s the correct line of code to add.

    Can you confirm this?

    Regards

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    January 11, 2023 at 05:15

    Hello, @Farcela,

    Yes, please try with this code, please copy and paste the below given CSS code to XStore >> Theme Settings >> Theme Custom CSS >> Global CSS and check back to your site after removing the browser cache.

    .single-product-builder .et_product-block form.cart .taxonomy_levertijd.langer-dan-7-werkdagen {
        width: 100% !important;
    }

    Regards 8Themes Team.

    Avatar: Farcela
    Farcela
    Participant
    January 12, 2023 at 11:06

    Thank you!

    Everything works fine now. +

    Regards

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

The issue related to '‘Single product builder hooks for custom taxonomy’' has been successfully resolved, and the topic is now closed for further responses

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