ChangeShippingMethod() public method

public ChangeShippingMethod ( ShoppingCart cart, ShippingMethod shippingMethod ) : void
cart ShoppingCart
shippingMethod ShippingMethod
return void
Esempio n. 1
0
        public void ChangeShippingMethod(int cartId, int shippingMethodId)
        {
            var service = new Core.ShoppingCartService(_context.Instance);
            var cart    = service.Find(cartId);
            var method  = _context.Database.Repository <Kooboo.Commerce.Shipping.ShippingMethod>().Find(shippingMethodId);

            _context.Database.Transactional(() =>
            {
                service.ChangeShippingMethod(cart, method);
            });
        }
Esempio n. 2
0
        public void ChangeShippingMethod(int cartId, int shippingMethodId)
        {
            var service = new Core.ShoppingCartService(_context.Instance);
            var cart = service.Find(cartId);
            var method = _context.Database.Repository<Kooboo.Commerce.Shipping.ShippingMethod>().Find(shippingMethodId);

            _context.Database.Transactional(() =>
            {
                service.ChangeShippingMethod(cart, method);
            });
        }