-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from magento-folks/merchant_beta
[Folks] Bugfix
- Loading branch information
Showing
6 changed files
with
116 additions
and
32 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
app/code/Magento/Msrp/view/frontend/layout/checkout_cart_sidebar_total_renderers.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> | ||
<body> | ||
<referenceBlock name="minicart"> | ||
<arguments> | ||
<argument name="jsLayout" xsi:type="array"> | ||
<item name="components" xsi:type="array"> | ||
<item name="minicart_content" xsi:type="array"> | ||
<item name="children" xsi:type="array"> | ||
<item name="subtotal.container" xsi:type="array"> | ||
<item name="children" xsi:type="array"> | ||
<item name="subtotal" xsi:type="array"> | ||
<item name="children" xsi:type="array"> | ||
<item name="subtotal.totals" xsi:type="array"> | ||
<item name="children" xsi:type="array"> | ||
<item name="subtotal.totals.msrp" xsi:type="array"> | ||
<item name="component" xsi:type="string">Magento_Msrp/js/view/checkout/minicart/subtotal/totals</item> | ||
<item name="config" xsi:type="array"> | ||
<item name="displayArea" xsi:type="string">minicart-subtotal-hidden</item> | ||
<item name="template" xsi:type="string">Magento_Msrp/checkout/minicart/subtotal/totals</item> | ||
</item> | ||
</item> | ||
</item> | ||
</item> | ||
</item> | ||
</item> | ||
</item> | ||
</item> | ||
</item> | ||
</item> | ||
</item> | ||
</argument> | ||
</arguments> | ||
</referenceBlock> | ||
</body> | ||
</page> |
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
app/code/Magento/Msrp/view/frontend/web/js/view/checkout/minicart/subtotal/totals.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
define([ | ||
'Magento_Tax/js/view/checkout/minicart/subtotal/totals', | ||
'underscore' | ||
], function (Component, _) { | ||
'use strict'; | ||
|
||
return Component.extend({ | ||
|
||
/** | ||
* @override | ||
*/ | ||
initialize: function () { | ||
this._super(); | ||
this.displaySubtotal(this.isMsrpApplied(this.cart().items)); | ||
this.cart.subscribe(function (updatedCart) { | ||
|
||
this.displaySubtotal(this.isMsrpApplied(updatedCart.items)); | ||
}, this); | ||
}, | ||
|
||
/** | ||
* Determine if subtotal should be hidden. | ||
* @param {Array} cartItems | ||
* @return {Boolean} | ||
*/ | ||
isMsrpApplied: function (cartItems) { | ||
return !_.find(cartItems, function (item) { | ||
if (_.has(item, 'canApplyMsrp')) { | ||
return item.canApplyMsrp; | ||
} | ||
|
||
return false; | ||
}); | ||
} | ||
}); | ||
}); |
7 changes: 7 additions & 0 deletions
7
app/code/Magento/Msrp/view/frontend/web/template/checkout/minicart/subtotal/totals.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<span class="mark msrp" data-bind="text: $t('Order total will be displayed before you submit the order')"></span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters