Compatibility with PluginRepublic WooCommerce Product Add-Ons Ultimate
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from cezzvk on October 4, 2021, 10:24Hello. I've tried to solve the problem compatibility with PluginRepublic WooCommerce Product Add-Ons Ultimate by myself with this article https://currency-switcher.com/codex/#compatibility , but I had no results( Can you help me please? What do you need from me?
Hello. I've tried to solve the problem compatibility with PluginRepublic WooCommerce Product Add-Ons Ultimate by myself with this article https://currency-switcher.com/codex/#compatibility , but I had no results( Can you help me please? What do you need from me?
Quote from Pablo Borysenco on October 4, 2021, 10:45Hello
Please drop me wp-admin+FTP access - https://share.pluginus.net/image/i20210618130558.png - https://share.pluginus.net/image/i20210618130637.png I will check it
Hello
Please drop me wp-admin+FTP access - https://share.pluginus.net/image/i20210618130558.png - https://share.pluginus.net/image/i20210618130637.png I will check it
Quote from Pablo Borysenco on October 4, 2021, 13:29Ok! Thank you
I added this plugin to the adaptation queue. we will check the relevance of the article
Ok! Thank you
I added this plugin to the adaptation queue. we will check the relevance of the article
Quote from cezzvk on October 5, 2021, 11:13Hello) I have the error when i trying add product to cart http://joxi.ru/nAyzonySgzgbbr
Help me please. Credentials are the same
Hello) I have the error when i trying add product to cart http://joxi.ru/nAyzonySgzgbbr
Help me please. Credentials are the same
Quote from cezzvk on October 5, 2021, 11:22This product https://www.rangeful.com/product/spear-2000-v4g-h-2-band-gsm-repeater/
This product https://www.rangeful.com/product/spear-2000-v4g-h-2-band-gsm-repeater/
Quote from Pablo Borysenco on October 5, 2021, 12:12Hello
Please do a test
Hello
Please do a test
Quote from cezzvk on October 5, 2021, 13:14Now is good) thanks, but in cart products have wrong currency rate, help please)
Now is good) thanks, but in cart products have wrong currency rate, help please)
Quote from Pablo Borysenco on October 6, 2021, 09:21Hello
Please disable third party plugins that affect the price and do a test
Hello
Please disable third party plugins that affect the price and do a test
Quote from cezzvk on October 6, 2021, 13:52I suppose, that is the Addons plugin(PluginRepublic WooCommerce Product Add-Ons Ultimate).
I wrote this code in functions.phpfunction pewc_get_multicurrency_price( $price, $item, $product ) { // Compatibility with WooCommerce multilingual $price = apply_filters( 'wcml_raw_price_amount', $price ); if( class_exists('WOOCS') ) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $price = $WOOCS->woocs_exchange_value( floatval( $price ) ); } } return $price; } add_filter( 'pewc_filter_field_price', 'pewc_get_multicurrency_price', 10, 3 ); add_filter( 'pewc_filter_option_price', 'pewc_get_multicurrency_price', 10, 3 );And this work fine on the product page, but in the cart is wrong. Can you help me please) Thank you!
I suppose, that is the Addons plugin(PluginRepublic WooCommerce Product Add-Ons Ultimate).
I wrote this code in functions.php
function pewc_get_multicurrency_price( $price, $item, $product ) { // Compatibility with WooCommerce multilingual $price = apply_filters( 'wcml_raw_price_amount', $price ); if( class_exists('WOOCS') ) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $price = $WOOCS->woocs_exchange_value( floatval( $price ) ); } } return $price; } add_filter( 'pewc_filter_field_price', 'pewc_get_multicurrency_price', 10, 3 ); add_filter( 'pewc_filter_option_price', 'pewc_get_multicurrency_price', 10, 3 );
And this work fine on the product page, but in the cart is wrong. Can you help me please) Thank you!
Quote from Pablo Borysenco on October 7, 2021, 10:08Hello
Ok! Great! And as I wrote earlier, this plugin is in the queue for adaptation - https://share.pluginus.net/image/i20211007110740.png
I will write to you as soon as we get the result
Hello
Ok! Great! And as I wrote earlier, this plugin is in the queue for adaptation - https://share.pluginus.net/image/i20211007110740.png
I will write to you as soon as we get the result
Quote from cezzvk on October 8, 2021, 14:59Hello!
I have 2 questions:
1. Could you recommend any compatible Plugin with Add-Ons which we could try right now?
2. How long is the queue for adaptation? How much time +/- we should wait for this?
Hello!
I have 2 questions:
1. Could you recommend any compatible Plugin with Add-Ons which we could try right now?
2. How long is the queue for adaptation? How much time +/- we should wait for this?
Quote from Pablo Borysenco on October 8, 2021, 19:52Hello
Please do a test
now everything seems to work, except for this line - https://c2n.me/4dBjUvV.png - i added code to remove this
in file - \wp-content\plugins\product-extras-for-woocommerce\inc\functions-cart.php - add code - https://share.pluginus.net/image/i20211008204831.png
if (class_exists('WOOCS')) {
global $WOOCS;if ($WOOCS->is_multiple_allowed) {
$price = $WOOCS->woocs_exchange_value(floatval($price));
}
}
add code - https://share.pluginus.net/image/i20211008204919.png
if (class_exists('WOOCS') AND $price) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$price = $price / $rate;
}
}
}and add code - https://share.pluginus.net/image/i20211008205004.png
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed AND isset($cart_item_data['product_extras']['price_with_extras'])) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$cart_item_data['product_extras']['price_with_extras'] = $cart_item_data['product_extras']['price_with_extras'] / $rate;
}
}
}add code - https://share.pluginus.net/image/i20211008205043.png
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$cart_item_data['product_extras']['price_with_extras_discounted'] = $cart_item_data['product_extras']['price_with_extras_discounted'] / $rate;
}
}
}add code - https://share.pluginus.net/image/i20211008205232.png
if (class_exists('WOOCS') AND $item['price']) {
global $WOOCS;if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$item['price'] = $rate * $item['price'];
}
}
$item['value'] = preg_replace('/\((.+)\)/', "", $item['value']);//$item['value'] .= sanitize_text_field("(" . wc_price($item['price']) . ")");
}
Hello
Please do a test
now everything seems to work, except for this line - https://c2n.me/4dBjUvV.png - i added code to remove this
in file - \wp-content\plugins\product-extras-for-woocommerce\inc\functions-cart.php - add code - https://share.pluginus.net/image/i20211008204831.png
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$price = $WOOCS->woocs_exchange_value(floatval($price));
}
}
add code - https://share.pluginus.net/image/i20211008204919.png
if (class_exists('WOOCS') AND $price) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$price = $price / $rate;
}
}
}
and add code - https://share.pluginus.net/image/i20211008205004.png
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed AND isset($cart_item_data['product_extras']['price_with_extras'])) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$cart_item_data['product_extras']['price_with_extras'] = $cart_item_data['product_extras']['price_with_extras'] / $rate;
}
}
}
add code - https://share.pluginus.net/image/i20211008205043.png
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$cart_item_data['product_extras']['price_with_extras_discounted'] = $cart_item_data['product_extras']['price_with_extras_discounted'] / $rate;
}
}
}
add code - https://share.pluginus.net/image/i20211008205232.png
if (class_exists('WOOCS') AND $item['price']) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$item['price'] = $rate * $item['price'];
}
}
$item['value'] = preg_replace('/\((.+)\)/',"", $item['value']);
//$item['value'] .= sanitize_text_field("(" . wc_price($item['price']) .")");
}
Quote from cezzvk on October 10, 2021, 09:24Hi) When I choose some options in product I have one price like this http://joxi.ru/Vm6yl6NI4pRywr
But in the cart, I have another price http://joxi.ru/Q2KnG5wuLlyNzm
Hi) When I choose some options in product I have one price like this http://joxi.ru/Vm6yl6NI4pRywr
But in the cart, I have another price http://joxi.ru/Q2KnG5wuLlyNzm
Quote from Pablo Borysenco on October 11, 2021, 11:08Hello
Ok! do you use a script to round off prices?
I will check it
Hello
Ok! do you use a script to round off prices?
I will check it
Quote from cezzvk on October 11, 2021, 11:12I use script in functions.php
function pewc_get_multicurrency_price( $price, $item, $product ) { // Compatibility with WooCommerce multilingual $price = apply_filters( 'wcml_raw_price_amount', $price ); if( class_exists('WOOCS') ) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $price = $WOOCS->woocs_exchange_value( floatval( $price ) ); } } return $price; } add_filter( 'pewc_filter_field_price', 'pewc_get_multicurrency_price', 10, 3 ); add_filter( 'pewc_filter_option_price', 'pewc_get_multicurrency_price', 10, 3 ); add_action('woocommerce_before_calculate_totals', 'fix_currency_conversion'); function fix_currency_conversion($cart_object){ global $WOOCS; $cur_currency = $WOOCS->current_currency; $currencies = $WOOCS->get_currencies(); $conversion_rate = $currencies[$WOOCS->current_currency]['rate']; $addons = 0; foreach ($cart_object->cart_contents as $cart_item_key => $cart_item ) { //!var_dump($cart_item['product_extras']['price_with_extras']); if( !empty($cart_item['product_extras']['groups']) && is_array($cart_item['product_extras']['groups']) ) { foreach($cart_item['product_extras']['groups'] AS $group_item) { //var_dump($group_item); foreach($group_item AS $addon) { //var_dump($addon); $addons += $addon['price']; } } } //var_dump($addons); //var_dump($cart_item['data']->price_with_extras); //var_dump($cart_item); $cart_item['data']->set_price(($cart_item['data']->regular_price + $addons) / $conversion_rate ) ; //$cart_item['data']->set_price($cart_item['product_extras']['price_with_extras'] / $conversion_rate ) ; } } I have seen your code in \wp-content\plugins\product-extras-for-woocommerce\inc\functions-cart.phpIt didn't work(
I use script in functions.php
function pewc_get_multicurrency_price( $price, $item, $product ) {
// Compatibility with WooCommerce multilingual
$price = apply_filters( 'wcml_raw_price_amount', $price );
if( class_exists('WOOCS') ) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$price = $WOOCS->woocs_exchange_value( floatval( $price ) );
}
}
return $price;
}
add_filter( 'pewc_filter_field_price', 'pewc_get_multicurrency_price', 10, 3 );
add_filter( 'pewc_filter_option_price', 'pewc_get_multicurrency_price', 10, 3 );
add_action('woocommerce_before_calculate_totals', 'fix_currency_conversion');
function fix_currency_conversion($cart_object){
global $WOOCS;
$cur_currency = $WOOCS->current_currency;
$currencies = $WOOCS->get_currencies();
$conversion_rate = $currencies[$WOOCS->current_currency]['rate'];
$addons = 0;
foreach ($cart_object->cart_contents as $cart_item_key => $cart_item ) {
//!var_dump($cart_item['product_extras']['price_with_extras']);
if(
!empty($cart_item['product_extras']['groups']) &&
is_array($cart_item['product_extras']['groups'])
) {
foreach($cart_item['product_extras']['groups'] AS $group_item) {
//var_dump($group_item);
foreach($group_item AS $addon) {
//var_dump($addon);
$addons += $addon['price'];
}
}
}
//var_dump($addons);
//var_dump($cart_item['data']->price_with_extras);
//var_dump($cart_item);
$cart_item['data']->set_price(($cart_item['data']->regular_price + $addons) / $conversion_rate ) ;
//$cart_item['data']->set_price($cart_item['product_extras']['price_with_extras'] / $conversion_rate ) ;
}
}
I have seen your code in \wp-content\plugins\product-extras-for-woocommerce\inc\functions-cart.phpIt didn't work(
Quote from Pablo Borysenco on October 11, 2021, 12:33I will check it
I will check it
Quote from Pablo Borysenco on October 15, 2021, 18:33Hello
I did the test
I can't repeat the error - https://c2n.me/4dFFQAA.png and https://c2n.me/4dFFRoe.png
Hello
I did the test
I can't repeat the error - https://c2n.me/4dFFQAA.png and https://c2n.me/4dFFRoe.png