Zencart 如何关掉商品页的价格和购物车?

方法一:

1.后台--Catalog--Product Types--商品 – 普通--编辑
将 This Product can be added to cart:的勾去掉。
2.includes\templates\模板\css\stylesheet.css中添加css样式将价格隐藏
#productPrices{display:none;}        /* productPrices为价格所在容器的id 具体id名称因模板而异*/

方法二:

打开文件 includes\templates\模板\templates\tpl_product_info_display.php
如果没有,则从includes\templates\template_default\templates\tpl_product_info_display.php
复制过来。
打开tpl_product_info_display.php,找到下面代码,将其注释或删除,具体代码因模板而异

代码: 全选
<!–bof Product Price block –>
<h2 id=”productPrices” class=”productGeneral”>
<?php
// base price
  if ($show_onetime_charges_description == ‘true’) {
    $one_time = ‘<span >’ . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . ‘</span><br />’;
  } else {
    $one_time = ”;
  }
  echo $one_time . ((zen_has_product_attributes_values((int)$_GET[‘products_id’]) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : ”) . zen_get_products_display_price((int)$_GET[‘products_id’]);
?></h2>
<!–eof Product Price block –>

接下来,找到下面代码,将其注释或删除,具体代码因模板而异

代码: 全选
<div id=”cartAdd”>
    <?php
      echo $display_qty;
      echo $display_button;
            ?>
          </div>

此条目发表在 Zencart 分类目录。将固定链接加入收藏夹。

发表评论