Subversion Repositories SmartDukaan

Rev

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

Rev 3929 Rev 3964
Line 51... Line 51...
51
	}
51
	}
52
 
52
 
53
	
53
	
54
    
54
    
55
	/**
55
	/**
-
 
56
	 * Get the minimum mrp of the items
-
 
57
	 * @param items
-
 
58
	 * @return
-
 
59
	 */
-
 
60
	private double getMinMRP(List<Item> items){
-
 
61
        double minPrice = Double.MAX_VALUE;
-
 
62
        for(Item item: items){
-
 
63
            if(minPrice > item.getMrp()){
-
 
64
                minPrice =  item.getMrp();
-
 
65
            }
-
 
66
        }
-
 
67
        return minPrice;
-
 
68
    }
-
 
69
	
-
 
70
	
-
 
71
    
-
 
72
	/**
56
	 * Get the minimum price of the items
73
	 * Get the minimum price of the items
57
	 * @param items
74
	 * @param items
58
	 * @return
75
	 * @return
59
	 */
76
	 */
60
	private double getMinPrice(List<Item> items){
77
	private double getMinPrice(List<Item> items){
Line 122... Line 139...
122
			irDataXMLSnippets.add(this.xmlIndentation[2] + "<ProductURL>" + url + "</ProductURL>");
139
			irDataXMLSnippets.add(this.xmlIndentation[2] + "<ProductURL>" + url + "</ProductURL>");
123
 
140
 
124
			
141
			
125
			irDataXMLSnippets.add(this.xmlIndentation[2] + "<ProductPrice>" + getMinPrice(items) + "</ProductPrice>");
142
			irDataXMLSnippets.add(this.xmlIndentation[2] + "<ProductPrice>" + getMinPrice(items) + "</ProductPrice>");
126
			
143
			
-
 
144
			irDataXMLSnippets.add(this.xmlIndentation[2] + "<ProductMRP>" + getMinMRP(items) + "</ProductMRP>");
-
 
145
			
127
			irDataXMLSnippets.add(this.xmlIndentation[2] + "<ProductImageURL>" + imageUrl + "</ProductImageURL>");
146
			irDataXMLSnippets.add(this.xmlIndentation[2] + "<ProductImageURL>" + imageUrl + "</ProductImageURL>");
128
			
147
			
129
			irDataXMLSnippets.add(this.xmlIndentation[1] + "</products>");		
148
			irDataXMLSnippets.add(this.xmlIndentation[1] + "</products>");		
130
		}
149
		}
131
	}
150
	}