Magento 如何添加价格为“QUOTE”的产品;联系以获取定价”;在马根托
我有一个Magento网站 我有许多产品要添加Magento 如何添加价格为“QUOTE”的产品;联系以获取定价”;在马根托,magento,product,Magento,Product,我有一个Magento网站 我有许多产品要添加 But some have price as "Contact for Pricing" or "Call for Pricing" so cant to add. Because there has validation for the price. 那么我如何添加这些产品呢 是否有此类产品的模块 我需要将此类产品的价格显示为“联系定价”或“致电定价” 如果有免费下载的“价格呼叫”扩展名?为价格呼叫创建一个Yes/No属性。在创建产品时,在价
But some have price as "Contact for Pricing" or "Call for Pricing" so cant to add.
Because there has validation for the price.
那么我如何添加这些产品呢
是否有此类产品的模块
我需要将此类产品的价格显示为“联系定价”或“致电定价”
如果有免费下载的“价格呼叫”扩展名?为价格呼叫创建一个Yes/No属性。在创建产品时,在价格字段中输入一些内容只是为了通过验证
现在修改模板文件,使其在调用price设置为“Yes”时不显示价格。Josh的回答稍有改进。感谢Josh使用属性的想法 为本例创建属性代码“call_4_price”。正如Josh所建议的,将其设置为“是/否”属性。默认值“否”。将其添加到需要隐藏价格的属性集中 查找“价格和添加到购物车按钮”所在的所有.phtml文件(模板>目录>产品>view.phtml、price.phtml、list.phtml等) 将此代码粘贴到价格代码之前
<!-- Call For Price - begin -->
<?php $attribute = $_product->getResource()->getAttribute('call_4_price'); ?>
<?php $attribute_value = $attribute ->getFrontend()->getValue($_product); ?>
<?php if ($attribute_value == 'Yes'): ?>
//Please Call for pricing
<?php else: ?>
//请来电咨询价格
在“添加到购物车”按钮之后
<?php endif; ?>
<!-- Call For Price - end -->
如果没有扩展,我想你自己也不难解决。这类问题实际上不属于堆栈溢出,因为它不是编程问题。你应该看看,看看如何找到一个合适的地方来提出这类问题