| Line 130... |
Line 130... |
| 130 |
String showPrice = "TRUE";
|
130 |
String showPrice = "TRUE";
|
| 131 |
Item minPriceItem = null;
|
131 |
Item minPriceItem = null;
|
| 132 |
double minDealPrice = 0d;
|
132 |
double minDealPrice = 0d;
|
| 133 |
boolean isPrivateDeal = false;
|
133 |
boolean isPrivateDeal = false;
|
| 134 |
String privateDealText = null;
|
134 |
String privateDealText = null;
|
| 135 |
String dealAvailableString = "Available for color ";
|
135 |
String dealAvailableString = "Available for color ";
|
| - |
|
136 |
int privateDealCounter = 0;
|
| 136 |
|
137 |
|
| 137 |
for(Item item: items){
|
138 |
for(Item item: items){
|
| 138 |
String bestDealsText = item.getBestDealText();
|
139 |
String bestDealsText = item.getBestDealText();
|
| 139 |
Map<String, String> itemDetail = new HashMap<String, String>();
|
140 |
Map<String, String> itemDetail = new HashMap<String, String>();
|
| 140 |
ItemPojo itemPojo = new ItemPojo();
|
141 |
ItemPojo itemPojo = new ItemPojo();
|
| Line 194... |
Line 195... |
| 194 |
}
|
195 |
}
|
| 195 |
if(privateDealsMap.containsKey(item.getId()) && item.getItemStatus().equals(status.ACTIVE)){
|
196 |
if(privateDealsMap.containsKey(item.getId()) && item.getItemStatus().equals(status.ACTIVE)){
|
| 196 |
if (items.size()>1){
|
197 |
if (items.size()>1){
|
| 197 |
dealAvailableString += "<b>" + item.getColor() + "</b>, ";
|
198 |
dealAvailableString += "<b>" + item.getColor() + "</b>, ";
|
| 198 |
}
|
199 |
}
|
| - |
|
200 |
privateDealCounter += 1;
|
| 199 |
PrivateDeal pd = privateDealsMap.get(item.getId());
|
201 |
PrivateDeal pd = privateDealsMap.get(item.getId());
|
| 200 |
isPrivateDeal = true;
|
202 |
isPrivateDeal = true;
|
| 201 |
itemDetail.put("DEAL_PRICE", String.format(Locale.getDefault(),"%.0f",pd.getDealPrice()));
|
203 |
itemDetail.put("DEAL_PRICE", String.format(Locale.getDefault(),"%.0f",pd.getDealPrice()));
|
| 202 |
PrivateDealPojo dealPojo = new PrivateDealPojo();
|
204 |
PrivateDealPojo dealPojo = new PrivateDealPojo();
|
| 203 |
dealPojo.setDealPrice(pd.getDealPrice());
|
205 |
dealPojo.setDealPrice(pd.getDealPrice());
|
| Line 266... |
Line 268... |
| 266 |
context.put("IS_STORE", domain.contains("store")?"TRUE":"FALSE");
|
268 |
context.put("IS_STORE", domain.contains("store")?"TRUE":"FALSE");
|
| 267 |
context.put("EMI", emiString);
|
269 |
context.put("EMI", emiString);
|
| 268 |
if(isPrivateDeal) {
|
270 |
if(isPrivateDeal) {
|
| 269 |
context.put("PRIVATE_DEAL_TEXT", privateDealText);
|
271 |
context.put("PRIVATE_DEAL_TEXT", privateDealText);
|
| 270 |
context.put("PRIVATE_DEAL_PRICE", String.format(Locale.getDefault(),"%.0f",minDealPrice));
|
272 |
context.put("PRIVATE_DEAL_PRICE", String.format(Locale.getDefault(),"%.0f",minDealPrice));
|
| - |
|
273 |
if(items.size()==privateDealCounter) {
|
| - |
|
274 |
context.put("AVAILABLE", "Available for all colors");
|
| - |
|
275 |
}
|
| 271 |
if(items.size()>1) context.put("AVAILABLE", dealAvailableString.substring(0, dealAvailableString.length()-3));
|
276 |
if(items.size()>1) context.put("AVAILABLE", dealAvailableString.substring(0, dealAvailableString.length()-3));
|
| 272 |
}
|
277 |
}
|
| 273 |
List<String> filenames = new ArrayList<String>();
|
278 |
List<String> filenames = new ArrayList<String>();
|
| 274 |
if(!domain.contains("store")){
|
279 |
if(!domain.contains("store")){
|
| 275 |
filenames.add("WidgetSnippet");
|
280 |
filenames.add("WidgetSnippet");
|