我有一个网站http://www.pentrim.com - 当您点击购物车时,它会将您带到一个页面,要求您输入礼券 - 我想用优惠券替换它!
我已经在opencart后端添加了优惠券,但是没有显示该框 - 这让我觉得我的模板或opencart配置中可能缺少某些内容。
有人可以帮我确定缺少什么吗?
答案 0 :(得分: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; ?>
<input type="text" name="coupon" value="<?php echo $coupon; ?>" />
<input type="hidden" name="next" value="coupon" />
<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; ?>
<input type="text" name="voucher" value="<?php echo $voucher; ?>" />
<input type="hidden" name="next" value="voucher" />
<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; ?>
<input type="text" name="reward" value="<?php echo $reward; ?>" />
<input type="hidden" name="next" value="reward" />
<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; ?>
<input type="text" name="coupon" value="<?php echo $coupon; ?>" />
<input type="hidden" name="next" value="coupon" />
<input type="submit" value="<?php echo $button_coupon; ?>" class="button" />
</form>
</div>
答案 1 :(得分:0)
您应该转到扩展程序&gt;订单总计&gt; copoun然后更改状态以启用