我正在尝试在 magento 产品页面上隐藏等级定价,但无法成功,我遵循了在 Magento 产品页面上显示价格一次的帖子,任何人都可以提供帮助吗?
问问题
4278 次
2 回答
2
复制price.phtml从
app/design/frontend/base/default/template/catalog/product/price.phtml
至
应用程序/设计/前端/默认/您的主题/模板/目录/产品/
找到以下几行
<span class="label"><?php echo $this->__('As low as:') ?></span>
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
<?php echo $_coreHelper->currency($_minimalPriceDisplayValue,true,false) ?>
</span>
评论这些行:
<!--span class="label"><?php echo $this->__('As low as:') ?></span>
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
<?php echo $_coreHelper->currency($_minimalPriceDisplayValue,true,false) ?>
</span-->
您的等级价格是隐藏的。
干杯:)
于 2013-03-19T09:53:56.813 回答
0
供应商\模块\视图\前端\布局\catalog_product_prices.phtml
<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
<block class="Magento\Framework\Pricing\Render\RendererPool" name="render.product.prices">
<arguments>
<argument name="default" xsi:type="array">
<item name="default_render_class" xsi:type="string">Magento\Catalog\Pricing\Render\PriceBox</item>
<item name="default_render_template" xsi:type="string">Magento_Catalog::product/price/default.phtml</item>
<item name="default_amount_render_class" xsi:type="string">Magento\Framework\Pricing\Render\Amount</item>
<item name="default_amount_render_template" xsi:type="string">**Magento_Catalog**::product/price/amount/default.phtml</item>
<item name="prices" xsi:type="array">
<item name="special_price" xsi:type="array">
<item name="render_template" xsi:type="string">Magento_Catalog::product/price/special_price.phtml</item>
</item>
<item name="tier_price" xsi:type="array">
<item name="render_template" xsi:type="string">Vendor_Module::custom_tierprice.phtml</item>
</item>
<item name="final_price" xsi:type="array">
<item name="render_class" xsi:type="string">Magento\Catalog\Pricing\Render\FinalPriceBox</item>
<item name="render_template" xsi:type="string">Magento_Catalog::product/price/final_price.phtml</item>
</item>
<item name="custom_option_price" xsi:type="array">
<item name="amount_render_template" xsi:type="string">Magento_Catalog::product/price/amount/default.phtml</item>
</item>
<item name="configured_price" xsi:type="array">
<item name="render_class" xsi:type="string">Magento\Catalog\Pricing\Render\ConfiguredPriceBox</item>
<item name="render_template" xsi:type="string">Magento_Catalog::product/price/configured_price.phtml</item>
</item>
</item>
<!--<item name="adjustments" xsi:type="array"></item>-->
</argument>
</arguments>
</block>
</layout>
供应商\模块\视图\前端\模板\custom_tierprice.phtml
<?php @var \Magento\Catalog\Pricing\Render\PriceBox $block @var \Magento\Catalog\Pricing\Price\TierPrice $tierPriceModel ?>
于 2021-06-18T05:18:06.113 回答