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.
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.
Attachments
error2.JPG (75.5 KiB) Viewed 4278 times
error1.JPG (64.2 KiB) Viewed 4278 times
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:
To fix: Change line 9 of catalog/model/extension/total/credit.php from:
Code: Select all
$credit = min($balance, $total);
Code: Select all
$credit = min($balance, $total['total']);
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
thank you so much for this fix man.. was doing my head in!fido-x wrote: ↑Mon Oct 31, 2016 11:06 amI 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);
Code: Select all
$credit = min($balance, $total['total']);
Who is online
Users browsing this forum: No registered users and 25 guests