Coupon Help
I have an existing database driven coupon system. Pretty simple, but I need to add 2 more variables: One to only discount certain items (using itemID) and one to discount a particular category (catID).
Can a add this to the existing rule or do I need to create separate rules for each one?
Also, do I need to create new recordsets to filter on the cart.php page?
Not sure what the best approach is.
Thanks
Here's my existing rule.
//eCart Rule
function WAEC_ssdcart_Coupon() {
$totalDiscount = 0;
if (true && (($this->ConditionalTotal("Quantity", "Discountable", "1") > 0) && ((isset($_SESSION['PromoCode'])?$_SESSION['PromoCode']:"") == $_SESSION['PromoDiscount']) && (time() <= strtotime($_SESSION['PromoDate'])))) {
$totalDiscount += ($this->ConditionalTotal("TotalPrice", "Discountable", "1") * $_SESSION['PromoPrice']);//Result
}
return WA_eCart_FormatNumber($totalDiscount, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule