Malfunctioned
-
Hi, plugin is active and is not working. When I checked console its firing too many errors. That is why its not working properly.
The page I need help with: [log in to see the link]
-
Its firing too many errors, which are as follows:
Uncaught Error: Document is ready and element #woo_pp_ec_button_cart does not exist
at dom.js:123
logger.js:63 ppxo_unhandled_error Object
print @ logger.js:63
exceptions.js:22 Uncaught Error: Document is ready and element #woo_pp_ec_button_cart does not exist
at dom.js:123
component.jsx:774 Uncaught Error: Document is ready and element #woo_pp_ec_button_cart does not exist
at dom.js:109
at new ZalgoPromise (promise.js:41)
at elementReady (dom.js:99)
at ParentComponent.elementReady (index.js:632)
at index.js:136
at Function.ZalgoPromise.try (promise.js:400)
at index.js:134
at Function.ZalgoPromise.try (promise.js:400)
at ParentComponent.tryInit (index.js:1282)
at ParentComponent.render (index.js:124)
logger.js:63 ppxo_unhandled_error Object
print @ logger.js:63
exceptions.js:22 Uncaught Error: Document is ready and element #woo_pp_ec_button_cart does not exist
at dom.js:109
at new ZalgoPromise (promise.js:41)
at elementReady (dom.js:99)
at ParentComponent.elementReady (index.js:632)
at index.js:136
at Function.ZalgoPromise.try (promise.js:400)
at index.js:134
at Function.ZalgoPromise.try (promise.js:400)
at ParentComponent.tryInit (index.js:1282)
at ParentComponent.render (index.js:124)Hi @avaiskhatri
This issue is caused by a theme or plugin conflict. Try switching back to a default theme like Twenty Nineteen and disable all plugins except for WooCommerce and PayPal Checkout to see if this resolves the issue.
If so, then re-enable each one at a time until you find the one that’s causing the conflict.
@johndcoy
Hi, I have already switched to default theme and only WooCommerce and PayPal Checkout plugin are active but the problem is still there.On product page & cart page “PayPal” Button appears but on checkout page “PayPal” button doesn’t even appear.
On clicking PayPal button on product and cart page, this error appears “PayPal error (10605): An error (10605) occurred while processing your PayPal payment. Please contact the store owner for assistance.”
On checkout page, apparently no error appears but on checking console too many errors appears.
For testing I have set the scenario on this website:
https://armapparels.comand the pages are :
https://armapparels.com/cart/
https://armapparels.com/checkout/@johndcoy I am still waiting for the help.
Hi @avaiskhatri,
A 10605 PayPal error means that the currency you are suing is unsupported by PayPal itself. Here’s more information about that error code in PayPal’s docs here: https://developer.paypal.com/docs/classic/api/errors/#10600-to-10699
Here’s the list of currencies that are supported by PayPal: https://help.sharetribe.com/sharetribe-go-payments-and-transactions/online-payments-with-paypal/countries-and-currencies-supported-by-paypal
I hope that helps!
We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.
Hi, the error was removed when I changed the currency to USD, but now no button is appearing on either cart page, checkout page.
@yukikatayama , @htdat, @johndcoy
I have figured that this was happening because only Papyal express checkout was enable. So when I turned of checkout option from product and cart page, Place order button was appearing at checkout page.
Now the issue is that my default currency is QAR, for that I have added QAR in paypal currecny list using this code.
add_filter('woocommerce_currency_symbol', 'add_qar_currency_symbol', 10, 2); function add_qar_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case 'QAR': $currency_symbol = 'QAR'; break; } return $currency_symbol; } add_filter( 'woocommerce_paypal_supported_currencies', 'add_qar_paypal_valid_currency' ); function add_qar_paypal_valid_currency( $currencies ) { array_push ( $currencies , 'QAR' ); return $currencies; }
And coverting usd to qar using this function
add_filter('woocommerce_paypal_args', 'convert_qar_to_usd', 11 ); function get_currency($from, $to){ $from = "USD"; $to = "QAR"; // create curl resource $ch = curl_init(); // set url curl_setopt($ch, CURLOPT_URL, "https://free.currencyconverterapi.com/api/v5/convert?q={$from}_{$to}&compact=ultra"); //return the transfer as a string curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // $output contains the output string $output = curl_exec($ch); // close curl resource to free up system resources curl_close($ch); $data = explode(':', $output); $data = explode(" ", $data[1]); $amnt = round($data[0], 2); return $amnt; } function convert_qar_to_usd($paypal_args){ if ( $paypal_args['currency_code'] == 'QAR'){ $convert_rate = get_currency(); //Set converting rate $paypal_args['currency_code'] = 'USD'; //change AED to USD $i = 1; while (isset($paypal_args['amount_' . $i])) { $paypal_args['amount_' . $i] = round( $paypal_args['amount_' . $i] / $convert_rate, 2); ++$i; } if ( $paypal_args['shipping_1'] > 0 ) { $paypal_args['shipping_1'] = round( $paypal_args['shipping_1'] / $convert_rate, 2); } if ( $paypal_args['discount_amount_cart'] > 0 ) { $paypal_args['discount_amount_cart'] = round( $paypal_args['discount_amount_cart'] / $convert_rate, 2); } if ( $paypal_args['tax_cart'] > 0 ) { $paypal_args['tax_cart'] = round( $paypal_args['tax_cart'] / $convert_rate, 2); } } return $paypal_args; }
But its still showing currency problem. Please look into the problem.
Hi @avaiskhatri,
Thanks for providing more info.
From what you described in the last reply, the issue itself is from your customization code.
That being said, we’re not able to help with debugging your code. For assistance with customization or development with your site, we recommend reaching out to someone on our [Customizations Page](https://woocommerce.com/customizations/), Codeable may be a good choice for your need.
- The topic ‘Malfunctioned’ is closed to new replies.