| Line 218... |
Line 218... |
| 218 |
t_order.customer_name = user.name
|
218 |
t_order.customer_name = user.name
|
| 219 |
t_order.customer_email = user.email
|
219 |
t_order.customer_email = user.email
|
| 220 |
|
220 |
|
| 221 |
t_order.customer_pincode = address.pin
|
221 |
t_order.customer_pincode = address.pin
|
| 222 |
t_order.customer_address = get_address_string(address)
|
222 |
t_order.customer_address = get_address_string(address)
|
| - |
|
223 |
t_order.customer_city = address.city
|
| - |
|
224 |
t_order.customer_state = address.state
|
| 223 |
t_order.customer_mobilenumber = address.phone
|
225 |
t_order.customer_mobilenumber = address.phone
|
| 224 |
|
226 |
|
| 225 |
t_order.total_amount = t_line_item.total_price
|
227 |
t_order.total_amount = t_line_item.total_price
|
| 226 |
t_order.total_weight = t_line_item.total_weight
|
228 |
t_order.total_weight = t_line_item.total_weight
|
| 227 |
t_order.lineitems = [t_line_item]
|
229 |
t_order.lineitems = [t_line_item]
|
| Line 245... |
Line 247... |
| 245 |
inventory_client = InventoryClient().get_client()
|
247 |
inventory_client = InventoryClient().get_client()
|
| 246 |
item = inventory_client.getItem(item_id)
|
248 |
item = inventory_client.getItem(item_id)
|
| 247 |
t_line_item = TLineItem()
|
249 |
t_line_item = TLineItem()
|
| 248 |
t_line_item.model_name = item.modelName
|
250 |
t_line_item.model_name = item.modelName
|
| 249 |
t_line_item.model_number = item.modelNumber
|
251 |
t_line_item.model_number = item.modelNumber
|
| - |
|
252 |
if item.color is None or item.color == "NA":
|
| - |
|
253 |
t_line_item.color = ""
|
| - |
|
254 |
else:
|
| - |
|
255 |
t_line_item.color = item.color
|
| 250 |
t_line_item.extra_info = item.featureDescription
|
256 |
t_line_item.extra_info = item.featureDescription
|
| 251 |
t_line_item.brand = item.manufacturerName
|
257 |
t_line_item.brand = item.manufacturerName
|
| 252 |
t_line_item.sku_id = item.vendorItemId
|
258 |
t_line_item.sku_id = item.vendorItemId
|
| 253 |
t_line_item.quantity = 1
|
259 |
t_line_item.quantity = 1
|
| 254 |
t_line_item.unit_price = item.sellingPrice
|
260 |
t_line_item.unit_price = item.sellingPrice
|
| Line 256... |
Line 262... |
| 256 |
t_line_item.total_price = item.sellingPrice
|
262 |
t_line_item.total_price = item.sellingPrice
|
| 257 |
t_line_item.total_weight = item.weight
|
263 |
t_line_item.total_weight = item.weight
|
| 258 |
return t_line_item
|
264 |
return t_line_item
|
| 259 |
|
265 |
|
| 260 |
def get_address_string(address):
|
266 |
def get_address_string(address):
|
| 261 |
return address.line_1 + "\n" + address.line_2 + "\nLandmark: " + address.landmark + "\n" + address.city + "\n" + address.state + "\n" + address.country
|
267 |
return address.line_1 + "\n" + address.line_2 + "\n Landmark: " + address.landmark + "\n"
|
| 262 |
|
268 |
|
| 263 |
def validate_cart(cartId):
|
269 |
def validate_cart(cartId):
|
| 264 |
inventory_client = InventoryClient().get_client()
|
270 |
inventory_client = InventoryClient().get_client()
|
| 265 |
logistics_client = LogisticsClient().get_client()
|
271 |
logistics_client = LogisticsClient().get_client()
|
| 266 |
retval = True
|
272 |
retval = True
|