• Resolved ShaOne

    (@shaone)


    Uncaught Error: Syntax error, unrecognized expression: .related .woocommerce-Price-amount >*,.related .from >*,.related .price >*,.related .total >*,.related .amount >*,.related  .bundle_price >

    When I view source it looks like this is the culprit:

    <div style="clear:both"></div><input type="hidden" id="_wpnonce" name="_wpnonce" value="a1580ecfae" /><input type="hidden" name="_wp_http_referer" value="/accessories/motorcycle/tracker/" />
    <button type='submit' name='add-to-cart'
    onmouseover=; onmouseout=; onload=; class='single_add_to_cart_button button alt gpls_rfq_set gpls_rfq_css'
    value='15446'>Add To Quote</button>
    <input type='hidden' value='-1' name='rfq_product_id' id='rfq_product_id'/>
    <input type='hidden' name='rfq_single_product' id='rfq_product_id'/><div class='gpls_script' style='display: none'><script> jQuery(document ).ready( function() {

    jQuery( '.related .woocommerce-Price-amount &gt;*,' +
    '.related .from &gt;*,' +
    '.related .price &gt;*,' +
    '.related .total &gt;*,' +
    '.related .amount &gt;*,' +
    '.related .bundle_price &gt;*').show();


    jQuery( '.related .woocommerce-Price-amount &gt;*,' +
    '.related .from &gt;*,' +
    '.related .price &gt;*,' +
    '.related .total &gt;*,' +
    '.related .amount &gt;*,' +
    '.related .bundle_price &gt;*').attr('style','visibility: visible !important;');

    jQuery( '.related .woocommerce-Price-amount &gt;*,' +
    '.related .from &gt;*,' +
    '.related .price &gt;*,' +
    '.related .total &gt;*,' +
    '.related .amount &gt;*,' +
    '.related .bundle_price &gt;*').attr('style','opacity: 1 !important;');


    jQuery( '.woocommerce-Price-amount,.from, .price,.total, .bundle_price,.wc-pao-col2,.wc-pao-subtotal-line, .product-selector__price' ).hide();
    jQuery( '.woocommerce-Price-amount,.from, .price,.total, .bundle_price,.wc-pao-col2,.wc-pao-subtotal-line, .product-selector__price' ).attr('style','visibility: collapse');

    jQuery( '.related .woocommerce-Price-amount &gt;*,' +
    '.related .from &gt;*,' +
    '.related .price &gt;*,' +
    '.related .total &gt;*,' +
    '.related .amount &gt;*,' +
    '.related .bundle_price &gt;*').show();


    jQuery( '.related .woocommerce-Price-amount &gt;*,' +
    '.related .from &gt;*,' +
    '.related .price &gt;*,' +
    '.related .total &gt;*,' +
    '.related .amount &gt;*,' +
    '.related .bundle_price &gt;*').attr('style','visibility: visible !important;');

    jQuery( '.related .woocommerce-Price-amount &gt;*,' +
    '.related .from &gt;*,' +
    '.related .price &gt;*,' +
    '.related .total &gt;*,' +
    '.related .amount &gt;*,' +
    '.related .bundle_price &gt;*').attr('style','opacity: 1 !important;');
    } ); </script></div>

    Something in the plugin’s code is causing the js greater than sign to be converted to html characters.

    Can you help with a fix for this?

    As it is preventing the behaviour of the add to quote and view list buttons from working correctly: and the subsequent page redirect.

    Thank you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support cyr61

    (@cyr61)

    Can you send us a link to the page where this is happening?

    Plugin Support cyr61

    (@cyr61)

    Also, is that the message in the JS console or the PHP error log?

    Plugin Support cyr61

    (@cyr61)

    Can you try 2.2.1 first?

    Thread Starter ShaOne

    (@shaone)

    Thank you for the suggestion. I have updated to 2.2.1 and still get the same error (it’s from the JS console). An example page I have setup is https://www.ccm-motorcycles.com/accessories/motorcycle/tracker/

    Plugin Support cyr61

    (@cyr61)

    Test it out by disable caching or using JS minifiers( exclude problem pages).

    Also have you overriden the add to quote template for “add to cart”?

    Plugin Support cyr61

    (@cyr61)

    found it. Fixed in 2.2.2

    Plugin Support cyr61

    (@cyr61)

    Have not heard back. Marking resolved.

    Thread Starter ShaOne

    (@shaone)

    Thanks for the 2.2.2 update that has fixed the JS console error 👍 However I’m still a little confused re the behaviour on the add to quote button:

    Currently when clicked it auto redirects to the cart page, this doesn’t seem right? I’d expect it to do nothing and be replaced by the view quote button, or at least redirect to the quote page—I don’t see any setting in the plugin to control/override this behaviour or am I missing something?

    Plugin Support cyr61

    (@cyr61)

    You must have redirect to cart checked ( in WooCommerce). WooCommerce is redirecting it to cart.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Javascript Error Being Introduced by Plugin’ is closed to new replies.