Add YITH Request a Quote Basket Link to Off-Canvas Mini-Cart

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

  • Avatar: Abdulaziz
    Abdulaziz
    Participant
    April 8, 2025 at 07:25

    Hello XStore Team,

    I hope this message finds you well.

    I am using your XStore theme along with the “YITH WooCommerce Request a Quote” plugin.

    Currently, the button or link related to the quote basket (provided by the YITH plugin, e.g., “Browse the list” or “View Quote Basket”) is visible on the single product page, which is working fine.

    However, I would like to also display a button to access the quote basket/page directly within the theme’s off-canvas mini-cart (the side panel cart).

    Specifically, I want to place this “Request a Quote basket” button right below (or next to) the standard ‘View Cart’ and/or ‘Checkout’ buttons that already exist in the off-canvas mini-cart panel (as seen in the standard cart functionality).

    Could you please provide the necessary CSS and/or PHP code snippet, or guide me on the correct theme hook or template file to modify, in order to add this YITH Request a Quote basket link/button into the XStore off-canvas mini-cart structure?

    Thank you for your excellent theme and your support!

    Best regards,

    Files is visible for topic creator and
    support staff only.
    3 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    April 8, 2025 at 13:04

    Hi @Abdulaziz,

    You can try with the following code, if will add the request a quote link next to the price:

    
    add_filter('woocommerce_cart_item_price', 'n2t_woocommerce_cart_item_price');
    function n2t_woocommerce_cart_item_price($price, $cart_item, $cart_item_key) {
        $request_quote_button  = 'Your button go here';
        return $price . $request_quote_button;
    }
    

    For more information, please take a look at this document: https://docs.yithemes.com/yith-woocommerce-request-a-quote/

    Hope it helps!

    Avatar: Abdulaziz
    Abdulaziz
    Participant
    April 9, 2025 at 06:31

    Hello XStore Team,
    I am trying to get the “Add to Quote” button from the “YITH WooCommerce Request a Quote” plugin to work correctly inside the XStore Quick View popup.
    I was able to display the button’s HTML using the woocommerce_after_add_to_cart_button hook inside the Quick View content. However, the button’s JavaScript functionality (adding the product to the quote list via AJAX, changing the button state) does not seem to work within the Quick View context.
    This suggests that the YITH plugin’s JavaScript might not be initializing correctly after the Quick View content is loaded via AJAX.
    Could you please advise on:
    Does the XStore Quick View specifically load/enqueue JavaScript files from third-party plugins like YITH Request a Quote?
    Is there a specific JavaScript event that XStore triggers after the Quick View content has been successfully loaded and inserted into the DOM? (e.g., something like $(document.body).trigger(‘xstore_quick_view_loaded’);)
    Knowing this event would allow me to potentially re-initialize the YITH JavaScript manually for the Quick View content.
    Thank you for your help!

    Avatar: Justin
    Luca Rossi
    Support staff
    April 9, 2025 at 07:58

    Dear @Abdulaziz,

    We hope this message finds you well.

    Please find below the trigger you requested:

    
    jQuery(document).on('etheme_quick_view_content_loaded', function(){
        // Your code here
    });
    

    We hope this information is helpful. Should you have any further questions or need additional assistance, please do not hesitate to reach out.

    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

Helpful Topics

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