Support Forum

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

[WOOC LABS] Bug/Incompability issue with Official Woocommerce Deposits plugin

This support system is for all types of the plugins as for premium versions, so for free ones! If you have premium version do not forget in the private data of the request (!!not in the text of the support request!!) after its publishing insert purchase code please (see green button on the right side) and press Save button.
If you not got email within 24 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.
12

Hi, we have a shop working with Woocommerce Deposits and we wanted to use WOOCS to offer payments with one more currency. Everything works fine until Woocommerce Deposits breaksdown the total amount in smaller ones on the cart page, when the currency is changed from USD to MXN, the total in the cart is not being converted at all and the pending amount is miscalculated. We tried other currencies and it happens as well.

Can you help us?

Thanks in advance!

Hello

Ok!  Please  add  FTP + wp-admin access - https://c2n.me/42BAoj4.png

I will add this plugin to the adaptation queue

 

Hi Pablo, sorry for the late response.

The info is already on the private data. Thanks for your support.

Have a great day.

Hello

I added this plugin to the adaptation queue

Hello

Check  your  FTP access - 530 Login authentication failed

Hi Pablo,

Thanks for the message.

I changed the info on the private data. I didn't know ftp users are case sensitive, maybe that was the problem. I also added another ftp account if needed.

 

Thanks!

Hello

Ok! I will check  it

Hello

In file - \wp-content\plugins\woocommerce-deposits\includes\class-wc-deposits-cart-manager.php  - add  code -  https://c2n.me/442ICTn.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'];
$total= $total/ $rate;
}
}
}

AND - https://c2n.me/442IIam.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'];
$total= $total/ $rate;
}
}
}

AND  add  code  in functions.php

add_filter( 'woocommerce_deposits_get_deposit_amount', 'woocommerce_deposits_get_deposit_amount',2,99);

function woocommerce_deposits_get_deposit_amount($deposit,$prod){

if (class_exists('WOOCS')) {
global $WOOCS;
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency AND $WOOCS->is_multiple_allowed) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$deposit = $deposit * $rate;
}
}
return $deposit;
}

 

Please  do test!

 

Hi Pablo,
we are glad to greet you again I hope you are well. Happy New Year!

We have been testing the fix with our clients these last months and everything seemed to be working alright, the info on the cart and checkout were shown correctly, and even the payments were processed as they should, thanks to your fix. As we dont have not a lot of customers and sales, we waited a little to let our customers check if they notice any issue that we didnt see, before give you our comments.

But the last weeks of december, our clients pointed us another similar issue, the order info on "My account" and the "Order Details" after purchase, have the same initial problem. The price per product and subtotal/total of the order is miscalculated on those points (although the partial payment is ok), even the admin order in woocommerce shows the miscalculated total quantity on the order ( we didn't notice either, because of the correct payment). We attach an image of the problem, so you can see it more clearly.

We tried pasting the code you give us in different points of the woo deposits plugin classes "order management" but it didn't work at all. Do you think this issue can be fixed without much trouble? Everything appart of this issue it is working like a charm so far.

Thanks a lot for your kind response. Have a great day!

Hi again,

We've just a found a quick fix for this last issue, in the end was the cart manager who was saving the values wrong prior creating the order, we'll post it here so it can help another users in the future:

It goes on the same file:
\wp-content\plugins\woocommerce-deposits\includes\class-wc-deposits-cart-manager.php

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'];
$deposit_amount = $deposit_amount / $rate;
}
}
}

Here:

Just changing the last variable did the trick, and it fixed the amounts in the order details. (but we are not sure if its optimal, we were just pasting code there and there, redo and trying until it worked). Hope it can help other users that has the same issue with Woocommerce Deposits. :)

Although we could fix the last issue, while we were testing further trying to find a solution for it, we found another issue unfortunately.

Everything works great so far with partial payments and deposits, but, if our client selects the "full payment" (pay the product in only one whole payment) in the product page, WOOCS no longer converts the subtotal and totals on the cart page, it remains on the same currency with no change at all, and it carries the same behavior on the checkout page and order details.

We add a new screenshot as an example of the issue:

 

We think it is a completely different issue, looks like the opposite, now the quantity it is not miscalculated but it's being ignored for the "full payments". Would you kindly give us some assistance on this?

Thanks a lot in advance, and have a great day!

Hello

OK! Thank you  for  cooperation.

I will pass this to the developers

Thank you Pablo,

We remain in touch for everything we can help on our end. Have a nice day!

Hello

Try  to  change  code:

 

In file - \wp-content\plugins\woocommerce-deposits\includes\class-wc-deposits-cart-manager.php  - add  code -  https://c2n.me/442ICTn.png

if (class_exists('WOOCS') AND ($deposits_remaining_amount OR $credit_amount)) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$total= $total/ $rate;
}
}
}

AND - https://c2n.me/442IIam.png

if (class_exists('WOOCS') AND ($this->get_deposit_remaining_amount() OR $this->get_credit_amount())) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$total= $total/ $rate;
}
}
}

Hi Pablo,
Thanks for your kind response,

We tried the new code and it actually fixes the problem, now the "full amount" payment shows the correct converted amount in the cart total and order confirmation page, but kind of broke the first fix :(.

Now, if you try to buy a product with the partial payments method doesn't add any product to the cart, no matter if you try with the default or converted currency. We also tried removing the "fix" we made for the order details too, but didn't help.

Maybe there is a middle ground between the two fixes?

Hello

Ok! I will check  it

Thank you!

Hello

I'm not sure if it depends on my plugin - https://c2n.me/45xfpZb

Thanks for kind reply Pablo,

We made a few more tests today, we reinstalled the woocommerce deposits plugin with a fresh new version, copied the last fixes and everything seems to be working now!. Maybe the older version was messed out?

We will continue making more tests to see what we can find, we've only detected one last issue. The "full amount" problem persist if the cart has 2 products with different payment plans, example: when 1 product with full amount payment and 1 product with partial payment are added on the same cart, the subtotal is miscalculated again, in this case, it seems that the product with "full payment" is added to the cart totals with the original currency, it is not being converted as it have happened before.

Thanks for your outstanding support so far Pablo. We are really greatful with everything you have done for us and for the WOOCS amazing plugin.

Hello

OK!  I got  it.  On thursday I will fix it

12