Page 1 of 1
Store Credit Error Version 2.3.0.2
Posted: Mon Oct 31, 2016 3:41 am
by kamalkpaleti
When using the store credit to purchase an item, the total balance is deducting and showing balance zero even though the product price is less than the store credit we have.
Example : I have store credit $3000 and purchased a product for $500.
In real, $500 must be deducted from store credit and the balance should be $2500
But, it is deducting all the store credit and showing a balance Zero.
I have attached screen shots below. Please check. Thanks for looking into this.
Re: Store Credit Error Version 2.3.0.2
Posted: Mon Oct 31, 2016 4:03 am
by cyclops12
Is this an extension you are using for store credit ?
Re: Store Credit Error Version 2.3.0.2
Posted: Mon Oct 31, 2016 4:09 am
by kamalkpaleti
No, This is default opencart feature.
Re: Store Credit Error Version 2.3.0.2
Posted: Mon Oct 31, 2016 11:06 am
by fido-x
I can confirm this. The problem is due to an invalid comparison in the model (comparing a float with an array).
To fix: Change line 9 of
catalog/model/extension/total/credit.php from:
to:
Code: Select all
$credit = min($balance, $total['total']);
Re: Store Credit Error Version 2.3.0.2
Posted: Mon Oct 31, 2016 3:53 pm
by kamalkpaleti
Thank you very much fido-x. It worked.
Re: Store Credit Error Version 2.3.0.2
Posted: Sat May 06, 2017 7:16 am
by nexxterra
Why is the code in the current download version changed to reflect this? I downloaded V2.3.0.2 April 2017... this post is from October 2016...
Re: Store Credit Error Version 2.3.0.2
Posted: Wed Jun 28, 2017 11:02 pm
by f1br3opt1c
fido-x wrote: ↑Mon Oct 31, 2016 11:06 am
I can confirm this. The problem is due to an invalid comparison in the model (comparing a float with an array).
To fix: Change line 9 of
catalog/model/extension/total/credit.php from:
to:
Code: Select all
$credit = min($balance, $total['total']);
thank you so much for this fix man.. was doing my head in!