I'm having some issues with removing an item from the basket.
I'm using the demo store and can see that it appears to be falling over when I click the remove button next to the product on cart.aspx
The offending script is _Actions.Cart.cshtml which is referenced before the closing...
</head>
...on the masterpage
It breaks on the line...
var basket = TransactionLibrary.GetBasket(true).PurchaseOrder;
...and I really don't know why!
var request = HttpContext.Current.Request;
var basket = TransactionLibrary.GetBasket(true).PurchaseOrder;
if (request.HttpMethod == "POST")
{
@* For these helper functions refer to /App_Code/uCommerce/Functions/Basket.cshtml *@
uCommerce.Functions.Basket.RemoveItem("basket-remove-item");
uCommerce.Functions.Basket.AddVoucher("add-voucher", "voucher-code");
uCommerce.Functions.Basket.UpdateCartLines("update-basket", "quantity-input-", basket);
}
I get the error:
"PipelineException was unhandled by user code"
Exception occoured while processing pipeline 'UCommerce.Pipelines.Transactions.Baskets.GetBasket.GetBasketPipeline'
Inner Exception:
{"Server cannot append cookies after HTTP headers have been sent."}
Thanks very much for the continued work/support on the package - really appreciate it :-)
First of all which version of Umbraco, uCommerce and demo store are you using? Have you modified the GetBasketPipeline?
My guess right now is that you need to move the code for removing your line item earlier in the call stack (move it to be called before any HTML is output).
If I get the time I can try to reproduce this error but I can't promise I get the time :)
Remove item from basket
Hi,
I'm having some issues with removing an item from the basket.
I'm using the demo store and can see that it appears to be falling over when I click the remove button next to the product on cart.aspx
The offending script is _Actions.Cart.cshtml which is referenced before the closing...
...on the masterpage
It breaks on the line...
...and I really don't know why!
I get the error:
"PipelineException was unhandled by user code"
Exception occoured while processing pipeline 'UCommerce.Pipelines.Transactions.Baskets.GetBasket.GetBasketPipeline'
Inner Exception: {"Server cannot append cookies after HTTP headers have been sent."}
Thanks very much for the continued work/support on the package - really appreciate it :-)
Thanks,
Rick
Hi Rick,
First of all which version of Umbraco, uCommerce and demo store are you using? Have you modified the GetBasketPipeline?
My guess right now is that you need to move the code for removing your line item earlier in the call stack (move it to be called before any HTML is output).
If I get the time I can try to reproduce this error but I can't promise I get the time :)
Best regards Martin
Hi Martin,
Thanks for replying back, I'm using:
I haven't modified the GetBasketPipeline.
I've also got the code for removing the line item referenced between the tag in my RazorStore.master
Thanks,
Rick
I've finally figured it out ... it seemed to be the Response.Redirect that is used everywhere in the site that caused the errors above.
I've changed the call from this...
...to this and now seems to work:
Hope this helps someone.
Rick
Hi Rick,
Glad you found a solution and for posting it :)
Best regards Martin
is working on a reply...