Subversion Repositories SmartDukaan

Rev

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

Rev 5407 Rev 5555
Line 20... Line 20...
20
from shop2020.model.v1.user.impl.CartDataAccessors import create_cart, get_cart,\
20
from shop2020.model.v1.user.impl.CartDataAccessors import create_cart, get_cart,\
21
    get_cart_by_id, get_carts_between, add_item_to_cart,\
21
    get_cart_by_id, get_carts_between, add_item_to_cart,\
22
    add_address_to_cart, commit_cart,\
22
    add_address_to_cart, commit_cart,\
23
    validate_cart, merge_cart, delete_item_from_cart, check_out, reset_cart,\
23
    validate_cart, merge_cart, delete_item_from_cart, check_out, reset_cart,\
24
    apply_coupon_to_cart, remove_coupon, get_carts_with_coupon_count,\
24
    apply_coupon_to_cart, remove_coupon, get_carts_with_coupon_count,\
25
    delete_discounts_from_cart, save_discounts, show_cod_option
25
    delete_discounts_from_cart, save_discounts, show_cod_option,\
-
 
26
    add_store_to_cart
26
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_cart, to_t_address, to_t_user_communication,\
27
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_cart, to_t_address, to_t_user_communication,\
27
     to_t_master_affiliate, to_t_affiliate, to_t_tracker, to_t_track_log,\
28
     to_t_master_affiliate, to_t_affiliate, to_t_tracker, to_t_track_log,\
28
    to_t_user_note
29
    to_t_user_note
29
 
30
 
30
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
31
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
Line 798... Line 799...
798
        '''
799
        '''
799
        try:
800
        try:
800
            return show_cod_option(cartId, sourceId, pincode)
801
            return show_cod_option(cartId, sourceId, pincode)
801
        finally:
802
        finally:
802
            self.closeSession()
803
            self.closeSession()
-
 
804
 
-
 
805
 
-
 
806
    def addStoreToCart(self, cartId, storeId):
803
    
807
        """
-
 
808
        Parameters:
-
 
809
         - cartId
-
 
810
         - storeId
-
 
811
        """
-
 
812
        try:
-
 
813
            return add_store_to_cart(cartId, storeId)
-
 
814
        finally:
-
 
815
            self.closeSession()
-
 
816
            
804
    def closeSession(self, ):
817
    def closeSession(self, ):
805
        CartDataAccessors.close_session()
818
        CartDataAccessors.close_session()
806
        UserDataAccessors.close_session()
819
        UserDataAccessors.close_session()
807
 
820
 
808
    def isAlive(self, ):
821
    def isAlive(self, ):