Subversion Repositories SmartDukaan

Rev

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

Rev 22301 Rev 22302
Line 26... Line 26...
26
import json
26
import json
27
import math
27
import math
28
import traceback
28
import traceback
29
 
29
 
30
 
30
 
-
 
31
#user_item_pricing_map = {174875149: {
-
 
32
#                                     26857:790,
-
 
33
#                                     12101: 1080,
-
 
34
#                                     26678: 3050,
-
 
35
#                                     26859: 3050,
-
 
36
#                                     26860: 3050
-
 
37
#                                     }
-
 
38
#                         }
-
 
39
 
31
user_item_pricing_map = {}
40
user_item_pricing_map = {}
32
 
41
 
33
def get_cart(userId):
42
def get_cart(userId):
34
    user = User.get_by(id=userId)
43
    user = User.get_by(id=userId)
35
    return user.active_cart
44
    return user.active_cart
Line 981... Line 990...
981
                tempBulkItemList.append({'quantity':1,'price':deals[item_id].dealPrice})
990
                tempBulkItemList.append({'quantity':1,'price':deals[item_id].dealPrice})
982
            if bulkPrice is None:
991
            if bulkPrice is None:
983
                line.actual_price = deals[item_id].dealPrice
992
                line.actual_price = deals[item_id].dealPrice
984
                if user_item_pricing and user_item_pricing.has_key(item_id):
993
                if user_item_pricing and user_item_pricing.has_key(item_id):
985
                    line.actual_price = user_item_pricing.get(item_id)
994
                    line.actual_price = user_item_pricing.get(item_id)
-
 
995
                    #users in item pricing can buy upto 200
-
 
996
                    cartItem['maxQuantity'] = min(200,item_shipping_info.quantity) 
986
            else:
997
            else:
987
                line.actual_price = bulkPrice.price
998
                line.actual_price = bulkPrice.price
988
            if deals[item_id].dealTextOption==0:
999
            if deals[item_id].dealTextOption==0:
989
                line.dealText = ''
1000
                line.dealText = ''
990
            if deals[item_id].dealTextOption==2:
1001
            if deals[item_id].dealTextOption==2: