Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Commit b711acb

Browse files
committed
Release 1.0.31
1 parent ff90e41 commit b711acb

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ This repository contains the OpenCart wallee payment module that enables the sh
1111

1212
## Documentation
1313

14-
* [English](https://plugin-documentation.wallee.com/wallee-payment/opencart-2.0/1.0.30/docs/en/documentation.html)
14+
* [English](https://plugin-documentation.wallee.com/wallee-payment/opencart-2.0/1.0.31/docs/en/documentation.html)
1515

1616
## License
1717

18-
Please see the [license file](https://github.com/wallee-payment/opencart-2.0/blob/1.0.30/LICENSE) for more information.
18+
Please see the [license file](https://github.com/wallee-payment/opencart-2.0/blob/1.0.31/LICENSE) for more information.

docs/en/documentation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h2>Documentation</h2> </div>
2121
</a>
2222
</li>
2323
<li>
24-
<a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.30/">
24+
<a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.31/">
2525
Source
2626
</a>
2727
</li>
@@ -48,7 +48,7 @@ <h1>
4848
<div class="olist arabic">
4949
<ol class="arabic">
5050
<li>
51-
<p><a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.30/">Download</a> the extension.</p>
51+
<p><a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.31/">Download</a> the extension.</p>
5252
</li>
5353
<li>
5454
<p>Extract the files and upload the content of the <code>Upload</code> directory into the root directory of your store using FTP/SSH.</p>

upload/system/library/wallee/service/line_item.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,12 @@ private function createLineItemFromProduct($product){
381381
$product['tax_class_id'] = $this->getTaxClassByProductId($product['product_id']);
382382

383383
if ($this->coupon && (!$this->coupon['product'] || in_array($product['product_id'], $this->coupon['product']))) {
384-
$count = 1;
385-
if(!empty($this->coupon['product'])) {
386-
$count = count($this->coupon['product']);
387-
}
388384
if ($this->coupon['type'] == 'F') {
389-
$discount = $this->coupon['discount'] / $count;
385+
if(empty($this->coupon['product'])) {
386+
$discount = $this->coupon['discount'] * ($product['total'] / $this->sub_total);
387+
}else {
388+
$discount = $this->coupon['discount'] / count($this->coupon['product']);
389+
}
390390
}
391391
elseif ($this->coupon['type'] == 'P') {
392392
$discount = $product['total'] / 100 * $this->coupon['discount'];

0 commit comments

Comments
 (0)