I have searched the forums before posting this so please excuse me if this has been discussed and I have overlooked it.
I am using v1.5.1.3
I have cloned and modified the Pickup From Store shipping module to create a Local Delivery shipping module and they both work perfectly as is. However, I would like to require a minimum order total amount (before taxes, if possible) in order for them to be able to select Local Delivery.
I have looked on the boards and noticed there is a countProducts() function but I am unable to find one that would be something like orderTotal(). Is this a built in function or does it need to be coded? In which file would I add this in order to compare orderTotal() to my minimum order total requirement? I'm going to be hard coding the minimum total with something like if(orderTotal() > 25).
Current I have a simple note below the Local Delivery option that says not to choose it if your order total is below $25.
I know PHP very well so once I now where this needs to be placed it shouldn't be a problem...
Thanks!
Add this to your shipping module.
if ($this->cart->getSubTotal() < '100') {
$status = FALSE;
}
if ($this->cart->getSubTotal() < '100') {
$status = FALSE;
}
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Hey guys,
It is in the same folder just a different file: confirm.tpl
catalogue/view/theme/default/template/checkout/confirm.tpl
Line 46 (at least on mine site):
<?php if ($this->cart->getSubtotal() >= XXX) { ?>
<div class="payment"><?php echo $payment; ?></div>
<?php } else { ?>
<div class="warning">Minimum Order on this site is XXX $</div>
<?php } ?>
Hope this helped you.
JadeYe
It is in the same folder just a different file: confirm.tpl
catalogue/view/theme/default/template/checkout/confirm.tpl
Line 46 (at least on mine site):
<?php if ($this->cart->getSubtotal() >= XXX) { ?>
<div class="payment"><?php echo $payment; ?></div>
<?php } else { ?>
<div class="warning">Minimum Order on this site is XXX $</div>
<?php } ?>
Hope this helped you.
JadeYe
http://nwg.co.il/
“Compassion is the basis of morality.”
― Arthur Schopenhauer
Who is online
Users browsing this forum: No registered users and 34 guests