doulieyu0881 2015-08-20 14:08
浏览 37

有没有办法隐藏特定客户群的Magento的RRP /旧价格?

I need to hide the RRP/Old Price on Magento for just one of the customer groups on the store - is there a way I can display none the price if a certain customer group member is logged in?

  • 写回答

1条回答 默认 最新

  • dongyuedaochen8415 2015-08-20 16:08
    关注

    I would suggest adding an update to catalog/product/price.phtml to add a containing div with the current customer group as a class / reference so that you can add CSS to display none. Alternatively, you could actually wrap the code in this logic.

    $customerGroupId= Mage::getSingleton("customer/session")->getCustomerGroupId();
    

    Will get you the Group ID of the current customer session (remember, Magento tracks "Not logged in", so this should always return something). You could then echo a class like this onto price-box or a wrapping div

    class="customer-group-<?php echo $customerGroupId;?>"
    
    评论

报告相同问题?

悬赏问题

  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据