| 7272 |
amit.gupta |
1 |
function toggle(containerId){
|
|
|
2 |
var divC = document.getElementById(containerId);
|
|
|
3 |
if (divC.style.display == 'none') {
|
|
|
4 |
divC.style.display = 'block';
|
|
|
5 |
} else if (divC.style.display == 'block'){
|
|
|
6 |
divC.style.display = 'none';
|
|
|
7 |
}
|
|
|
8 |
else {
|
|
|
9 |
divC.style.display = 'none';
|
|
|
10 |
}
|
|
|
11 |
}
|
|
|
12 |
|
|
|
13 |
$(function(){
|
|
|
14 |
function CollapsibleWidget(container) {
|
|
|
15 |
|
|
|
16 |
this.widgetContainer = container;
|
|
|
17 |
this.collapsbiles = $(container).children('.common-widget-control-bar, .common-widget-content-area');
|
|
|
18 |
this.isCollapsed = null;
|
|
|
19 |
|
|
|
20 |
this.collapse = function() {
|
|
|
21 |
$(this.collapsbiles).each(function() {
|
|
|
22 |
$(this).slideUp();
|
|
|
23 |
});
|
|
|
24 |
this.isCollapsed = true;
|
|
|
25 |
};
|
|
|
26 |
|
|
|
27 |
this.open = function() {
|
|
|
28 |
$(this.collapsbiles).each(function() {
|
|
|
29 |
$(this).slideDown();
|
|
|
30 |
});
|
|
|
31 |
this.isCollapsed = false;
|
|
|
32 |
};
|
|
|
33 |
|
|
|
34 |
this.test = function() {
|
|
|
35 |
};
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
ResearchWidget.prototype = new CollapsibleWidget();
|
|
|
39 |
ResearchWidget.prototype.constructor = CollapsibleWidget;
|
|
|
40 |
|
|
|
41 |
function ResearchWidget(container) {
|
|
|
42 |
CollapsibleWidget.call(this, container);
|
|
|
43 |
}
|
|
|
44 |
|
|
|
45 |
function updateCompareCount() {
|
|
|
46 |
$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
|
|
|
47 |
}
|
|
|
48 |
|
|
|
49 |
/** Sidebar Widgets **/
|
|
|
50 |
|
|
|
51 |
$('#otg_know_more,.otg_know_more').click(function(){
|
|
|
52 |
$.colorbox({
|
|
|
53 |
width: "490px",
|
|
|
54 |
height: "420px",
|
|
|
55 |
inline: true,
|
|
|
56 |
href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
|
|
|
57 |
"<p style='text-align: justify; margin-left: 12px; margin-right: 12px; margin-bottom: 9px; line-height: 22px;'>Saholic stands for 100% on time delivery. We ensure all your orders reach your doorstep on or "+
|
|
|
58 |
"before the promised delivery date. In the rare case that we deliver an order later than promised "+
|
|
|
59 |
"we will compensate you.This Guarantee is Valid on"+
|
|
|
60 |
"</p>" +
|
|
|
61 |
"<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'><li>All Mobiles, Cameras, Laptops, Tablets and Accessories above Rs. 2000 in value."+
|
|
|
62 |
"</li>"+
|
|
|
63 |
"<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
|
|
|
64 |
"</li>"+
|
|
|
65 |
"</ul>"+
|
|
|
66 |
"<p style='text-align: justify; line-height: 22px; margin: 12px;'>Compensation for delay is in the form of Gift Vouchers at the rate of Rs. 50 per business day. " +
|
|
|
67 |
"GV can be applied to ANY product on Saholic.com without limitation.</p>"+
|
|
|
68 |
"<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px; color: #006699';>Detailed Terms & Conditions</a></span>",
|
|
|
69 |
onComplete: function(){
|
|
|
70 |
trackEventWithGA('Widget', 'OTG Know More is clicked', '');
|
|
|
71 |
}
|
|
|
72 |
});
|
|
|
73 |
});
|
|
|
74 |
|
|
|
75 |
$('#shoppingExpInfo').click(function(){
|
|
|
76 |
$.colorbox({
|
|
|
77 |
width: "550px",
|
|
|
78 |
height: "320px",
|
|
|
79 |
inline: true,
|
|
|
80 |
href: "<h3>Shopping with Saholic.com is completely safe</h3><br />" +
|
|
|
81 |
"<b>1.</b> We are part of Spice Group - India's # 1 Mobile retailer.<br /><br />" +
|
|
|
82 |
"<b>2.</b> We procure directly from the Manufacturers - Hence we only sell genuine products with full Manufacturer Warranty.<br /><br />" +
|
|
|
83 |
"<b>3.</b> We provide free Next Day Delivery to most locations - You can check the delivery time to your location by entering your pin code on the product page.<br /><br />" +
|
|
|
84 |
"<b>4.</b> We use the best Internet Security technology - Your payment is 100% secure.<br />",
|
|
|
85 |
onComplete: function(){
|
|
|
86 |
trackEventWithGA('Widget', 'Safe shopping sticky banner is clicked', '');
|
|
|
87 |
}
|
|
|
88 |
});
|
|
|
89 |
});
|
|
|
90 |
|
|
|
91 |
|
|
|
92 |
$('.insuranceInfo').click(function(){
|
|
|
93 |
$.colorbox({
|
|
|
94 |
width: "520px",
|
|
|
95 |
height: "280px",
|
|
|
96 |
inline: true,
|
|
|
97 |
href: "<h3 style='font-size:15px; text-align:center; font-weight:bold; margin-left:15px; margin-top:5px;margin-bottom:10px'>Exclusively at Saholic</h3>" +
|
|
|
98 |
"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
|
|
|
99 |
"<li>Only Saholic brings to you an option to protect your smartphone against theft and burglary.</li>"+
|
|
|
100 |
"<li>While buying your favourite mobile from Saholic, you can opt for 1 year WorldWide theft insurance.</li>"+
|
|
|
101 |
"<li>Introductory offer - You can opt for insurance by paying an all inclusive nominal fee of 1.5% of price of your mobile.</li>"+
|
|
|
102 |
"<a target='_blank' href='/static/insurance-terms' style='float: right; text-decoration: none;color:#006699';>Detailed Terms and Conditions</a>"+
|
|
|
103 |
"</ul>",
|
|
|
104 |
onComplete: function(){
|
|
|
105 |
trackEventWithGA('Widget', 'Insurance sticky banner is clicked', '');
|
|
|
106 |
}
|
|
|
107 |
});
|
|
|
108 |
});
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
$('.emiInfo').click(function(){
|
|
|
112 |
$.colorbox({
|
|
|
113 |
width: "590px",
|
|
|
114 |
height: "480px",
|
|
|
115 |
inline: true,
|
|
|
116 |
href: "<h3 style='font-size: 15px; text-align: center; font-weight: bold; margin-left: 15px; margin-bottom: 10px; margin-top: 7px;'>Completely Free EMI For 3 Months</h3>" +
|
|
|
117 |
"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hdfc-icon.png' style='vertical-align: middle;'></div>"+
|
|
|
118 |
"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9, 12 and 18 months.Completely free for 3 months<br><a onclick='toggle(\"emi-table-hdfc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
|
|
|
119 |
"<div id='emi-table-hdfc' style='padding-left: 5px; display: none;'>"+
|
|
|
120 |
"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
|
|
|
121 |
"<thead>"+
|
|
|
122 |
"<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
|
|
|
123 |
"</thead>"+
|
|
|
124 |
"<tbody>"+
|
|
|
125 |
"<tr>"+
|
|
|
126 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
|
|
|
127 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
|
|
|
128 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
|
|
|
129 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
|
|
|
130 |
"<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
|
|
|
131 |
"</tr>"+
|
|
|
132 |
"<tr>"+
|
|
|
133 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
|
|
|
134 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
|
|
|
135 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>7.04%</td>"+
|
|
|
136 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>9.67%</td>"+
|
|
|
137 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>15.36%</td>"+
|
|
|
138 |
"</tr>"+
|
|
|
139 |
"</tbody>"+
|
|
|
140 |
"</table>"+
|
|
|
141 |
"<br>"+
|
|
|
142 |
"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
|
|
|
143 |
"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
|
|
|
144 |
"<br>"+
|
|
|
145 |
"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
|
|
|
146 |
"</ul>"+
|
|
|
147 |
"<br>"+
|
|
|
148 |
"</div>"+
|
|
|
149 |
"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/citi-icon.png' style='vertical-align: middle;'></div>"+
|
|
|
150 |
"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-citi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
|
|
|
151 |
"<div id='emi-table-citi' style='padding-left: 5px;display: none;'>"+
|
|
|
152 |
"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
|
|
|
153 |
"<thead>"+
|
|
|
154 |
"<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='2'>All Inclusive Processing Fee*</th>"+
|
|
|
155 |
"</thead>"+
|
|
|
156 |
"<tbody>"+
|
|
|
157 |
"<tr>"+
|
|
|
158 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
|
|
|
159 |
"<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
|
|
|
160 |
"</tr>"+
|
|
|
161 |
"<tr>"+
|
|
|
162 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
|
|
|
163 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray; text-align: center;'>4.22%</td>"+
|
|
|
164 |
"</tr>"+
|
|
|
165 |
"</tbody>"+
|
|
|
166 |
"</table>"+
|
|
|
167 |
"<br>"+
|
|
|
168 |
"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
|
|
|
169 |
"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
|
|
|
170 |
"<br>"+
|
|
|
171 |
"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
|
|
|
172 |
"</ul>"+
|
|
|
173 |
"<br>"+
|
|
|
174 |
"</div>"+
|
|
|
175 |
"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/icici-icon.png' style='vertical-align: middle;'></div>"+
|
|
|
176 |
"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-icici\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
|
|
|
177 |
"<div id='emi-table-icici' style='padding-left: 5px;display: none;'>"+
|
|
|
178 |
"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
|
|
|
179 |
"<thead>"+
|
|
|
180 |
"<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
|
|
|
181 |
"</thead>"+
|
|
|
182 |
"<tbody>"+
|
|
|
183 |
"<tr>"+
|
|
|
184 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
|
|
|
185 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
|
|
|
186 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
|
|
|
187 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
|
|
|
188 |
"<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
|
|
|
189 |
"</tr>"+
|
|
|
190 |
"<tr>"+
|
|
|
191 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
|
|
|
192 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
|
|
|
193 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
|
|
|
194 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
|
|
|
195 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
|
|
|
196 |
"</tr>"+
|
|
|
197 |
"</tbody>"+
|
|
|
198 |
"</table>"+
|
|
|
199 |
"<br>"+
|
|
|
200 |
"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
|
|
|
201 |
"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
|
|
|
202 |
"<br>"+
|
|
|
203 |
"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
|
|
|
204 |
"</ul>"+
|
|
|
205 |
"<br>"+
|
|
|
206 |
"</div>"+
|
|
|
207 |
"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/sbi-icon.png' style='vertical-align: middle;'></div>"+
|
|
|
208 |
"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-sbi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
|
|
|
209 |
"<div id='emi-table-sbi' style='padding-left: 5px;display: none;'>"+
|
|
|
210 |
"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
|
|
|
211 |
"<thead>"+
|
|
|
212 |
"<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
|
|
|
213 |
"</thead>"+
|
|
|
214 |
"<tbody>"+
|
|
|
215 |
"<tr>"+
|
|
|
216 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
|
|
|
217 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
|
|
|
218 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
|
|
|
219 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
|
|
|
220 |
"<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
|
|
|
221 |
"</tr>"+
|
|
|
222 |
"<tr>"+
|
|
|
223 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
|
|
|
224 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
|
|
|
225 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
|
|
|
226 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
|
|
|
227 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
|
|
|
228 |
"</tr>"+
|
|
|
229 |
"</tbody>"+
|
|
|
230 |
"</table>"+
|
|
|
231 |
"<br>"+
|
|
|
232 |
"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
|
|
|
233 |
"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
|
|
|
234 |
"<br>"+
|
|
|
235 |
"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1000.</li>"+
|
|
|
236 |
"</ul>"+
|
|
|
237 |
"<br>"+
|
|
|
238 |
"</div>"+
|
|
|
239 |
"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hsbc-icon.png' style='vertical-align: middle;'></div>"+
|
|
|
240 |
"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-hsbc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
|
|
|
241 |
"<div id='emi-table-hsbc' style='padding-left: 5px;display:none;'>"+
|
|
|
242 |
"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
|
|
|
243 |
"<thead>"+
|
|
|
244 |
"<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
|
|
|
245 |
"</thead>"+
|
|
|
246 |
"<tbody>"+
|
|
|
247 |
"<tr>"+
|
|
|
248 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
|
|
|
249 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
|
|
|
250 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
|
|
|
251 |
"<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
|
|
|
252 |
"</tr>"+
|
|
|
253 |
"<tr>"+
|
|
|
254 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
|
|
|
255 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
|
|
|
256 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
|
|
|
257 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
|
|
|
258 |
"</tr>"+
|
|
|
259 |
"</tbody>"+
|
|
|
260 |
"</table>"+
|
|
|
261 |
"<br>"+
|
|
|
262 |
"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
|
|
|
263 |
"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
|
|
|
264 |
"<br>"+
|
|
|
265 |
"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
|
|
|
266 |
"</ul>"+
|
|
|
267 |
"<br>"+
|
|
|
268 |
"</div>"+
|
|
|
269 |
"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/std-chartered-icon.png' style='vertical-align: middle;'></div>"+
|
|
|
270 |
"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-std-chart\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
|
|
|
271 |
"<div id='emi-table-std-chart' style='padding-left: 5px;display: none;'>"+
|
|
|
272 |
"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
|
|
|
273 |
"<thead>"+
|
|
|
274 |
"<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
|
|
|
275 |
"</thead>"+
|
|
|
276 |
"<tbody>"+
|
|
|
277 |
"<tr>"+
|
|
|
278 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%%;'>3 Months</th>"+
|
|
|
279 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
|
|
|
280 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
|
|
|
281 |
"<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
|
|
|
282 |
"</tr>"+
|
|
|
283 |
"<tr>"+
|
|
|
284 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
|
|
|
285 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
|
|
|
286 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
|
|
|
287 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
|
|
|
288 |
"</tr>"+
|
|
|
289 |
"</tbody>"+
|
|
|
290 |
"</table>"+
|
|
|
291 |
"<br>"+
|
|
|
292 |
"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
|
|
|
293 |
"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
|
|
|
294 |
"<br>"+
|
|
|
295 |
"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 2500.</li>"+
|
|
|
296 |
"</ul>"+
|
|
|
297 |
"<br>"+
|
|
|
298 |
"</div>"+
|
|
|
299 |
"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/kotak-icon.png' style='vertical-align: middle;'></div>"+
|
|
|
300 |
"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-kotak\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
|
|
|
301 |
"<div id='emi-table-kotak' style='padding-left: 5px;display: none;'>"+
|
|
|
302 |
"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
|
|
|
303 |
"<thead>"+
|
|
|
304 |
"<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
|
|
|
305 |
"</thead>"+
|
|
|
306 |
"<tbody>"+
|
|
|
307 |
"<tr>"+
|
|
|
308 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
|
|
|
309 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
|
|
|
310 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
|
|
|
311 |
"<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
|
|
|
312 |
"</tr>"+
|
|
|
313 |
"<tr>"+
|
|
|
314 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
|
|
|
315 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
|
|
|
316 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
|
|
|
317 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
|
|
|
318 |
"</tr>"+
|
|
|
319 |
"</tbody>"+
|
|
|
320 |
"</table>"+
|
|
|
321 |
"<br>"+
|
|
|
322 |
"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
|
|
|
323 |
"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
|
|
|
324 |
"<br>"+
|
|
|
325 |
"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
|
|
|
326 |
"</ul>"+
|
|
|
327 |
"<br>"+
|
|
|
328 |
"</div>"+
|
|
|
329 |
"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/axis-icon.png' style='vertical-align: middle;'></div>"+
|
|
|
330 |
"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-axis\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
|
|
|
331 |
"<div id='emi-table-axis' style='padding-left: 5px;display: none;'>"+
|
|
|
332 |
"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
|
|
|
333 |
"<thead>"+
|
|
|
334 |
"<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
|
|
|
335 |
"</thead>"+
|
|
|
336 |
"<tbody>"+
|
|
|
337 |
"<tr>"+
|
|
|
338 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
|
|
|
339 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
|
|
|
340 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
|
|
|
341 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
|
|
|
342 |
"<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
|
|
|
343 |
"</tr>"+
|
|
|
344 |
"<tr>"+
|
|
|
345 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
|
|
|
346 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
|
|
|
347 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
|
|
|
348 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
|
|
|
349 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
|
|
|
350 |
"</tr>"+
|
|
|
351 |
"</tbody>"+
|
|
|
352 |
"</table>"+
|
|
|
353 |
"<br>"+
|
|
|
354 |
"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
|
|
|
355 |
"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
|
|
|
356 |
"<br>"+
|
|
|
357 |
"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 2500.</li>"+
|
|
|
358 |
"</ul>"+
|
|
|
359 |
"<br>"+
|
|
|
360 |
"</div>"+
|
|
|
361 |
"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/indusind-icon.png' style='vertical-align: middle;'></div>"+
|
|
|
362 |
"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-indus\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
|
|
|
363 |
"<div id='emi-table-indus' style='padding-left: 5px;display: none;'>"+
|
|
|
364 |
"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
|
|
|
365 |
"<thead>"+
|
|
|
366 |
"<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
|
|
|
367 |
"</thead>"+
|
|
|
368 |
"<tbody>"+
|
|
|
369 |
"<tr>"+
|
|
|
370 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
|
|
|
371 |
"<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
|
|
|
372 |
"<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
|
|
|
373 |
"</tr>"+
|
|
|
374 |
"<tr>"+
|
|
|
375 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%%</td>"+
|
|
|
376 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
|
|
|
377 |
"<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
|
|
|
378 |
"</tr>"+
|
|
|
379 |
"</tbody>"+
|
|
|
380 |
"</table>"+
|
|
|
381 |
"<br>"+
|
|
|
382 |
"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
|
|
|
383 |
"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
|
|
|
384 |
"<br>"+
|
|
|
385 |
"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
|
|
|
386 |
"</ul>"+
|
|
|
387 |
"<br>"+
|
|
|
388 |
"</div>"+
|
|
|
389 |
"<br><br>",
|
|
|
390 |
onComplete: function(){
|
|
|
391 |
trackEventWithGA('Widget', 'Emi info widget is clicked', '');
|
|
|
392 |
}
|
|
|
393 |
});
|
|
|
394 |
});
|
|
|
395 |
|
|
|
396 |
$('a.mk_best_deal_detail').live('click', function(){
|
|
|
397 |
var offerLinkHtml = '';
|
|
|
398 |
if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
|
|
|
399 |
offerLinkHtml = '<a target="_blank" href="' +OFFER_HELP_LINK + '" style="z-index: 1; float: right; bottom: 0px; right: 0px; margin: 15px; position: relative;">More</a></span>';
|
|
|
400 |
}
|
|
|
401 |
$.colorbox({
|
|
|
402 |
width: "550px",
|
|
|
403 |
height: "300px",
|
|
|
404 |
inline: true,
|
|
|
405 |
href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
|
|
|
406 |
'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
|
|
|
407 |
'</p><span class="right">' + offerLinkHtml
|
|
|
408 |
});
|
|
|
409 |
});
|
|
|
410 |
|
|
|
411 |
|
|
|
412 |
$('#pickupstoreInfo').click(function(){
|
|
|
413 |
$.colorbox({
|
|
|
414 |
width: "550px",
|
|
|
415 |
height: "370px",
|
|
|
416 |
inline: true,
|
|
|
417 |
href: "<h3>Frequently Asked Questions</h3><br />" +
|
|
|
418 |
"<b style='color: black; cursor: default;'>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
|
|
|
419 |
"<b style='color: black; cursor: default;'>A)</b> Buy Online from Saholic.Com and pickup your product from the nearest Spice Hotspot Retail Store.<br /><br />" +
|
|
|
420 |
"<b style='color: black; cursor: default;'>Q)</b> How do i avail this facility ?<br /><br />" +
|
|
|
421 |
"<b style='color: black; cursor: default;'>A)</b> Simply select Pickup In Store On the Shipping Page and select your nearest store. Please note this facility is available only in Delhi/NCR.</a><br /><br />"+
|
|
|
422 |
"<b style='color: black; cursor: default;'>Q)</b> When will the product be available for pickup ?<br /><br />" +
|
|
|
423 |
"<b style='color: black; cursor: default;'>A)</b> You can enter your pin code on the Product Page to find estimated time to deliver. After placing the order we will also give you the estimated date for pickup.</a><br /><br />",
|
|
|
424 |
|
|
|
425 |
onComplete: function(){
|
|
|
426 |
var ev = "Product Page";
|
|
|
427 |
var label = window.location.pathname;
|
|
|
428 |
if (label=="" || label=="#")
|
|
|
429 |
{
|
|
|
430 |
label = "";
|
|
|
431 |
ev = "Home Page";
|
|
|
432 |
}
|
|
|
433 |
else if (label.indexOf("shipping") != -1){
|
|
|
434 |
ev = "Shipping Page";
|
|
|
435 |
var blkstr = [];
|
|
|
436 |
jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
|
|
|
437 |
blkstr.push(str);
|
|
|
438 |
});
|
|
|
439 |
label = blkstr.join(", ");
|
|
|
440 |
} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
|
|
|
441 |
ev = "Category Page";
|
|
|
442 |
} else if (label.substr(label.lastIndexOf('-') + 1).length==7 && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
|
|
|
443 |
ev = "Product Page";
|
|
|
444 |
}
|
|
|
445 |
trackEventWithGA('Pickup in Store LightBox', ev, label);
|
|
|
446 |
}
|
|
|
447 |
});
|
|
|
448 |
});
|
|
|
449 |
|
|
|
450 |
$('.common-widget-top-bar').live('click', function(e, callback){
|
|
|
451 |
var isColapsed = $(this).data('is_colapsed') == true ? true : false;
|
|
|
452 |
var widgetBox = $(this).siblings('.common-widget-content-area');
|
|
|
453 |
var controlBox = $(this).siblings('.common-widget-control-bar');
|
|
|
454 |
var controlBoxArrowImg = $(this).find('img');
|
|
|
455 |
|
|
|
456 |
if (isColapsed) {
|
|
|
457 |
if(controlBox.length > 0) {
|
|
|
458 |
$(controlBox).slideDown('fast', function(){
|
|
|
459 |
$(widgetBox).slideDown('fast', callback);
|
|
|
460 |
$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
|
|
|
461 |
});
|
|
|
462 |
} else {
|
|
|
463 |
$(widgetBox).slideDown();
|
|
|
464 |
$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
|
|
|
465 |
}
|
|
|
466 |
} else {
|
|
|
467 |
$(widgetBox).slideUp(function(){
|
|
|
468 |
$(controlBox).slideUp('fast');
|
|
|
469 |
$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
|
|
|
470 |
});
|
|
|
471 |
}
|
|
|
472 |
$(this).data('is_colapsed', !isColapsed);
|
|
|
473 |
});
|
|
|
474 |
|
|
|
475 |
/**
|
|
|
476 |
* Update count of products checked for comparison
|
|
|
477 |
**/
|
|
|
478 |
$('#myresearch input[type="checkbox"]').live('click', function(){
|
|
|
479 |
updateCompareCount();
|
|
|
480 |
});
|
|
|
481 |
|
|
|
482 |
$("#research_compare").live('click', function(){
|
|
|
483 |
var seldata = "";
|
|
|
484 |
var prodnames = "";
|
|
|
485 |
var tot = 1;
|
|
|
486 |
var saprt = "";
|
|
|
487 |
var par = $('#myresearch').find('input[type=checkbox]:checked');
|
|
|
488 |
var haveSameProductType = true;
|
|
|
489 |
var productType = null;
|
|
|
490 |
|
|
|
491 |
$(par).each(function(){
|
|
|
492 |
|
|
|
493 |
if(productType != null && productType != $(this).attr('producttype')) {
|
|
|
494 |
haveSameProductType = false;
|
|
|
495 |
}
|
|
|
496 |
productType = $(this).attr('producttype');
|
|
|
497 |
|
|
|
498 |
if(tot == 1) {
|
|
|
499 |
prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
|
|
|
500 |
seldata += "p" + tot + "=" + $(this).val();
|
|
|
501 |
} else {
|
|
|
502 |
seldata += "&p" + tot + "=" + $(this).val();
|
|
|
503 |
prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
|
|
|
504 |
}
|
|
|
505 |
tot ++;
|
|
|
506 |
});
|
|
|
507 |
|
|
|
508 |
if(! haveSameProductType) {
|
|
|
509 |
alert("Only products of same category can be compared");
|
|
|
510 |
} else if(tot > 6) {
|
|
|
511 |
alert("Can compare upto five products only.");
|
|
|
512 |
} else if(tot > 2) {
|
|
|
513 |
window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
|
|
|
514 |
} else {
|
|
|
515 |
alert("Please select atleast two products");
|
|
|
516 |
}
|
|
|
517 |
});
|
|
|
518 |
|
|
|
519 |
$("#research_delete").live('click', function(){
|
|
|
520 |
var research_tot = $("#research_total").val();
|
|
|
521 |
var seldata = [];
|
|
|
522 |
var tot = 0;
|
|
|
523 |
var saprt = "";
|
|
|
524 |
var par = $('#myresearch').find('input[type=checkbox]:checked');
|
|
|
525 |
|
|
|
526 |
$(par).each(function(){
|
|
|
527 |
seldata.unshift($(this).val());
|
|
|
528 |
tot ++;
|
|
|
529 |
});
|
|
|
530 |
|
|
|
531 |
if(tot > 0) {
|
|
|
532 |
var t = (research_tot * 1) - (tot * 1);
|
|
|
533 |
$("#research_total").val(t);
|
|
|
534 |
|
|
|
535 |
jQuery.ajax({
|
|
|
536 |
type: "GET",
|
|
|
537 |
url: "/deletefromresearch/[" + seldata + "]?_method=delete",
|
|
|
538 |
success: function(msg) {
|
|
|
539 |
jQuery.each(seldata, function(intIndex, objValue){
|
|
|
540 |
delete_from_storage_set("resitems", objValue);
|
|
|
541 |
$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
|
|
|
542 |
$(this).remove();
|
|
|
543 |
if(t === 0) {
|
|
|
544 |
$("#research_default").css("display", "block");
|
|
|
545 |
}
|
|
|
546 |
});
|
|
|
547 |
});
|
|
|
548 |
|
|
|
549 |
//Updating the count
|
|
|
550 |
$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
|
|
|
551 |
|
|
|
552 |
if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0) {
|
|
|
553 |
$("#myresearch").children(".common-widget-top-bar").trigger('click');
|
|
|
554 |
}
|
|
|
555 |
}
|
|
|
556 |
});
|
|
|
557 |
} else {
|
|
|
558 |
alert("Please select atleast one product");
|
|
|
559 |
}
|
|
|
560 |
});
|
|
|
561 |
|
|
|
562 |
// No uid cookie
|
|
|
563 |
if (!$.cookie("uid")) {
|
|
|
564 |
// No uid in storage
|
|
|
565 |
if (!$.Storage.get("uid")) {
|
|
|
566 |
if (!$.Storage.get("resitems")) {
|
|
|
567 |
$.Storage.set("resitems", "[]");
|
|
|
568 |
}
|
|
|
569 |
if (!$.Storage.get("histitems")) {
|
|
|
570 |
$.Storage.set("histitems", "[]");
|
|
|
571 |
}
|
|
|
572 |
}
|
|
|
573 |
else { // uid in storage : logout
|
|
|
574 |
$.Storage.remove("uid");
|
|
|
575 |
$.Storage.set("resitems", "[]");
|
|
|
576 |
$.Storage.set("histitems", "[]");
|
|
|
577 |
}
|
|
|
578 |
load_research_widget();
|
|
|
579 |
load_history_widget();
|
|
|
580 |
}
|
|
|
581 |
else { // With uid cookie
|
|
|
582 |
var cookie = $.cookie("uid");
|
|
|
583 |
// Just logged in merge storage items
|
|
|
584 |
if (!$.Storage.get("uid")) {
|
|
|
585 |
$.Storage.set("uid", cookie);
|
|
|
586 |
merge_history_items();
|
|
|
587 |
load_research_items();
|
|
|
588 |
}
|
|
|
589 |
else {
|
|
|
590 |
// UID changed
|
|
|
591 |
if ( cookie != $.Storage.get("uid")) {
|
|
|
592 |
$.Storage.set("uid", cookie);
|
|
|
593 |
$.Storage.set("resitems", "[]");
|
|
|
594 |
$.Storage.set("histitems", "[]");
|
|
|
595 |
merge_history_items();
|
|
|
596 |
load_research_items();
|
|
|
597 |
}
|
|
|
598 |
else { // Uid is same
|
|
|
599 |
if (!$.Storage.get("resitems")) {
|
|
|
600 |
$.Storage.set("resitems", "[]");
|
|
|
601 |
load_research_items();
|
|
|
602 |
}
|
|
|
603 |
else {
|
|
|
604 |
load_research_widget();
|
|
|
605 |
}
|
|
|
606 |
|
|
|
607 |
if (!$.Storage.get("histitems")) {
|
|
|
608 |
$.Storage.set("histitems", "[]");
|
|
|
609 |
merge_history_items();
|
|
|
610 |
}
|
|
|
611 |
else {
|
|
|
612 |
load_history_widget();
|
|
|
613 |
}
|
|
|
614 |
}
|
|
|
615 |
}
|
|
|
616 |
}
|
|
|
617 |
|
|
|
618 |
function load_research_items(){
|
|
|
619 |
jQuery.ajax({
|
|
|
620 |
type: "GET",
|
|
|
621 |
url: "/myresearch",
|
|
|
622 |
cache: false,
|
|
|
623 |
success: function(json) {
|
|
|
624 |
$.Storage.set("resitems", json);
|
|
|
625 |
load_research_widget();
|
|
|
626 |
}
|
|
|
627 |
});
|
|
|
628 |
}
|
|
|
629 |
|
|
|
630 |
function load_research_widget(){
|
|
|
631 |
var myResearchWidgetContainer = $("#myresearch");
|
|
|
632 |
|
|
|
633 |
if($(myResearchWidgetContainer).length == 0) {
|
|
|
634 |
return;
|
|
|
635 |
}
|
|
|
636 |
var resitems = $.Storage.get("resitems");
|
|
|
637 |
|
|
|
638 |
if (resitems == "[]") {
|
|
|
639 |
var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
|
|
|
640 |
<tbody>\
|
|
|
641 |
<tr><td align="center"><b>Add items to compare list</b></td></tr>\
|
|
|
642 |
</tbody>\
|
|
|
643 |
</table>';
|
|
|
644 |
$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
|
|
|
645 |
$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
|
|
|
646 |
return;
|
|
|
647 |
}
|
|
|
648 |
var params = "/" + resitems;
|
|
|
649 |
|
|
|
650 |
jQuery.ajax({
|
|
|
651 |
type : "GET",
|
|
|
652 |
url : "/myresearch" + params,
|
|
|
653 |
cache: true,
|
|
|
654 |
success : function(html) {
|
|
|
655 |
$("#myresearch").html(html);
|
|
|
656 |
updateCompareCount();
|
|
|
657 |
|
|
|
658 |
// Product Title
|
|
|
659 |
$("#myresearch table td div a.truncate").each(function() {
|
|
|
660 |
$(this).truncate({addtitle : true});
|
|
|
661 |
});
|
|
|
662 |
|
|
|
663 |
// Product Price
|
|
|
664 |
$("#myresearch table td div div.price").each(function() {
|
|
|
665 |
$(this).truncate({addtitle : true});
|
|
|
666 |
});
|
|
|
667 |
|
|
|
668 |
// Product Details
|
|
|
669 |
$("#myresearch table td div div.text").each(function() {
|
|
|
670 |
$(this).truncate( {addtitle : true});
|
|
|
671 |
});
|
|
|
672 |
}
|
|
|
673 |
});
|
|
|
674 |
}
|
|
|
675 |
});
|