Subversion Repositories SmartDukaan

Rev

Rev 6602 | Rev 7287 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6602 Rev 6792
Line 80... Line 80...
80
	 * @return
80
	 * @return
81
	 */
81
	 */
82
	public double insertPriceInHtml(List<Item> items, long catalogId, String domain, String exportPath, Source source){
82
	public double insertPriceInHtml(List<Item> items, long catalogId, String domain, String exportPath, Source source){
83
		List<Map<String, String>> itemDetails = new ArrayList<Map<String,String>>();
83
		List<Map<String, String>> itemDetails = new ArrayList<Map<String,String>>();
84
		String offerText = null;
84
		String offerText = null;
-
 
85
		String offerDetailText = null;
-
 
86
		String offerDetailLink = null;
85
		String afterArrival = null;
87
		String afterArrival = null;
86
		String showPrice = "TRUE";
88
		String showPrice = "TRUE";
87
		Item minPriceItem = null;
89
		Item minPriceItem = null;
88
		for(Item item: items){
90
		for(Item item: items){
89
			Map<String, String> itemDetail = new HashMap<String, String>();
91
			Map<String, String> itemDetail = new HashMap<String, String>();
Line 128... Line 130...
128
				}
130
				}
129
			}
131
			}
130
			String bestDealsText = item.getBestDealText();
132
			String bestDealsText = item.getBestDealText();
131
			if( bestDealsText != null && bestDealsText.length() > 0 && offerText == null && status.ACTIVE.equals(item.getItemStatus())){
133
			if( bestDealsText != null && bestDealsText.length() > 0 && offerText == null && status.ACTIVE.equals(item.getItemStatus())){
132
				offerText = bestDealsText;
134
				offerText = bestDealsText;
-
 
135
				String bestDealsDetailsText = item.getBestDealsDetailsText();
-
 
136
				if( bestDealsDetailsText != null && bestDealsDetailsText.length() > 0){
-
 
137
					offerDetailText = bestDealsDetailsText;
-
 
138
				}
-
 
139
				String bestDealsDetailsLink = item.getBestDealsDetailsLink();
-
 
140
				if( bestDealsDetailsLink != null && bestDealsDetailsLink.length() > 0){
-
 
141
					offerDetailLink = bestDealsDetailsLink;
-
 
142
				}
133
			}
143
			}
134
		}
144
		}
135
		
145
		
136
		
146
		
137
		
147
		
Line 157... Line 167...
157
		context.put("itemDetails", itemDetails);
167
		context.put("itemDetails", itemDetails);
158
		context.put("minPriceItem", minPriceItem);
168
		context.put("minPriceItem", minPriceItem);
159
		context.put("domain", domain);
169
		context.put("domain", domain);
160
		context.put("staticurl", staticurl);
170
		context.put("staticurl", staticurl);
161
		context.put("OFFER_TEXT", offerText);
171
		context.put("OFFER_TEXT", offerText);
-
 
172
		context.put("OFFER_DETAIL_TEXT", offerDetailText);
-
 
173
		context.put("OFFER_DETAIL_LINK", offerDetailLink);
162
		context.put("AFTER_ARRIVAL", afterArrival);
174
		context.put("AFTER_ARRIVAL", afterArrival);
163
		context.put("SHOW_PRICE", showPrice);
175
		context.put("SHOW_PRICE", showPrice);
164
		List<String> filenames = new ArrayList<String>();
176
		List<String> filenames = new ArrayList<String>();
165
		filenames.add("ProductDetail");
177
		filenames.add("ProductDetail");
166
		filenames.add("WidgetSnippet");
178
		filenames.add("WidgetSnippet");