Subversion Repositories SmartDukaan

Rev

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

Rev 5945 Rev 6241
Line 80... Line 80...
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
		String afterArrival = null;
-
 
85
		String showPrice = "TRUE";
85
		Item minPriceItem = null;
86
		Item minPriceItem = null;
86
		for(Item item: items){
87
		for(Item item: items){
87
			Map<String, String> itemDetail = new HashMap<String, String>();
88
			Map<String, String> itemDetail = new HashMap<String, String>();
88
			boolean showmrp = true;
89
			boolean showmrp = true;
89
			double sellingPrice = item.getSellingPrice();
90
			double sellingPrice = item.getSellingPrice();
Line 119... Line 120...
119
			itemDetail.put("IS_SELECTED", item.isDefaultForEntity() ? "SELECTED" : "");
120
			itemDetail.put("IS_SELECTED", item.isDefaultForEntity() ? "SELECTED" : "");
120
			itemDetails.add(itemDetail);
121
			itemDetails.add(itemDetail);
121
			
122
			
122
			if(item.getItemStatus().equals(status.COMING_SOON)){
123
			if(item.getItemStatus().equals(status.COMING_SOON)){
123
				afterArrival = "after arrival";
124
				afterArrival = "after arrival";
-
 
125
				if(!item.isShowSellingPrice()){
-
 
126
					showPrice = "FALSE";
-
 
127
				}
124
			}
128
			}
125
			String bestDealsText = item.getBestDealText();
129
			String bestDealsText = item.getBestDealText();
126
			if( bestDealsText != null && bestDealsText.length() > 0 && offerText == null && status.ACTIVE.equals(item.getItemStatus())){
130
			if( bestDealsText != null && bestDealsText.length() > 0 && offerText == null && status.ACTIVE.equals(item.getItemStatus())){
127
				offerText = bestDealsText;
131
				offerText = bestDealsText;
128
			}
132
			}
Line 153... Line 157...
153
		context.put("minPriceItem", minPriceItem);
157
		context.put("minPriceItem", minPriceItem);
154
		context.put("domain", domain);
158
		context.put("domain", domain);
155
		context.put("staticurl", staticurl);
159
		context.put("staticurl", staticurl);
156
		context.put("OFFER_TEXT", offerText);
160
		context.put("OFFER_TEXT", offerText);
157
		context.put("AFTER_ARRIVAL", afterArrival);
161
		context.put("AFTER_ARRIVAL", afterArrival);
-
 
162
		context.put("SHOW_PRICE", showPrice);
158
		List<String> filenames = new ArrayList<String>();
163
		List<String> filenames = new ArrayList<String>();
159
		filenames.add("ProductDetail");
164
		filenames.add("ProductDetail");
160
		filenames.add("WidgetSnippet");
165
		filenames.add("WidgetSnippet");
161
		filenames.add("HomeSnippet");
166
		filenames.add("HomeSnippet");
162
		filenames.add("SearchSnippet");
167
		filenames.add("SearchSnippet");