【问题标题】:Opencart does not show coupon boxOpencart 不显示优惠券框
【发布时间】:2014-11-26 15:45:26
【问题描述】:

我有一个网站http://www.pentrim.com - 当您点击购物车时,它会将您带到要求您输入礼券的页面 - 我想用礼券框替换它!

我在 opencart 后端添加了一张优惠券,但没有出现该框 - 这让我觉得我的模板或 opencart 配置中可能缺少某些东西。

有人可以帮我确定缺少什么吗?

【问题讨论】:

    标签: opencart


    【解决方案1】:

    转到您的来源:catalog\view\theme\pentrim\template\checkout\cart.tpl

    从 cart.tpl 文件中查找并删除以下代码。

    <?php if ($coupon_status || $voucher_status || $reward_status || $shipping_status) { ?>
      <h2><?php echo $text_next; ?></h2>
      <div class="content">
        <p><?php echo $text_next_choice; ?></p>
        <table class="radio">
          <?php if ($coupon_status) { ?>
          <tr class="highlight">
            <td><?php if ($next == 'coupon') { ?>
              <input type="radio" name="next" value="coupon" id="use_coupon" checked="checked" />
              <?php } else { ?>
              <input type="radio" name="next" value="coupon" id="use_coupon" />
              <?php } ?></td>
            <td><label for="use_coupon"><?php echo $text_use_coupon; ?></label></td>
          </tr>
          <?php } ?>
          <?php if ($voucher_status) { ?>
          <tr class="highlight">
            <td><?php if ($next == 'voucher') { ?>
              <input type="radio" name="next" value="voucher" id="use_voucher" checked="checked" />
              <?php } else { ?>
              <input type="radio" name="next" value="voucher" id="use_voucher" />
              <?php } ?></td>
            <td><label for="use_voucher"><?php echo $text_use_voucher; ?></label></td>
          </tr>
          <?php } ?>
          <?php if ($reward_status) { ?>
          <tr class="highlight">
            <td><?php if ($next == 'reward') { ?>
              <input type="radio" name="next" value="reward" id="use_reward" checked="checked" />
              <?php } else { ?>
              <input type="radio" name="next" value="reward" id="use_reward" />
              <?php } ?></td>
            <td><label for="use_reward"><?php echo $text_use_reward; ?></label></td>
          </tr>
          <?php } ?>
          <?php if ($shipping_status) { ?>
          <tr class="highlight">
            <td><?php if ($next == 'shipping') { ?>
              <input type="radio" name="next" value="shipping" id="shipping_estimate" checked="checked" />
              <?php } else { ?>
              <input type="radio" name="next" value="shipping" id="shipping_estimate" />
              <?php } ?></td>
            <td><label for="shipping_estimate"><?php echo $text_shipping_estimate; ?></label></td>
          </tr>
          <?php } ?>
        </table>
      </div>
      <div class="cart-module">
        <div id="coupon" class="content" style="display: <?php echo ($next == 'coupon' ? 'block' : 'none'); ?>;">
          <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
            <?php echo $entry_coupon; ?>&nbsp;
            <input type="text" name="coupon" value="<?php echo $coupon; ?>" />
            <input type="hidden" name="next" value="coupon" />
            &nbsp;
            <input type="submit" value="<?php echo $button_coupon; ?>" class="button" />
          </form>
        </div>
        <div id="voucher" class="content" style="display: <?php echo ($next == 'voucher' ? 'block' : 'none'); ?>;">
          <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
            <?php echo $entry_voucher; ?>&nbsp;
            <input type="text" name="voucher" value="<?php echo $voucher; ?>" />
            <input type="hidden" name="next" value="voucher" />
            &nbsp;
            <input type="submit" value="<?php echo $button_voucher; ?>" class="button" />
          </form>
        </div>
        <div id="reward" class="content" style="display: <?php echo ($next == 'reward' ? 'block' : 'none'); ?>;">
          <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
            <?php echo $entry_reward; ?>&nbsp;
            <input type="text" name="reward" value="<?php echo $reward; ?>" />
            <input type="hidden" name="next" value="reward" />
            &nbsp;
            <input type="submit" value="<?php echo $button_reward; ?>" class="button" />
          </form>
        </div>
        <div id="shipping" class="content" style="display: <?php echo ($next == 'shipping' ? 'block' : 'none'); ?>;">
          <p><?php echo $text_shipping_detail; ?></p>
          <table>
            <tr>
              <td><span class="required">*</span> <?php echo $entry_country; ?></td>
              <td><select name="country_id">
                  <option value=""><?php echo $text_select; ?></option>
                  <?php foreach ($countries as $country) { ?>
                  <?php if ($country['country_id'] == $country_id) { ?>
                  <option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
                  <?php } else { ?>
                  <option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
                  <?php } ?>
                  <?php } ?>
                </select></td>
            </tr>
            <tr>
              <td><span class="required">*</span> <?php echo $entry_zone; ?></td>
              <td><select name="zone_id">
                </select></td>
            </tr>
            <tr>
              <td><span id="postcode-required" class="required">*</span> <?php echo $entry_postcode; ?></td>
              <td><input type="text" name="postcode" value="<?php echo $postcode; ?>" /></td>
            </tr>
          </table>
          <input type="button" value="<?php echo $button_quote; ?>" id="button-quote" class="button" />
        </div>
      </div>
      <?php } ?>
    

    添加下方代码而不是上方删除代码:

    <div id="coupon" class="content">
          <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
            <?php echo $entry_coupon; ?>&nbsp;
            <input type="text" name="coupon" value="<?php echo $coupon; ?>" />
            <input type="hidden" name="next" value="coupon" />
            &nbsp;
            <input type="submit" value="<?php echo $button_coupon; ?>" class="button" />
          </form>
        </div>
    

    【讨论】:

      【解决方案2】:

      你应该去 extensions>order totals>copoun 然后将状态更改为启用

      【讨论】:

        猜你喜欢
        • 2018-05-17
        • 2012-03-07
        • 2015-03-17
        • 1970-01-01
        • 2012-08-30
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多