Magento 2仅显示简单产品的“来自价格”,并在目录中提供分层定价

时间:2018-09-03 20:43:41

标签: magento magento2

如果我在Magento 2中有一个带有分级定价的简单产品,它将显示在目录中: 单位1的价格 销售价格 最低价格->“从价格开始”

现在,我只希望带有分级价格的简单产品显示“起价”

我设法在FinalPriceBox.php中注释掉了部分特价

/**
 * Define if the special price should be shown
 *
 * @return bool
 *
 * public function hasSpecialPrice()
 * {
 * $displayRegularPrice = $this- 
 * >getPriceType(Price\RegularPrice::PRICE_CODE)->getAmount()- 
 * >getValue();
 * $displayFinalPrice = $this- 
 * >getPriceType(Price\FinalPrice::PRICE_CODE)->getAmount()->getValue();
 * return $displayFinalPrice < $displayRegularPrice;
 * }
 */

但是,现在当简单的产品具有简单的定价时,我将隐藏默认价格。有人知道解决方案吗?

0 个答案:

没有答案
相关问题