Skip to content

Commit

Permalink
Merge pull request #1712 from magento-engcom/2.1-develop-prs
Browse files Browse the repository at this point in the history
Public Pull Requests

#11919 [BACKPORT 2.1] [BUGFIX] Add FreeShipping to the Items when SalesRule uses by @lewisvoncken

Fixed Public Issues

#8089 Cart Price Rules based on Shipping Method can't be applied in basket
#8172 Free shipping coupon not working with Table Rates shipping - Sorry, no quotes are available for this order.
#10507 Free shipping not being properly applied in CE 2.1.8
  • Loading branch information
Oleksii Korshenko authored Nov 13, 2017
2 parents a691f08 + 6fd5b7f commit 86c9cad
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ define([
},

/**
* @returns {Bool}
* @returns {Boolean}
*/
isVaultEnabled: function () {
return this.vaultEnabler.isVaultEnabled();
Expand Down Expand Up @@ -144,10 +144,19 @@ define([
},

/**
* Trigger order placing
* Returns state of place order button
* @returns {Boolean}
*/
isButtonActive: function () {
return this.isActive() && this.isPlaceOrderActionAllowed();
},

/**
* Triggers order placing
*/
placeOrderClick: function () {
if (this.validateCardType()) {
this.isPlaceOrderActionAllowed(false);
$(this.getSelector('submit')).trigger('click');
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,9 @@
<button class="action primary checkout"
type="submit"
data-bind="
click: placeOrderClick,
attr: {title: $t('Place Order')},
css: {disabled: !isPlaceOrderActionAllowed()},
enable: isActive()
click: placeOrderClick,
attr: {title: $t('Place Order')},
enable: isButtonActive()
"
disabled>
<span data-bind="i18n: 'Place Order'"></span>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Checkout/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Error!,Error!
"DB exception","DB exception"
"Wrong minimum amount.","Wrong minimum amount."
Message,Message
"<a href=""%1"" onclick=""this.target=\'_blank\'"" class=""print"">Print receipt</a>","<a href=""%1"" onclick=""this.target=\'_blank\'"" class=""print"">Print receipt</a>"
"Print receipt","Print receipt"
"Apply Discount Code","Apply Discount Code"
"Enter discount code","Enter discount code"
"Apply Discount","Apply Discount"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<?php /** @var $block \Magento\Checkout\Block\Onepage\Success */ ?>

<?php if ($block->getCanViewOrder() && $block->getCanPrintOrder()) :?>
<?php /* @escapeNotVerified */ echo __('<a href="%1" onclick="this.target=\'_blank\'" class="print">Print receipt</a>', $block->getPrintUrl()) ?>
<a href="<?php /* @escapeNotVerified */ echo $block->getPrintUrl() ?>" target="_blank" class="print">
<?php /* @escapeNotVerified */ echo __('Print receipt') ?>
</a>
<?php echo $block->getChildHtml() ?>
<?php endif;?>
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function processFreeShipping(\Magento\Quote\Model\Quote\Item\AbstractItem

case Rule::FREE_SHIPPING_ADDRESS:
$address->setFreeShipping(true);
$item->setFreeShipping(true);
break;
}
if ($rule->getStopRulesProcessing()) {
Expand Down

0 comments on commit 86c9cad

Please sign in to comment.