Custom product badges assigned to xstore hooks

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

  • Avatar: TheOne
    TheOne
    Participant
    December 8, 2023 at 17:16

    Hello,

    I’m adding some product badges to my store. I’ve assigned some badges to a hook: woocommerce_before_shop_loop_item

    This displays them on product archive.

    Can you explain to me what hook should i use for my sliders on my home page and single product builder (elementor) ?

    For product page i’ve tried (but it doesn’t work):

    woocommerce_before_single_product_summary – doesn’t work
    woocommerce_single_product_summary – doesn’t work

    I did find this but not sure if it’s still valid: https://www.8theme.com/topic/trying-to-add-some-extra-code/

    3 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    December 11, 2023 at 09:41

    Dear TheOne,

    We hope this message finds you well.

    1. We kindly request that you implement the following hook for the product slider on the homepage:

    
    add_action( 'after_etheme_product_grid_list_product_element_title', 'medikoel_show_custom_labels_shop_loop', 5 );
    

    2. For the display of product images on the single product page, please proceed with the integration of this hook:

    
    add_action( 'etheme_before_single_product_image', 'medikoel_show_custom_labels_single_product', 5 );
    

    We would greatly appreciate it if you could inform us of the outcome upon completion of these adjustments.

    Best regards,
    8Theme’s Team

    Avatar: TheOne
    TheOne
    Participant
    December 11, 2023 at 11:22

    Hello,

    We have some problems.

    1. Single product page hook: it displays the badges between the product image and thumbnails.

    1.1 It displays the badge above the product image. Can we have it on the image or bellow/above the product title?

    2. Product slider hook: it displays it bellow the product image. Can we have a hook for the top?

    Edit: i see now that this applys everywhere: badges are not placed on product image but outside.

    Please contact administrator
    for this information.
    Avatar: Justin
    Luca Rossi
    Support staff
    December 11, 2023 at 12:47

    Dear TheOne,

    We would like to inform you that currently, we have a limited selection of hooks available for use on the single product page. The available hooks are as follows:

    
    - etheme_before_single_product_image
    - etheme_after_single_product_image
    - etheme_woocommerce_template_single_title
    - etheme_woocommerce_template_single_rating
    - etheme_woocommerce_template_single_price
    - etheme_woocommerce_template_single_excerpt
    - etheme_woocommerce_template_single_add_to_cart
    - etheme_woocommerce_template_single_meta
    - etheme_woocommerce_template_woocommerce_breadcrumb
    - woocommerce_share
    - etheme_woocommerce_template_single_sharing
    - etheme_woocommerce_show_product_images
    - etheme_woocommerce_output_product_data_tabs
    - etheme_woocommerce_output_upsell_products
    - etheme_woocommerce_output_cross_sells_products
    - etheme_woocommerce_output_related_products
    - etheme_product_single_size_guide
    - etheme_product_single_button
    - etheme_product_single_widget_area_01
    - etheme_product_single_custom_html_01
    - etheme_product_single_custom_html_02
    - etheme_product_single_custom_html_03
    - etheme_product_single_additional_custom_block
    - etheme_product_single_product_description
    - etheme_product_single_wishlist
    - etheme_product_single_compare
    

    We recommend that you experiment with each hook individually and integrate them with the custom CSS codes as needed.

    Furthermore, to ensure that the custom badges are displayed exclusively on the homepage, please incorporate the is_front_page() condition into your implementation. For a comprehensive understanding of this function, you may refer to the following article: [is_front_page() Function Documentation](https://developer.wordpress.org/reference/functions/is_front_page/).

    Should you require any further assistance or clarification, please do not hesitate to reach out to us.

    Best regards,
    The 8Theme Team

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

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

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