I need to add a coupon code and apply a discount for against only one item in cart
Here is the code...
Cart.php session code...
<?php
if (!session_id()) session_start();
if((((isset($_FILES["Coupon"]))?$_FILES["Coupon"][""]:"") != "")) {
$_SESSION["Session_PromoCode"] = "".((isset($_FILES["Coupon"]))?$_FILES["Coupon"][""]:"") ."";
}
?>
..................................................................................................................
Coupon Code code in cart.php...
<form id="form1CouponCode" name="form1CouponCode" method="post" action="">
<label><span class="style10">Coupon Code</span>
<input name="Coupon Code" type="text" id="Coupon Code" size="8" maxlength="8" />
</label>
<label>
<div align="right">
<input type="submit" name="Submit" id="Submit" value="Submit" />
.............................................................................................................
Add to cart button code on the product page...
<input type="hidden" name="IsACart_3_ID_Add" value="100106" >
<span class="style1"> Style:</span>
<select name="IsACart_3_Style_Add">
<option value="Feathers" selected>Feathers</option>
<option value="Beads">Beads</option>
<option value="Gems">Gems</option>
</select>
</p>
<p align="left">
<input type="text" name="IsACart_3_Quantity_Add" value="1" size="4" >
<input type="image" src="../WA_eCart/Images/Poppy/Btn4_EN_addtocart.gif" border="0" value="Add to Cart" name="IsACart_3_ATC" />
</p>
</form>
..........................................................................................................
And in isACart_PHP.php...
//Discounts
$this->Discounts[] = new WA_eCart_Rule(urldecode("PromoCode"), true, "WAEC_IsACart_PromoCode");