Skip to content

Commit

Permalink
Merge pull request #13 from limegrow/feature/bump-v2.8.0
Browse files Browse the repository at this point in the history
Bump v2.8.0
  • Loading branch information
olegisk authored May 3, 2021
2 parents 6d24aab + d264a64 commit e07bd7e
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [2.8.0] - 2021-05-03
### Added
- Implemented Magento Commerce features

### Changes
- Remove "Open Invoice" title
- Trim `owneraddress`

## [2.7.0] - 2021-04-18
### Added
- Multi Store configuration
Expand Down
60 changes: 60 additions & 0 deletions Model/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,36 @@ public function requestOrderInfo($orderId = null)
];
}

// Add "Reward Points" discount
if ($order->getRewardCurrencyAmount() > 0) {
$items[] = [
OrderItem::ITEM_TYPE => OrderItem::TYPE_DISCOUNT,
OrderItem::ITEM_ID => 'reward_pints',
OrderItem::ITEM_NAME => __('Reward Points'),
OrderItem::ITEM_DESCRIPTION =>__('Reward Points'),
OrderItem::ITEM_UNIT_PRICE => -1 * $order->getRewardCurrencyAmount(),
OrderItem::ITEM_QTY => 1,
OrderItem::ITEM_UNIT_VAT => 0,
OrderItem::ITEM_VATCODE => 0,
OrderItem::ITEM_VAT_INCLUDED => 1 // VAT included
];
}

// Add "Gift Cards" discount
if ($order->getGiftCardsAmount() > 0) {
$items[] = [
OrderItem::ITEM_TYPE => OrderItem::TYPE_DISCOUNT,
OrderItem::ITEM_ID => 'gift_cards',
OrderItem::ITEM_NAME => __('Gift Card'),
OrderItem::ITEM_DESCRIPTION =>__('Gift Card'),
OrderItem::ITEM_UNIT_PRICE => -1 * $order->getGiftCardsAmount(),
OrderItem::ITEM_QTY => 1,
OrderItem::ITEM_UNIT_VAT => 0,
OrderItem::ITEM_VATCODE => 0,
OrderItem::ITEM_VAT_INCLUDED => 1 // VAT included
];
}

// Add Shipping Order Line
$shippingIncTax = 0;
$shippingTax = 0;
Expand Down Expand Up @@ -966,6 +996,36 @@ public function requestOrderInfoBeforePlaceOrder($reservedOrderId)
];
}

// Add "Reward Points" discount
if ($quote->getRewardCurrencyAmount() > 0) {
$items[] = [
OrderItem::ITEM_TYPE => OrderItem::TYPE_DISCOUNT,
OrderItem::ITEM_ID => 'reward_pints',
OrderItem::ITEM_NAME => __('Reward Points'),
OrderItem::ITEM_DESCRIPTION =>__('Reward Points'),
OrderItem::ITEM_UNIT_PRICE => -1 * $quote->getRewardCurrencyAmount(),
OrderItem::ITEM_QTY => 1,
OrderItem::ITEM_UNIT_VAT => 0,
OrderItem::ITEM_VATCODE => 0,
OrderItem::ITEM_VAT_INCLUDED => 1 // VAT included
];
}

// Add "Gift Cards" discount
if ($quote->getGiftCardsAmount() > 0) {
$items[] = [
OrderItem::ITEM_TYPE => OrderItem::TYPE_DISCOUNT,
OrderItem::ITEM_ID => 'gift_cards',
OrderItem::ITEM_NAME => __('Gift Card'),
OrderItem::ITEM_DESCRIPTION =>__('Gift Card'),
OrderItem::ITEM_UNIT_PRICE => -1 * $quote->getGiftCardsAmount(),
OrderItem::ITEM_QTY => 1,
OrderItem::ITEM_UNIT_VAT => 0,
OrderItem::ITEM_VATCODE => 0,
OrderItem::ITEM_VAT_INCLUDED => 1 // VAT included
];
}

// Add Shipping Quote Line
if (!$quote->getIsVirtual()) {
$shippingExclTax = $shippingAddress->getShippingAmount();
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"league/iso3166": "~2.1",
"graylog2/gelf-php": "~1.5",
"symfony/translation": ">=4.2",
"ingenico/ogone-client": "^5.2.0",
"ingenico/ogone-client": "^5.2.1",
"viison/address-splitter": "~0.3.4"
},
"type": "magento2-module",
"version": "2.7.0",
"version": "2.8.0",
"license": [
"OSL-3.0"
],
Expand Down
1 change: 0 additions & 1 deletion view/frontend/templates/method/list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ use IngenicoClient\PaymentMethod\PaymentMethod;
<div class="ingenico-confirmation">
<ul>
<?php foreach ($block->getPaymentMethods() as $categoryName => $methods): ?>
<h2><?php echo $categoryName; ?></h2>
<?php foreach ($methods as $code => $method): ?>
<?php /** @var \IngenicoClient\PaymentMethod\PaymentMethod $method */?>
<li>
Expand Down

0 comments on commit e07bd7e

Please sign in to comment.