Subversion Repositories SmartDukaan

Rev

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

Rev 7263 Rev 7323
Line 19... Line 19...
19
    private Double advanceAmount;
19
    private Double advanceAmount;
20
    private Long deliveryDate;
20
    private Long deliveryDate;
21
    private String displayDate;
21
    private String displayDate;
22
    private String dealText;
22
    private String dealText;
23
    private String pin;
23
    private String pin;
-
 
24
    private String imageSource;
24
    
25
    
25
    public String index() {
26
    public String index() {
26
        
27
        
27
        /**
28
        /**
28
         * The following code should be in create method.*********************************************************************
29
         * The following code should be in create method.*********************************************************************
29
         */
30
         */
30
        try {
31
        try {
31
            CatalogClient csc = new CatalogClient();
32
            CatalogClient csc = new CatalogClient();
32
            setItem(csc.getClient().getItem(product_id));
33
            setItem(csc.getClient().getItem(product_id));
33
            
34
            
-
 
35
            //csc.getClient().getStorePricing(product_id).getBEstDEal
-
 
36
            
34
            setDealText("Get a house free with this product");
37
            setDealText("Get a house free with this product");
35
            
38
            
36
       } catch (Exception e) {
39
       } catch (Exception e) {
37
           log.error("Unable to get item from catalog service", e);
40
           log.error("Unable to get item from catalog service", e);
38
       }
41
       }
Line 49... Line 52...
49
    
52
    
50
    public String getProductName() {
53
    public String getProductName() {
51
        return item.getBrand() 
54
        return item.getBrand() 
52
                + (item.getModelName() == null ? "" : " " + item.getModelName())
55
                + (item.getModelName() == null ? "" : " " + item.getModelName())
53
                + (item.getModelNumber() == null ? "" : " " + item.getModelNumber())
56
                + (item.getModelNumber() == null ? "" : " " + item.getModelNumber())
54
                + (item.getColor() == null ? "" : " (" + item.getColor() + ")");
57
                + (item.getColor() == null || item.getColor() == "" ? "" : " (" + item.getColor() + ")");
55
    }
58
    }
56
    
59
    
57
    public String getPricingDetails() {
60
    public String getPricingDetails() {
58
 
61
 
59
        SimpleDateFormat sdf = new SimpleDateFormat("h:m a, d MMMM yyyy");
62
        SimpleDateFormat sdf = new SimpleDateFormat("h:m a, d MMMM yyyy");
Line 133... Line 136...
133
        return pin;
136
        return pin;
134
    }
137
    }
135
 
138
 
136
    public void setProduct_id(long product_id) {
139
    public void setProduct_id(long product_id) {
137
        this.itemId = product_id;
140
        this.itemId = product_id;
-
 
141
        this.product_id = product_id;
138
    }
142
    }
139
 
143
 
140
    public long getProduct_id() {
144
    public long getProduct_id() {
141
        return product_id;
145
        return product_id;
142
    }
146
    }
143
 
147
 
-
 
148
    public String getImageSource() {
-
 
149
        return "/storewebsite/images/website/" + Long.toString(item.getCatalogItemId()) + "/default.jpg";
-
 
150
    }
-
 
151
 
-
 
152
    public void setImageSource(String imageSource) {
-
 
153
        this.imageSource = imageSource;
-
 
154
    }
-
 
155
 
144
}
156
}