| Line 79... |
Line 79... |
| 79 |
* @return
|
79 |
* @return
|
| 80 |
*/
|
80 |
*/
|
| 81 |
public double insertPriceInHtml(List<Item> items, long catalogId, String domain, String exportPath, Source source){
|
81 |
public double insertPriceInHtml(List<Item> items, long catalogId, String domain, String exportPath, Source source){
|
| 82 |
List<Map<String, String>> itemDetails = new ArrayList<Map<String,String>>();
|
82 |
List<Map<String, String>> itemDetails = new ArrayList<Map<String,String>>();
|
| 83 |
String offerText = null;
|
83 |
String offerText = null;
|
| - |
|
84 |
String afterArrival = null;
|
| 84 |
Item minPriceItem = null;
|
85 |
Item minPriceItem = null;
|
| 85 |
for(Item item: items){
|
86 |
for(Item item: items){
|
| 86 |
Map<String, String> itemDetail = new HashMap<String, String>();
|
87 |
Map<String, String> itemDetail = new HashMap<String, String>();
|
| 87 |
boolean showmrp = true;
|
88 |
boolean showmrp = true;
|
| 88 |
double sellingPrice = item.getSellingPrice();
|
89 |
double sellingPrice = item.getSellingPrice();
|
| Line 116... |
Line 117... |
| 116 |
itemDetail.put("CATALOG_ID", ((int)item.getCatalogItemId())+"");
|
117 |
itemDetail.put("CATALOG_ID", ((int)item.getCatalogItemId())+"");
|
| 117 |
itemDetail.put("SHOWMRP", showmrp +"");
|
118 |
itemDetail.put("SHOWMRP", showmrp +"");
|
| 118 |
itemDetail.put("IS_SELECTED", item.isDefaultForEntity() ? "SELECTED" : "");
|
119 |
itemDetail.put("IS_SELECTED", item.isDefaultForEntity() ? "SELECTED" : "");
|
| 119 |
itemDetails.add(itemDetail);
|
120 |
itemDetails.add(itemDetail);
|
| 120 |
|
121 |
|
| - |
|
122 |
if(item.getItemStatus().equals(status.COMING_SOON)){
|
| - |
|
123 |
afterArrival = "after arrival";
|
| - |
|
124 |
}
|
| 121 |
String bestDealsText = item.getBestDealText();
|
125 |
String bestDealsText = item.getBestDealText();
|
| 122 |
if( bestDealsText != null && bestDealsText.length() > 0 && offerText == null && status.ACTIVE.equals(item.getItemStatus())){
|
126 |
if( bestDealsText != null && bestDealsText.length() > 0 && offerText == null && status.ACTIVE.equals(item.getItemStatus())){
|
| 123 |
offerText = bestDealsText;
|
127 |
offerText = bestDealsText;
|
| 124 |
}
|
128 |
}
|
| 125 |
}
|
129 |
}
|
| Line 148... |
Line 152... |
| 148 |
context.put("itemDetails", itemDetails);
|
152 |
context.put("itemDetails", itemDetails);
|
| 149 |
context.put("minPriceItem", minPriceItem);
|
153 |
context.put("minPriceItem", minPriceItem);
|
| 150 |
context.put("domain", domain);
|
154 |
context.put("domain", domain);
|
| 151 |
context.put("staticurl", staticurl);
|
155 |
context.put("staticurl", staticurl);
|
| 152 |
context.put("OFFER_TEXT", offerText);
|
156 |
context.put("OFFER_TEXT", offerText);
|
| 153 |
|
- |
|
| - |
|
157 |
context.put("AFTER_ARRIVAL", afterArrival);
|
| 154 |
List<String> filenames = new ArrayList<String>();
|
158 |
List<String> filenames = new ArrayList<String>();
|
| 155 |
filenames.add("ProductDetail");
|
159 |
filenames.add("ProductDetail");
|
| 156 |
filenames.add("WidgetSnippet");
|
160 |
filenames.add("WidgetSnippet");
|
| 157 |
filenames.add("HomeSnippet");
|
161 |
filenames.add("HomeSnippet");
|
| 158 |
filenames.add("SearchSnippet");
|
162 |
filenames.add("SearchSnippet");
|