Free Shipping if over $X, not with a coupon
Hi markwhoo,
How to write the code to check if the buyer is local and if the amount over $X, then no shipping charge include in the check out. If the buyer to redeem the coupon during the check out, then the total amount will also deduct the coupon amount as well.
e.g.
Case user=local and total_amt>=$100
total_amt=total_amt
if coupon="Y"
net_amt=(total_amt) - (coupon_amt)
else
net_amt=total_amt
Case user not=local or (user=local and total_amt <$100)
total_amt=total_amt+shipping charge
if coupon="Y"
net_amt=(total_amt) - (coupon_amt)
else
net_amt=total_amt
Above only my logic and I don't know whether the logic is OK or not. Besides, I don't know how to programming and intergrated with the checkout module to make it working.
Please give advise.
Thanks and regards,
Andy
X-cart 4.0.13
|