PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

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 please
If 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.

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?

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

ready)

Ok!  Thank you

I added this plugin to the adaptation queue. we will check the relevance of the article

Hello) I have the error when i trying add product to cart http://joxi.ru/nAyzonySgzgbbr
Help me please. Credentials are the same

This product https://www.rangeful.com/product/spear-2000-v4g-h-2-band-gsm-repeater/

Hello

Please  do a test

Now is good) thanks, but in cart products have wrong currency rate, help please)

Hello

Please  disable third party plugins that affect the price and do a test

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!

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

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?

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']) .")");
}

 

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

Hello

Ok! do you use a script to round off prices?

I will  check it

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.php

It didn't work(

I will  check  it

Hello

I did  the  test

I can't repeat the error -  https://c2n.me/4dFFQAA.png and  https://c2n.me/4dFFRoe.png