| Line 43... |
Line 43... |
| 43 |
if (data.discountedPrice != undefined && parseInt(data.discountedPrice) >= 0) {
|
43 |
if (data.discountedPrice != undefined && parseInt(data.discountedPrice) >= 0) {
|
| 44 |
document.getElementById("addCoupon").style.display = "none";
|
44 |
document.getElementById("addCoupon").style.display = "none";
|
| 45 |
document.getElementById("removeCoupon").style.display = "block";
|
45 |
document.getElementById("removeCoupon").style.display = "block";
|
| 46 |
if (data.couponCode.length > 0) {
|
46 |
if (data.couponCode.length > 0) {
|
| 47 |
document.getElementById("removeCoupon").innerHTML = "Remove Coupon: " + data.couponCode;
|
47 |
document.getElementById("removeCoupon").innerHTML = "Remove Coupon: " + data.couponCode;
|
| - |
|
48 |
if ( typeof _gaq != "undefined" && _gaq != null) {
|
| - |
|
49 |
_gaq.push(["_trackEvent", "COUPON", "Coupon Applied", data.couponCode, itemString]);
|
| - |
|
50 |
}
|
| 48 |
}else{
|
51 |
}else{
|
| 49 |
document.getElementById("removeCoupon").innerHTML = "Remove Coupon";
|
52 |
document.getElementById("removeCoupon").innerHTML = "Remove Coupon";
|
| 50 |
}
|
53 |
}
|
| 51 |
document.getElementById("discount").style.display = "block";
|
54 |
document.getElementById("discount").style.display = "block";
|
| 52 |
var discount = parseInt(data.totalPrice) - parseInt(data.discountedPrice);
|
55 |
var discount = parseInt(data.totalPrice) - parseInt(data.discountedPrice);
|
| 53 |
document.getElementById("discountAmt").innerHTML = discount;
|
56 |
document.getElementById("discountAmt").innerHTML = discount;
|
| Line 59... |
Line 62... |
| 59 |
}
|
62 |
}
|
| 60 |
|
63 |
|
| 61 |
function clearcoupon(code) {
|
64 |
function clearcoupon(code) {
|
| 62 |
var url = base_url + "cart/couponClear/" + code;
|
65 |
var url = base_url + "cart/couponClear/" + code;
|
| 63 |
microAjax(url, function(res) {
|
66 |
microAjax(url, function(res) {
|
| - |
|
67 |
if ( typeof _gaq != "undefined" && _gaq != null) {
|
| - |
|
68 |
_gaq.push(["_trackEvent", "COUPON", "Coupon Removed", code]);
|
| - |
|
69 |
}
|
| 64 |
var data = JSON.parse(res);
|
70 |
var data = JSON.parse(res);
|
| 65 |
var message = data.message;
|
71 |
var message = data.message;
|
| 66 |
var total = data.totalPrice;
|
72 |
var total = data.totalPrice;
|
| 67 |
document.getElementById("addCoupon").style.display = "block";
|
73 |
document.getElementById("addCoupon").style.display = "block";
|
| 68 |
document.getElementById("removeCoupon").style.display = "none";
|
74 |
document.getElementById("removeCoupon").style.display = "none";
|