Code: Select all
Token.Instance.User.Basket.Save();
Token.Instance.User.Basket.Package();
Token.Instance.User.Basket.Recalculate();
foreach (BasketShipment shipment in Token.Instance.User.Basket.Shipments)
{
shipment.ApplyShipMethod("ShippingMethod1");
}
Token.Instance.User.Basket.Shipments.Save();
Code: Select all
protected Basket _cart
{
get
{
return (Basket)Session["cart"];
}
set
{
Session["cart"] = value;
}
}
...
_cart.Save();
_cart.Package();
_cart.Recalculate();
foreach (BasketShipment shipment in _cart.Shipments)
{
shipment.ApplyShipMethod("ShippingMethod1");
}
_cart.Shipments.Save();
Is there any reason why items are not being created in each shipment on the Package() or Recalculate() methods? and why ApplyShipMethod() does not work when using a basket in this manner?
Thanks in advance.