Estimated delivery visible in page archive product

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

  • Avatar: Redgall
    Andrea
    Participant
    March 6, 2025 at 18:17

    Hi,

    I added this to function.php to display the estimate in the product archive pages. It works but unfortunately if I insert a different range in a specific product, it is not displayed but what is set in the general estimated delivery settings page is always displayed. Any ideas to solve it?

    add_filter(‘woocommerce_get_price_html’, ‘add_estimated_delivery_to_price’, 99, 2);

    function add_estimated_delivery_to_price($price, $product) {
    if (is_shop() || is_product_category() || is_product_tag()) { // Only in the shop and categories page
    $price .= ‘

    ‘ . do_shortcode(‘[etheme_sales_booster_estimated_delivery]’) . ‘

    ‘;
    }
    return $price;
    }

    Files is visible for topic creator and
    support staff only.
    10 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    March 7, 2025 at 15:50

    Dear Andrea,

    We hope you are doing well.

    Could you kindly provide temporary WP-Admin access? We need to review your settings.

    To grant access, please create a new user account with an administrator role via your WordPress Dashboard. Once the account has been set up, you may securely share the username and password with us through the designated Private Content section.

    Thank you for your cooperation. Should you have any questions, please feel free to reach out.

    Best regards,
    8Theme Team

    Avatar: Redgall
    Andrea
    Participant
    March 7, 2025 at 17:04

    set credentials, thanks

    Please contact administrator
    for this information.
    Avatar: Redgall
    Andrea
    Participant
    March 9, 2025 at 14:00

    but i have to wait more days just to have an answer if it is possible or not?

    Avatar: Justin
    Luca Rossi
    Support staff
    March 10, 2025 at 15:56

    Dear Andrea,

    We apologize for the delayed response, as it was the weekend.

    Please note that replying to your own topics will move them to the bottom of the queue.

    Regarding your inquiry, the shortcode you are using displays the global settings for Estimated Delivery. Instead, please try using the following code:

    
    add_filter('woocommerce_get_price_html', 'add_estimated_delivery_to_price', 999, 2);
    function add_estimated_delivery_to_price($price, $product) {
        if (is_shop() || is_product_category() || is_product_tag()) { // Only in the shop and categories page
    
            ob_start();
            add_filter('etheme_sales_booster_estimated_delivery', '__return_true');
            $estimated_delivery = \Etheme_Sales_Booster_Estimated_Delivery::get_instance();
            $estimated_delivery->init($product);
            $estimated_delivery->args['in_quick_view'] = true;
            $estimated_delivery->add_actions();
            $original_tag = $estimated_delivery->args['tag'];
            $estimated_delivery->args['tag'] = 'div';
            $estimated_delivery->output();
            $estimated_delivery->args['tag'] = $original_tag;
            remove_filter('etheme_sales_booster_estimated_delivery', '__return_true');
            $estimate = ob_get_clean();
    
            $price .= $estimate;
        }
        return $price;
    }
    

    We hope this helps. Please let us know if you need any further assistance.

    Best regards,
    8Theme Team

    Avatar: Redgall
    Andrea
    Participant
    March 10, 2025 at 16:45

    Perfect, but I don’t see it on https://mydomain.com/shop/brand/apple/

    Avatar: Justin
    Luca Rossi
    Support staff
    March 11, 2025 at 07:11

    Hi @Andrea,

    We’ve updated the custom code a little bit:

    
    add_filter('woocommerce_get_price_html', 'add_estimated_delivery_to_price', 999, 2);
    function add_estimated_delivery_to_price($price, $product) {
        if (is_tax('brand') || is_shop() || is_product_category() || is_product_tag()) { // Only in the shop and categories page
    
            ob_start();
            add_filter('etheme_sales_booster_estimated_delivery', '__return_true');
            $estimated_delivery = \Etheme_Sales_Booster_Estimated_Delivery::get_instance();
            $estimated_delivery->init($product);
            $estimated_delivery->args['in_quick_view'] = true;
            $estimated_delivery->add_actions();
            $original_tag = $estimated_delivery->args['tag'];
            $estimated_delivery->args['tag'] = 'div';
            $estimated_delivery->output();
            $estimated_delivery->args['tag'] = $original_tag;
            remove_filter('etheme_sales_booster_estimated_delivery', '__return_true');
            $estimate = ob_get_clean();
    
            $price .= $estimate;
        }
        return $price;
    }
    

    Hope it helps!

    Avatar: Redgall
    Andrea
    Participant
    March 11, 2025 at 12:29

    No it doesn’t work yet. If it helps I’m using Brand XStore. Also it’s not visible in the “New Arrivals” carousel products. I think a code that includes everything and provides for exclusion if needed could be useful

    Avatar: Justin
    Luca Rossi
    Support staff
    March 11, 2025 at 16:25

    Hi @Andrea,

    In this case, please remove the If condition in the custom code:

    if (is_tax('brand') || is_shop() || is_product_category() || is_product_tag()) { // Only in the shop and categories page

    For any additional customizations beyond the default functionalities, we kindly invite you to submit a request through our Customization Panel at https://www.8theme.com/account/#etheme_customization_panel. Please note that customization services are subject to additional charges.

    Should you have any further questions or require assistance, please do not hesitate to contact us.

    Best regards,
    8Theme’s Team

    Avatar: Redgall
    Andrea
    Participant
    March 11, 2025 at 18:42

    I understand, but since you insert a function you make it so that it is used within the entire site or else its functionality is limited and you must indicate this in the instructions before purchasing. Anyway, thanks.

    Avatar: Justin
    Luca Rossi
    Support staff
    March 12, 2025 at 06:46

    Dear @Andrea,

    Thank you for your feedback. We appreciate your understanding. Our team continuously strives to improve our products and provide clear instructions. We will take your suggestion into consideration for future enhancements.

    If you have any further questions or require assistance, please feel free to reach out.

    Best regards,
    8Theme’s Team

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

The issue related to '‘Estimated delivery visible in page archive product’' 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.