Hi All,
does anyone know a way to have a max number of items that can be put into a single card at one time?
ie: say i wanted to have a max number of items per cart load.. of say 2 items.
maybe a message saying your cart is full.
this might work for me, so will change this code alittle and see what occurs.1. This could possibly be better done with a proper Order Total Module
2. If you want an easy hack, you could make it a lot easier.
Try this:
EDIT: catalog/view/theme/default/template/checkout/confirm.tpl
FIND:
Code: Select all
<div id="payment"><?php echo $payment; ?></div>
REPLACE WITH:
Code: Select all
<?php if ((int)$this->cart->countProducts() > 4) { ?>
<div id="payment"><?php echo $payment; ?></div>
<?php } else { ?>
<div class="warning">You must purchase at least 5 items to checkout</div>
<?php } ?>
That's it. Only 1 file.
Code: Select all
<?php if ($comment) { ?>
<b style="margin-bottom: 3px; display: block;"><?php echo $text_comment; ?></b>
<div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;"><?php echo $comment; ?></div>
<?php } ?>
<?php if ((int)$this->cart->countProducts() <5) { ?>
<div id="payment"><?php echo $payment; ?></div>
<?php } else { ?>
<div class="warning">You cannot purchase more than 4 items to checkout, this is due only to shipping cost complexity</div>
<?php } ?>
however it would be nice to be able to stop them adding more than 4 products to the cart.
anyone got any ideas on how to do that?
Who is online
Users browsing this forum: Amazon [Bot] and 42 guests