Public Ticket #3615055

Request a quote

Closed
Comments
8 Tickets 3
Juan started the conversation 3 years ago on March 26, 2024 at 12:53pm

Good day,

For some reason, when I click on the "request a custom quote" on the cart page, nothing happens, the form doesn't validate neither does it submit.

If I use the shortcode on another page, it submits just fine.

I am using the Hello Elementor theme.

Can you please advise?

2,762
KingsPlugins replied 3 years ago on March 26, 2024 at 1:37pm

Hi Juan,

Normally clicking that button should open up a quote request form.


I believe there's probably a JavaScript error on the site, preventing our scripts from working correctly. It may be related to the issue you described in the other ticket.

Would it be possible to share a backend access to your staging site, so we could investigate this directly? We'd like to troubleshoot and get this resolved for you as soon as possible,


Kind regards,

Stefan

2,762
KingsPlugins replied 2 years ago on April 8, 2024 at 8:16am

Thank you, that worked now,

It seems that on that cart page the buttons were showing twice (once in a hidden panel), which was affecting the scripts.


To solve this, I have added a PHP code snippet to the site, to the "code snippets" plugin which I installed.

For future reference the code is:

add_action('wp_head', function(){
    ?>
    <script>
    jQuery(document).ready(function(){
        jQuery('.shopengine > #b2bking_request_custom_quote_button').remove();
        jQuery('.shopengine > #b2bking_request_custom_quote_textarea_abovetext').remove();
        jQuery('.shopengine > #b2bking_request_custom_quote_textarea').remove();
        jQuery('.shopengine > #b2bking_before_quote_request_button').remove();
        jQuery('.shopengine > #b2bking_quote_required_ids').remove();
        jQuery('.shopengine > #b2bking_quote_text_ids').remove();
        jQuery('.shopengine > .b2bking_custom_quote_field_container').remove();
        jQuery('.shopengine > .b2bking_add_cart_to_purchase_list_button').remove();
    });
    </script>
    <?php
});

After adding this, I tested and I believe the issue is resolved. Let me know if you see any further issues,


Kind regards,

Stefan

Sign In