【问题标题】:Magento 1.9 POA displaying in cart but not at Order Review / InvoicesMagento 1.9 POA 显示在购物车中,但不在订单审查/发票中
【发布时间】:2020-01-08 17:12:07
【问题描述】:

我有一个 Magento 1.9 网站,其中一些产品使用 POA 而不是价格。默认情况下,Magento 需要为每个产品定价,因此我设置了 0.00,然后从价格字段下的下拉列表中选择 POA。

在网站的前端和购物车中显示 POA 而不是 0.00。但是在订单审查/发票/电子邮件中显示 0.00。

任何关于如何显示 POA 而不是 0.00 的建议将不胜感激。提前致谢。

【问题讨论】:

  • 您是否使用管理员创建了 POA 属性?
  • 是的,POA属性已经创建

标签: magento magento-1.9


【解决方案1】:

试试这个

app/design/frontend/default/[主题]/template/catalog/product/price.phtml

行后:

$_product = $this->getProduct();

添加这一行:

if ($_product->getAttributeText(‘poa’)==NULL):

现在转到文件末尾并添加:

getAttributeText('poa') ?>

修复列表页面 从列表页面中删除添加到购物车按钮,打开:/app/design/frontend/default/default/template/catalog/product/list.phtml

这条线有两个实例,一个用于网格,一个用于列表:

<button type=”button” title=”<?php echo $this->__(‘Add to Cart’) ?>” class=”button btn-cart” onclick=”setLocation(‘<?php echo $this->getAddToCartUrl($_product) ?>’)”><span><span><?php echo $this->__(‘Add to Cart’) ?></span></span></button>

在它们周围添加一个 if 使它们看起来像:

<?php if ($_product->getAttributeText(‘poa’)==NULL): ?>
<button class=”button” onclick=”setLocation(‘<?php echo $this->getAddToCartUrl($_product) ?>’)”><span><?php echo $this->__(‘Add to Cart’) ?></span></button>
<?php endif; ?>

【讨论】:

  • 谢谢。我的客户仍然希望客户以 0.00 的产品价格结帐(然后他们将联系客户讨论订单 - 不接受在线支付)。有什么方法可以编辑 item.phtml 文件/电子邮件,使 0.00 显示为 POA?
  • 如果我的回答对你有用请采纳,我可以再给你一个答案
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-11-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多