This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 6 replies, has 2 voices.

Last updated by Shekhar Bhandari 5 months, 2 weeks ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
April 15, 2019 at 1:49 pm #3613875

johannV-2

I would like to offer customers the option to book tours in different currencies with WPML currency switcher. The problem is I am using Wc marketplace for vendors. So when a vendor receives bookings in different currencies their dashboard calculation is getting messed up. Is there a way to force orders to show in default currencies in the backend?

Thanks, Johann.

April 15, 2019 at 1:56 pm #3613897

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I installed your site and created a vendor account, I can see that the vendor dashboard is showing properly the prices in the default currently? Do you want to show the vendor price in the selected currency?

Could you please elaborate on this issue a bit more? Please provide screenshots so I can better understand where the calculation is not shown properly.

Look forward to your reply.

Thanks

April 15, 2019 at 5:54 pm #3615575

johannV-2

Hi Shekhar,

at the moment I disabled the WPML multi currency option. That means there is only one currency vailable (USD$). Same on your staging site. With one currency there is no issue. But once I enable multi currency and the vendor gets multiple bookings in different currencies his calculation in the dashboard gets messed up. What I would need is enable multiple currencies, so the customer can buy a product in his selected currency, but in the backend those orders should show in the default currency (USD$). This way the vendors dashboard calculation wouldnt have problems... Is there a way to do it?

April 16, 2019 at 4:33 am #3618151

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I can see the orders showing properly on my localhost so I couldn't understand the issue properly, would you mind providing a few screenshots showing the issue? This would be much helpful.

Look forward to your reply.

Thanks

April 16, 2019 at 6:52 pm #3624923

johannV-2

Hi Shekhar,

for test purpose I activated WPML Multi Currency. I placed two orders for the same product. One order in USD and one order in GBP. USD price is 44. GBP price is 34.
The problem: In the backend of the vendors dashboard its taking the GBP amount (34) and is showing it as USD (the default currency). You can see on the screenshot. Its all the same product with the same price but the red marked order is the one the customer placed in GBP. That means the vendor would loose 10 USD.
What I would need is showing all orders in the default currency in the backend.
Is that possible?

April 17, 2019 at 5:05 am #3627165

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

There are no such options as such to display amounts in the selected currency for vendors, currently. I can replicate the problem and I can confirm it's a compatibility issue.

I have forward the details to our Themes & Plugins Compatibility Team and they will contact the author. Please note that this process may take a while as it depends on how soon the author will reply to our efforts to contact him.

It would be great if you can also contact the author asking him to reply to us. You could also refer them to our Go Global program so that we can help them make their theme compatible with WPML. https://wpml.org/documentation/theme-compatibility/go-global-program/ This may help expedite the process.

We are closing the ticket but we will keep it in our records. You will be notified the moment we have the author’s cooperation in this process.

Thanks

May 6, 2019 at 8:53 am #3745995

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Our compatibility team has provided a workaround regarding this issue, so could you please keep a backup of your site first and try the steps as mentioned below:

Go to wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php

replace line 266 with:

'vendor_earning' => wc_price(get_wcmp_vendor_order_amount(array('vendor_id' => $vendor->id, 'order_id' => $order->get_id()))['total'], array( 'currency' => $order->get_currency() )),

Go to wp-content/plugins/dc-woocommerce-multi-vendor/templates/vendor-dashboard/vendor-orders/vendor-order-details.php

replace line 75 with

<td><?php echo wc_price($vendor_order_amount['commission_amount'], array( 'currency' => $order->get_currency() )); ?></td>

replace line 75 with

<td><?php echo wc_price($vendor_order_amount['shipping_amount'], array( 'currency' => $order->get_currency() )); ?><?php if($vendor_shipping_method) echo __(' via ', 'dc-woocommerce-multi-vendor') . $vendor_shipping_method->get_name(); ?></td>

replace line 81 with

<td><?php echo wc_price($vendor_order_amount['tax_amount'] + $vendor_order_amount['shipping_tax_amount'], array( 'currency' => $order->get_currency() )); ?></td>

replace line 89 with

<td><?php echo wc_price($vendor_order_amount['total'], array( 'currency' => $order->get_currency() )); ?></td>

Go to wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-post-commission.php

after line 484 add:

$commission_order = get_post_meta(  $id, '_commission_order_id'  );
$order_currency = wc_get_order(  $commission_order[0]  );

line 536 with:

echo wc_price($data, array( 'currency' => $order_currency->get_currency() ));

and line 546 with:

echo wc_price($data, array( 'currency' => $order_currency->get_currency() ));

Let me know if this helps.

Thanks