2014-10-21 17:05
浏览 42


Just wondering if there is a way that I can add discounts to the shopping cart in Opencart.

Basically im wanting customers to be able to select an option, i,e size, then add bulk amounts to the shopping cart. This would then add say 1000 of this item directly to the shopping cart. Im trying to get something like this:

Buy 1000 or more for only £5.00 per unit [Add to cart]

Buy 2000 or more for only £4.50 per unit [Add to cart]

Here is my code so far, unfortunatly Im not sure how to get this working correctly so any help would be great.


<?php if ($discounts) { ?>
<br />
<div class="discount">
  <?php foreach ($discounts as $discount) { ?>
  <div class="discount-item">
  <h3>Buy <?php echo $discount['quantity']; ?> or more for only <?php echo $discount['price']; ?></h3>
  <a onClick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a>
  <?php } ?>
<?php } ?>
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题