Subversion Repositories SmartDukaan

Rev

Rev 11852 | Rev 11888 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11852 Rev 11885
Line 41... Line 41...
41
      if (message.length > 0) {
41
      if (message.length > 0) {
42
        document.getElementById("coupon-msg").innerHTML = message;
42
        document.getElementById("coupon-msg").innerHTML = message;
43
      }
43
      }
44
      //if (data.discountedPrice != undefined && parseInt(data.discountedPrice) >= 0) {
44
      //if (data.discountedPrice != undefined && parseInt(data.discountedPrice) >= 0) {
45
      if (data.couponCode != undefined && data.couponCode.length > 0) {
45
      if (data.couponCode != undefined && data.couponCode.length > 0) {
-
 
46
	var dealtextdivs = document.getElementsByClassName('dealdiv');
-
 
47
	for(var i in dealtextdivs){
-
 
48
 		if(dealtextdivs[i].innerHTML===undefined)continue;
-
 
49
		var item_id = dealtextdivs[i].getAttribute('id');
-
 
50
		dealtextdivs[i].innerHTML = data.dealTextArray[item_id];
-
 
51
		if(data.dealTextArray[item_id]==''){
-
 
52
			dealtextdivs[i].style.display='none';
-
 
53
		}
-
 
54
	}
46
        //document.getElementById("addCoupon").style.display = "none";
55
        //document.getElementById("addCoupon").style.display = "none";
47
        document.getElementById("removeCoupon").style.display = "block";
56
        document.getElementById("removeCoupon").style.display = "block";
48
        if (data.couponCode.length > 0) {
57
        if (data.couponCode.length > 0) {
49
          document.getElementById("removeCoupon").innerHTML = "Remove Coupon: " + data.couponCode;
58
          document.getElementById("removeCoupon").innerHTML = "Remove Coupon: " + data.couponCode;
50
          if ( typeof _gaq != "undefined" && _gaq != null) {
59
          if ( typeof _gaq != "undefined" && _gaq != null) {