| Line 127... |
Line 127... |
| 127 |
String offerDetailText = null;
|
127 |
String offerDetailText = null;
|
| 128 |
String offerDetailLink = null;
|
128 |
String offerDetailLink = null;
|
| 129 |
String afterArrival = null;
|
129 |
String afterArrival = null;
|
| 130 |
String showPrice = "TRUE";
|
130 |
String showPrice = "TRUE";
|
| 131 |
Item minPriceItem = null;
|
131 |
Item minPriceItem = null;
|
| - |
|
132 |
double minDealPrice = 0d;
|
| 132 |
boolean isPrivateDeal = false;
|
133 |
boolean isPrivateDeal = false;
|
| - |
|
134 |
String privateDealText = null;
|
| - |
|
135 |
String dealAvailableString = "Available for color ";
|
| - |
|
136 |
|
| 133 |
for(Item item: items){
|
137 |
for(Item item: items){
|
| - |
|
138 |
String bestDealsText = item.getBestDealText();
|
| 134 |
Map<String, String> itemDetail = new HashMap<String, String>();
|
139 |
Map<String, String> itemDetail = new HashMap<String, String>();
|
| 135 |
ItemPojo itemPojo = new ItemPojo();
|
140 |
ItemPojo itemPojo = new ItemPojo();
|
| 136 |
boolean showmrp = true;
|
141 |
boolean showmrp = true;
|
| 137 |
double sellingPrice = item.getSellingPrice();
|
142 |
double sellingPrice = item.getSellingPrice();
|
| 138 |
double mrp = item.getMrp();
|
143 |
double mrp = item.getMrp();
|
| Line 186... |
Line 191... |
| 186 |
}
|
191 |
}
|
| 187 |
if(showmrp) {
|
192 |
if(showmrp) {
|
| 188 |
itemPojo.setMrp(mrp);
|
193 |
itemPojo.setMrp(mrp);
|
| 189 |
}
|
194 |
}
|
| 190 |
if(privateDealsMap.containsKey(item.getId()) && item.getItemStatus().equals(status.ACTIVE)){
|
195 |
if(privateDealsMap.containsKey(item.getId()) && item.getItemStatus().equals(status.ACTIVE)){
|
| - |
|
196 |
if (items.size()>1){
|
| - |
|
197 |
dealAvailableString += "<b>" + item.getColor() + "</b>, ";
|
| - |
|
198 |
}
|
| 191 |
PrivateDeal pd = privateDealsMap.get(item.getId());
|
199 |
PrivateDeal pd = privateDealsMap.get(item.getId());
|
| 192 |
isPrivateDeal = true;
|
200 |
isPrivateDeal = true;
|
| 193 |
itemDetail.put("DEAL_PRICE", String.format(Locale.getDefault(),"%.0f",pd.getDealPrice()));
|
201 |
itemDetail.put("DEAL_PRICE", String.format(Locale.getDefault(),"%.0f",pd.getDealPrice()));
|
| 194 |
PrivateDealPojo dealPojo = new PrivateDealPojo();
|
202 |
PrivateDealPojo dealPojo = new PrivateDealPojo();
|
| 195 |
dealPojo.setDealPrice(pd.getDealPrice());
|
203 |
dealPojo.setDealPrice(pd.getDealPrice());
|
| 196 |
dealPojo.setIsCod(pd.isIsCod());
|
204 |
dealPojo.setIsCod(pd.isIsCod());
|
| 197 |
dealPojo.setDealText(pd.getDealText());
|
205 |
dealPojo.setDealText(pd.getDealText());
|
| 198 |
dealPojo.setDealTextOption(pd.getDealTextOption());
|
206 |
dealPojo.setDealTextOption(pd.getDealTextOption());
|
| 199 |
dealPojo.setDealFreebieOption(pd.getDealFreebieOption());
|
207 |
dealPojo.setDealFreebieOption(pd.getDealFreebieOption());
|
| - |
|
208 |
if(pd.getDealTextOption()==1) {
|
| - |
|
209 |
privateDealText = bestDealsText;
|
| - |
|
210 |
} else if (pd.getDealTextOption()==2) {
|
| - |
|
211 |
privateDealText = pd.getDealText();
|
| - |
|
212 |
|
| - |
|
213 |
}
|
| 200 |
dealPojo.setFreebieItemId(pd.getDealFreebieItemId());
|
214 |
dealPojo.setFreebieItemId(pd.getDealFreebieItemId());
|
| 201 |
itemPojo.setDealPojo(dealPojo);
|
215 |
itemPojo.setDealPojo(dealPojo);
|
| - |
|
216 |
if(minDealPrice == 0d || minDealPrice > pd.getDealPrice()){
|
| - |
|
217 |
minDealPrice = pd.getDealPrice();
|
| - |
|
218 |
}
|
| 202 |
}
|
219 |
}
|
| 203 |
}
|
220 |
}
|
| 204 |
String bestDealsText = item.getBestDealText();
|
- |
|
| 205 |
if( bestDealsText != null && bestDealsText.length() > 0 && offerText == null && status.ACTIVE.equals(item.getItemStatus())){
|
221 |
if( bestDealsText != null && bestDealsText.length() > 0 && offerText == null && status.ACTIVE.equals(item.getItemStatus())){
|
| 206 |
offerText = bestDealsText;
|
222 |
offerText = bestDealsText;
|
| 207 |
String bestDealsDetailsText = item.getBestDealsDetailsText();
|
223 |
String bestDealsDetailsText = item.getBestDealsDetailsText();
|
| 208 |
if( bestDealsDetailsText != null && bestDealsDetailsText.length() > 0){
|
224 |
if( bestDealsDetailsText != null && bestDealsDetailsText.length() > 0){
|
| 209 |
offerDetailText = bestDealsDetailsText;
|
225 |
offerDetailText = bestDealsDetailsText;
|
| Line 247... |
Line 263... |
| 247 |
context.put("OFFER_DETAIL_LINK", offerDetailLink);
|
263 |
context.put("OFFER_DETAIL_LINK", offerDetailLink);
|
| 248 |
context.put("AFTER_ARRIVAL", afterArrival);
|
264 |
context.put("AFTER_ARRIVAL", afterArrival);
|
| 249 |
context.put("SHOW_PRICE", domain.contains("store")?"FALSE":showPrice);
|
265 |
context.put("SHOW_PRICE", domain.contains("store")?"FALSE":showPrice);
|
| 250 |
context.put("IS_STORE", domain.contains("store")?"TRUE":"FALSE");
|
266 |
context.put("IS_STORE", domain.contains("store")?"TRUE":"FALSE");
|
| 251 |
context.put("EMI", emiString);
|
267 |
context.put("EMI", emiString);
|
| - |
|
268 |
if(isPrivateDeal) {
|
| - |
|
269 |
context.put("PRIVATE_DEAL_TEXT", privateDealText);
|
| - |
|
270 |
context.put("PRIVATE_DEAL_PRICE", String.format(Locale.getDefault(),"%.0f",minDealPrice));
|
| - |
|
271 |
if(items.size()>1) context.put("AVAILABLE", dealAvailableString.substring(0, dealAvailableString.length()-3));
|
| - |
|
272 |
}
|
| 252 |
List<String> filenames = new ArrayList<String>();
|
273 |
List<String> filenames = new ArrayList<String>();
|
| 253 |
if(!domain.contains("store")){
|
274 |
if(!domain.contains("store")){
|
| 254 |
filenames.add("WidgetSnippet");
|
275 |
filenames.add("WidgetSnippet");
|
| 255 |
filenames.add("ProductPropertiesSnippet");
|
276 |
filenames.add("ProductPropertiesSnippet");
|
| 256 |
filenames.add("MyResearchSnippet");
|
277 |
filenames.add("MyResearchSnippet");
|