Subversion Repositories SmartDukaan

Rev

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

Rev 5614 Rev 5716
Line 37... Line 37...
37
    private long addressId = -1;
37
    private long addressId = -1;
38
    private String totalAmount = "";
38
    private String totalAmount = "";
39
    private boolean showCodOption = true;
39
    private boolean showCodOption = true;
40
    private boolean showEmiOption = false;
40
    private boolean showEmiOption = false;
41
    private String errorMsg = "";
41
    private String errorMsg = "";
-
 
42
    private String deliveryLocation = ""; //This could be set as myLocation or HotSpot
-
 
43
    private boolean showStorePickUpOption = false;
-
 
44
    private long hotSpotAddressId = 1;
42
    
45
    
43
    public String index(){
46
    public String index(){
44
        return processPaymentOptions();
47
        return processPaymentOptions();
45
    }
48
    }
46
    
49
    
Line 78... Line 81...
78
        String itemIdString = "";
81
        String itemIdString = "";
79
        try {
82
        try {
80
            userContextServiceClient = new UserClient();
83
            userContextServiceClient = new UserClient();
81
            userClient = userContextServiceClient.getClient();
84
            userClient = userContextServiceClient.getClient();
82
            
85
            
-
 
86
            
83
            long cartId = userinfo.getCartId();
87
            long cartId = userinfo.getCartId();
-
 
88
            if(deliveryLocation.equals("myLocation")) {
-
 
89
                userClient.addStoreToCart(cartId, 0);
84
                  
90
            }
-
 
91
            
-
 
92
            if (deliveryLocation.equals("HotSpot")) {
-
 
93
                addressId = hotSpotAddressId ;
-
 
94
                showStorePickUpOption = true;
-
 
95
            }
85
            // Validate the cart to ensure that we are not accepting payment for
96
            // Validate the cart to ensure that we are not accepting payment for
86
            // an invalid order.
97
            // an invalid order.
87
            errorMsg = userClient.validateCart(cartId, sourceId);
98
            errorMsg = userClient.validateCart(cartId, sourceId);
88
            
99
            
89
            Cart cart = userClient.getCart(cartId);
100
            Cart cart = userClient.getCart(cartId);
Line 170... Line 181...
170
			url = "?" + url;
181
			url = "?" + url;
171
		}
182
		}
172
		url = request.getRequestURI() + url;
183
		url = request.getRequestURI() + url;
173
		return pageLoader.getHeaderHtml(userinfo.isLoggedIn(), userinfo.getEmail(), url , 0, false);
184
		return pageLoader.getHeaderHtml(userinfo.isLoggedIn(), userinfo.getEmail(), url , 0, false);
174
	}
185
	}
-
 
186
 
-
 
187
    public String getDeliveryLocation() {
-
 
188
        return deliveryLocation;
-
 
189
    }
-
 
190
 
-
 
191
    public void setDeliveryLocation(String deliveryLocation) {
-
 
192
        this.deliveryLocation = deliveryLocation;
-
 
193
    }
-
 
194
 
-
 
195
    public long getHotSpotAddressId() {
-
 
196
        return hotSpotAddressId;
-
 
197
    }
-
 
198
 
-
 
199
    public void setHotSpotAddressId(long hotSpotAddressId) {
-
 
200
        this.hotSpotAddressId = hotSpotAddressId;
-
 
201
    }
-
 
202
 
-
 
203
    public boolean shouldShowStorePickUpOption() {
-
 
204
        return showStorePickUpOption;
-
 
205
    }
175
}
206
}
176
207