| Line 53... |
Line 53... |
| 53 |
PROXY_MESH_GENERAL = "de.proxymesh.com:31280"
|
53 |
PROXY_MESH_GENERAL = "de.proxymesh.com:31280"
|
| 54 |
PROXY_FLIPKART = "117.240.187.35:3128"
|
54 |
PROXY_FLIPKART = "117.240.187.35:3128"
|
| 55 |
|
55 |
|
| 56 |
PUSH_NOTIFICATION_URL='http://api.profittill.com/admin/users/push'
|
56 |
PUSH_NOTIFICATION_URL='http://api.profittill.com/admin/users/push'
|
| 57 |
DTR_API_BASIC_AUTH = base64.encodestring('%s:%s' % ("dtr", "dtr18Feb2015")).replace('\n', '')
|
57 |
DTR_API_BASIC_AUTH = base64.encodestring('%s:%s' % ("dtr", "dtr18Feb2015")).replace('\n', '')
|
| - |
|
58 |
EMAIL_CRM_PUSH_URL = 'http://api.profittill.com/feedbacks/crm_mail'
|
| 58 |
statusMap = {1:'Active',2:'EOL',3:'In Process',4:'Exclusive'}
|
59 |
statusMap = {1:'Active',2:'EOL',3:'In Process',4:'Exclusive'}
|
| 59 |
SOURCE_MAP = {'AMAZON':1,'FLIPKART':2,'SNAPDEAL':3,'SAHOLIC':4, 'SHOPCLUES.COM':5,'PAYTM.COM':6, 'HOMESHOP18.COM':7}
|
60 |
SOURCE_MAP = {'AMAZON':1,'FLIPKART':2,'SNAPDEAL':3,'SAHOLIC':4, 'SHOPCLUES.COM':5,'PAYTM.COM':6, 'HOMESHOP18.COM':7}
|
| 60 |
|
61 |
|
| 61 |
CB_INIT = 'Waiting Confirmation'
|
62 |
CB_INIT = 'Waiting Confirmation'
|
| 62 |
CB_PENDING = 'Pending'
|
63 |
CB_PENDING = 'Pending'
|
| Line 406... |
Line 407... |
| 406 |
elif storeId == 3:
|
407 |
elif storeId == 3:
|
| 407 |
skuData = get_mongo_connection().Catalog.MasterData.find_one({'secondaryIdentifier':identifier, 'source_id':storeId})
|
408 |
skuData = get_mongo_connection().Catalog.MasterData.find_one({'secondaryIdentifier':identifier, 'source_id':storeId})
|
| 408 |
return skuData
|
409 |
return skuData
|
| 409 |
|
410 |
|
| 410 |
def sendCrmProjectMail(userId,disposition_description,disposition_comments):
|
411 |
def sendCrmProjectMail(userId,disposition_description,disposition_comments):
|
| 411 |
headers = {
|
- |
|
| 412 |
'User-agent':'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36',
|
- |
|
| 413 |
'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
- |
|
| 414 |
'Accept-Language' : 'en-US,en;q=0.8',
|
- |
|
| 415 |
'Accept-Charset' : 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
|
- |
|
| 416 |
'Connection':'keep-alive',
|
- |
|
| 417 |
'Accept-Encoding' : 'gzip,deflate,sdch'
|
- |
|
| 418 |
}
|
- |
|
| 419 |
DTR_API_BASIC_AUTH = base64.encodestring('%s:%s' % ("dtr", "dtr18Feb2015")).replace('\n', '')
|
- |
|
| 420 |
parameters = ("user_id", userId),("subject", disposition_description),("message",disposition_comments)
|
412 |
parameters = ("user_id", userId),("subject", disposition_description),("message",disposition_comments)
|
| 421 |
parameters = urllib.urlencode(parameters)
|
413 |
parameters = urllib.urlencode(parameters)
|
| 422 |
pushpostrequest = urllib2.Request("http://staging.profittill.com/feedbacks/crm_mail", parameters, headers=headers)
|
- |
|
| 423 |
pushpostrequest.add_header("Authorization", "Basic %s" % DTR_API_BASIC_AUTH)
|
- |
|
| 424 |
urllib2.urlopen(pushpostrequest).read()
|
- |
|
| 425 |
|
414 |
emailpushrequest = urllib2.Request(EMAIL_CRM_PUSH_URL, parameters, headers=headers)
|
| - |
|
415 |
emailpushrequest.add_header("Authorization", "Basic %s" % DTR_API_BASIC_AUTH)
|
| - |
|
416 |
urllib2.urlopen(emailpushrequest).read()
|
| - |
|
417 |
|
| 426 |
|
418 |
|