I found working solution. Please tell me I did not screw up anything by this change.
In DotShoppingCart.OpenSource.Core.ProductDetailTemplate.sc I changed:
public bool AddToCart(int count, List<int> selectedAttributeValueIds) {
int quantity = Product.GetStockQuantity(count, selectedAttributeValueIds);
if (0 == quantity)
return false;
else {
int cartId = Cart.AddItem(Utils.GetUserName(), Product.ProductId,
Utils.GetSorted(selectedAttributeValueIds), quantity);
Response.Redirect(string.Format("{0}?cartitemid={1}&quantity={2}", SiteNavigation.ItemAddedToCartPage, cartId, count));
}
return true;
}
to:
public bool AddToCart(int count, List<int> selectedAttributeValueIds) {
int quantity = Product.GetStockQuantity(count, selectedAttributeValueIds);
if (0 == quantity)
return false;
else {
int cartId = Cart.AddItem(Utils.GetUserName(), Product.ProductId,
Utils.GetSorted(selectedAttributeValueIds), quantity);
Response.Redirect(SiteNavigation.CartPage); OR ALTERNATIVELY:
Response.Redirect(SiteNavigation.CheckoutPage);
}
return true;
}
I tested, it looks like it’s working properly. Please tell me, if I can do it this way. Thank you.
|