Subversion Repositories SmartDukaan

Rev

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

Rev 19354 Rev 19355
Line 2679... Line 2679...
2679
    try:
2679
    try:
2680
        if promoOffer is not None:
2680
        if promoOffer is not None:
2681
            offer = get_mongo_connection().Catalog.Promotions.find_one({'_id':promoOffer.get('offer_id')})
2681
            offer = get_mongo_connection().Catalog.Promotions.find_one({'_id':promoOffer.get('offer_id')})
2682
            if offer is None:
2682
            if offer is None:
2683
                raise
2683
                raise
2684
            promo = Promotion(offer.get('_id'),"",offer.get('offer_description') , offer.get('categories_applicable'), offer.get('sub_categories_not_applicable'),
2684
            promo = Promotion(offer.get('_id'),offer.get('offer_name'),offer.get('offer_description') , offer.get('categories_applicable'), offer.get('sub_categories_not_applicable'),
2685
                     offer.get('startDate'), offer.get('endDate'), promoOffer.get('target1'), promoOffer.get('target1_cash_back_percetage'), promoOffer.get('target2'), promoOffer.get('target2_cash_back_percetage'), promoOffer.get('maxCashBack'), offer.get('url'),
2685
                     offer.get('startDate'), offer.get('endDate'), promoOffer.get('target1'), promoOffer.get('target1_cash_back_percetage'), promoOffer.get('target2'), promoOffer.get('target2_cash_back_percetage'), promoOffer.get('maxCashBack'), offer.get('url'),
2686
                     promoOffer.get('pending_order_value'), promoOffer.get('delivered_order_value'), promoOffer.get('last_run_timestamp'))
2686
                     promoOffer.get('pending_order_value'), promoOffer.get('delivered_order_value'), promoOffer.get('last_run_timestamp'))
2687
            
2687
            
2688
            promo.offer_name = "Get upto %d%% cashback"%(promo.target2_cash_back_percetage)
2688
            promo.offer_description = "Get upto %d%% cashback"%(promo.target2_cash_back_percetage)
-
 
2689
    
2689
            specialOffer = promo.__dict__
2690
            specialOffer = promo.__dict__
2690
    except:
2691
    except:
2691
        pass
2692
        pass
2692
    return specialOffer
2693
    return specialOffer
2693
 
2694