Subversion Repositories SmartDukaan

Rev

Rev 18146 | Rev 18328 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18311 naman 1
<script>
2
	$(document).ready(function(){
3
	$('.seeproduct').click(function(){
4
		var proid = $(this).data("id");
5
		var identifier = $(this).data("identifier");
6
		var urll = apihost+"categories/saholicdeal/"+proid;
7
		$.ajax({
8
	        method: "GET",
9
	        url:  urll,
10
	    },'json')
11
	    .done(function(msg){
12
	    	if (typeof(Storage) !== "undefined") {
13
	        	localStorage.removeItem("productdetail");
14
				localStorage.setItem("productdetail",msg);
15
	    	}
16
	    });
17
 
18
		document.location = apihost+"categories/dealdetail/"+identifier;
19
		});
20
	});
21
</script>
22
 
23
<style>
24
	.seeproduct{cursor: crosshair !important;}
25
</style>
26
 
13672 anikendra 27
<div class="container">
14300 anikendra 28
	<ul class="nav nav-tabs noborder">
29
	  	<li class="col-xs-6 favswitch active" data-type="like">
30
	    	<a href="javascript:void(0);" >Liked Deals</a>
31
	    </li>
32
	    <li class="col-xs-6 favswitch" data-type="dislike">
33
	    	<a href="javascript:void(0);" >Disliked Deals</a>
34
	    </li>
35
	</ul>
13731 anikendra 36
	<?php echo $this->element('unlikemodal');?>
14300 anikendra 37
	<?php //debug($mydislikes);?>
13672 anikendra 38
	<?php if(!empty($myfavorites)):?>
14300 anikendra 39
		<?php foreach ($myfavorites as $key => $product):?>		
40
			<div class="row card like" id="fav-<?php echo $product['UserAction']['id'];?>">
18311 naman 41
				<div class="col-xs-4 productthumb <?php if($product['StoreProduct']['source_id'] == 4):?>seeproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $product['StoreProduct']['_id'];?>" <?php if($product['StoreProduct']['source_id'] == 4):?>data-identifier="<?php echo $product['StoreProduct']['identifier'];?>"<?php endif;?>>
13731 anikendra 42
					<?php if(!empty($product['StoreProduct']['thumbnail'])):?>
13962 anikendra 43
						<img src="<?php echo $base_url;?>app/webroot/timthumb.php?h=100&src=<?php echo $product['StoreProduct']['thumbnail'];?>" alt="<?php echo $product['StoreProduct']['source_product_name'];?>" class="productthumb"/>
13731 anikendra 44
					<?php else:?>
45
						<img src="<?php echo $base_url;?>timthumb.php?src=<?php echo $base_url;?>img/noimage.png&h=80" alt="<?php echo $product['StoreProduct']['title'];?>"/>
46
					<?php endif;?>
47
				</div>
18311 naman 48
				<div class="col-xs-6 productdetails <?php if($product['StoreProduct']['source_id'] == 4):?>seeproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $product['StoreProduct']['_id'];?>" data-identifier="<?php echo $product['StoreProduct']['identifier'];?>">
13962 anikendra 49
					<h5 class="producttitle"><?php echo $product['StoreProduct']['source_product_name'];?></h5>
14111 anikendra 50
					<div class="product_short_description <?php if(!isset($product['StoreProduct']['tagline'])):?>hidden<?php endif;?>"><?php echo $product['StoreProduct']['tagline'];?></div>
13731 anikendra 51
					<div class="product_prices row">
14111 anikendra 52
						<div><span class="rupee"></span><span class="product_price"><?php echo $product['StoreProduct']['available_price'];?></span>
18311 naman 53
				          <?php if(isset($product['StoreProduct']['cash_back_type']) && !empty($product['StoreProduct']['cash_back_type']) && $product['StoreProduct']['cash_back_type']!=0):?>
14111 anikendra 54
				            <?php if($product['StoreProduct']['cash_back_type'] == 2):?>
18311 naman 55
				            	+ <span class="cashbackrupee"></span> <span class="cashback"><?php echo $product['StoreProduct']['cash_back'];?></span> Cashback
14111 anikendra 56
			          	</div>
57
				            <?php else:?>
18311 naman 58
				            	<?php if($product['StoreProduct']['cash_back']>0):?>
59
				              		+ <?php echo $product['StoreProduct']['cash_back'];?> % Cashback
60
				              	<?php endif;?>
61
				            <?php endif;?> 
14111 anikendra 62
				          <?php endif;?>
63
			        	</div>
13731 anikendra 64
   					</div>
14111 anikendra 65
   					<div class="dealoffer <?php if(!isset($product['StoreProduct']['offer']) || empty($product['StoreProduct']['offer'])):?>hidden<?php endif;?> row">
66
			            <div class="col-xs-3 offerlabel">
67
			              OFFER
68
			            </div>
69
			            <div class="col-xs-9 offertext">
70
			              <?php echo $product['StoreProduct']['offer'];?>
71
			            </div>
72
			        </div> 
13672 anikendra 73
				</div>
13750 anikendra 74
				<div class="col-xs-2 text-right">
13731 anikendra 75
					<div class="deletefav" data-id="<?php echo $product['UserAction']['id'];?>"></div>
76
				</div>
77
			</div>
13672 anikendra 78
		<?php endforeach;?>
14300 anikendra 79
		<div class="row text-center clearfavs like" data-type="like">
13731 anikendra 80
			<div class="deleteallfavs"></div>
81
			<div class="clearlist">Clear List</div>
82
		</div>
13732 anikendra 83
	<?php else:?>
13737 anikendra 84
		<h3>Your Favourite list is empty</h3>
13672 anikendra 85
	<?php endif;?>
14300 anikendra 86
	<?php if(!empty($mydislikes)):?>
87
		<?php foreach ($mydislikes as $key => $product):?>		
88
			<div class="row card dislike hidden" id="fav-<?php echo $product['UserAction']['id'];?>">
18311 naman 89
				<div class="col-xs-4 productthumb <?php if($product['StoreProduct']['source_id'] == 4):?>seeproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $product['StoreProduct']['_id'];?>" data-identifier="<?php echo $product['StoreProduct']['identifier'];?>">
14300 anikendra 90
					<?php if(!empty($product['StoreProduct']['thumbnail'])):?>
91
						<img src="<?php echo $base_url;?>app/webroot/timthumb.php?h=100&src=<?php echo $product['StoreProduct']['thumbnail'];?>" alt="<?php echo $product['StoreProduct']['source_product_name'];?>" class="productthumb"/>
92
					<?php else:?>
17760 amit.gupta 93
						<img src="<?php echo $base_url;?>timthumb.php?src=<?php echo urlencode ($base_url);?>img/noimage.png&h=80" alt="<?php echo $product['StoreProduct']['title'];?>"/>
14300 anikendra 94
					<?php endif;?>
95
				</div>
18311 naman 96
				<div class="col-xs-6 productdetails <?php if($product['StoreProduct']['source_id'] == 4):?>seeproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $product['StoreProduct']['_id'];?>" data-identifier="<?php echo $product['StoreProduct']['identifier'];?>">
14300 anikendra 97
					<h5 class="producttitle"><?php echo $product['StoreProduct']['source_product_name'];?></h5>
98
					<div class="product_short_description <?php if(!isset($product['StoreProduct']['tagline'])):?>hidden<?php endif;?>"><?php echo $product['StoreProduct']['tagline'];?></div>
99
					<div class="product_prices row">
100
						<div><span class="rupee"></span><span class="product_price"><?php echo $product['StoreProduct']['available_price'];?></span>
18311 naman 101
				          <?php if(isset($product['StoreProduct']['cash_back_type']) && !empty($product['StoreProduct']['cash_back_type']) && $product['StoreProduct']['cash_back_type']!=0):?>
14300 anikendra 102
				            <?php if($product['StoreProduct']['cash_back_type'] == 2):?>
18311 naman 103
				             + <span class="cashbackrupee"></span> <span class="cashback"><?php echo $product['StoreProduct']['cash_back'];?></span> Cashback
14300 anikendra 104
			          	</div>
105
				            <?php else:?>
18311 naman 106
				            	<?php if($product['StoreProduct']['cash_back']>0):?>
107
				             		+ <?php echo $product['StoreProduct']['cash_back'];?> % Cashback
108
				             	<?php endif;?>
109
				            <?php endif;?> 
14300 anikendra 110
				          <?php endif;?>
111
			        	</div>
112
   					</div>
113
   					<div class="dealoffer <?php if(!isset($product['StoreProduct']['offer']) || empty($product['StoreProduct']['offer'])):?>hidden<?php endif;?> row">
114
			            <div class="col-xs-3 offerlabel">
115
			              OFFER
116
			            </div>
117
			            <div class="col-xs-9 offertext">
118
			              <?php echo $product['StoreProduct']['offer'];?>
119
			            </div>
120
			        </div> 
121
				</div>
122
				<div class="col-xs-2 text-right">
123
					<div class="deletefav" data-id="<?php echo $product['UserAction']['id'];?>"></div>
124
				</div>
125
			</div>
126
		<?php endforeach;?>
127
		<div class="row text-center clearfavs dislike hidden" data-type="dislike">
128
			<div class="deleteallfavs"></div>
129
			<div class="clearlist">Clear List</div>
130
		</div>
131
	<?php endif;?>
13698 anikendra 132
</div>
18146 amit.gupta 133
<script type="text/javascript" src="/js/jquery.jscroll.min.js?v=<?php echo $staticversion;?>"></script>
13731 anikendra 134
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
135
<script type="text/javascript" src="/js/profittill.js?v=<?php echo $staticversion;?>"></script>