-
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 #619 from magento-troll/pull-second
MAGETWO-60205: Prices are incorrect in SF for configurable product with tier-prices
- Loading branch information
Showing
15 changed files
with
345 additions
and
32 deletions.
There are no files selected for viewing
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
25 changes: 25 additions & 0 deletions
25
app/code/Magento/ConfigurableProduct/Pricing/Render/TierPriceBox.php
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,25 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\ConfigurableProduct\Pricing\Render; | ||
|
||
/** | ||
* Responsible for displaying tier price box on configurable product page. | ||
* | ||
* @package Magento\ConfigurableProduct\Pricing\Render | ||
*/ | ||
class TierPriceBox extends FinalPriceBox | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public function toHtml() | ||
{ | ||
// Hide tier price block in case of MSRP. | ||
if (!$this->isMsrpPriceApplicable()) { | ||
return parent::toHtml(); | ||
} | ||
} | ||
} |
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
26 changes: 26 additions & 0 deletions
26
app/code/Magento/ConfigurableProduct/view/base/templates/product/price/tier_price.phtml
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,26 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
?> | ||
<script type="text/x-magento-template" id="tier-prices-template"> | ||
<ul class="prices-tier items"> | ||
<% _.each(tierPrices, function(item, key) { %> | ||
<% var priceStr = '<span class="price-container price-tier_price">' | ||
+ '<span data-price-amount="' + priceUtils.formatPrice(item.price, currencyFormat) + '"' | ||
+ ' data-price-type=""' + ' class="price-wrapper ">' | ||
+ '<span class="price">' + priceUtils.formatPrice(item.price, currencyFormat) + '</span>' | ||
+ '</span>' | ||
+ '</span>'; %> | ||
<li class="item"> | ||
<%= $t('Buy %1 for %2 each and').replace('%1', item.qty).replace('%2', priceStr) %> | ||
<strong class="benefit"> | ||
<%= $t('save') %><span class="percent tier-<%= key %>"> <%= item.percentage %></span>% | ||
This comment has been minimized.
Sorry, something went wrong. |
||
</strong> | ||
</li> | ||
<% }); %> | ||
</ul> | ||
</script> | ||
<div data-role="tier-price-block"></div> |
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
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
Oops, something went wrong.
@rganin Looks like there is mistake, after
</span>
we have % symbol