Skip to content

Commit

Permalink
Release 1.0.31
Browse files Browse the repository at this point in the history
  • Loading branch information
sbossert committed Nov 18, 2019
1 parent 145ff9d commit e1ac461
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ This repository contains the OpenCart PostFinance Checkout payment module that

## Documentation

* [English](https://plugin-documentation.postfinance-checkout.ch/pfpayments/opencart-2.3/1.0.30/docs/en/documentation.html)
* [English](https://plugin-documentation.postfinance-checkout.ch/pfpayments/opencart-2.3/1.0.31/docs/en/documentation.html)

## License

Please see the [license file](https://github.com/pfpayments/opencart-2.3/blob/1.0.30/LICENSE) for more information.
Please see the [license file](https://github.com/pfpayments/opencart-2.3/blob/1.0.31/LICENSE) for more information.
4 changes: 2 additions & 2 deletions docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/pfpayments/opencart-2.3/releases/tag/1.0.30/">
<a href="https://github.com/pfpayments/opencart-2.3/releases/tag/1.0.31/">
Source
</a>
</li>
Expand All @@ -48,7 +48,7 @@ <h1>
<div class="olist arabic">
<ol class="arabic">
<li>
<p><a href="https://github.com/pfpayments/opencart-2.3/releases/tag/1.0.30/">Download</a> the extension.</p>
<p><a href="https://github.com/pfpayments/opencart-2.3/releases/tag/1.0.31/">Download</a> the extension.</p>
</li>
<li>
<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>
Expand Down
10 changes: 5 additions & 5 deletions upload/system/library/postfinancecheckout/service/line_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,12 @@ private function createLineItemFromProduct($product){
$product['tax_class_id'] = $this->getTaxClassByProductId($product['product_id']);

if ($this->coupon && (!$this->coupon['product'] || in_array($product['product_id'], $this->coupon['product']))) {
$count = 1;
if(!empty($this->coupon['product'])) {
$count = count($this->coupon['product']);
}
if ($this->coupon['type'] == 'F') {
$discount = $this->coupon['discount'] / $count;
if(empty($this->coupon['product'])) {
$discount = $this->coupon['discount'] * ($product['total'] / $this->sub_total);
}else {
$discount = $this->coupon['discount'] / count($this->coupon['product']);
}
}
elseif ($this->coupon['type'] == 'P') {
$discount = $product['total'] / 100 * $this->coupon['discount'];
Expand Down

0 comments on commit e1ac461

Please sign in to comment.