I can add a product to the basket ok. if however i add another product from the same category it only updates the total of the first pruduct from same category added.
Ive noticed when you add a product an entry goes in uCommerce_OrderLine and you can see if product is in same category it does not add new entry just updates total in entry already in for that category
If it's the same product i should update existing entries with the new amount (Im pretty sure there is a overload to prevent this in one of the helpers). But you are saying that different products with same category are merged into one orderline? That does not sound right to me. Can you confirm that the product is different?
Yes its definetaly a different product. Ive tested it thoroughly and different products with same category are merged into one orderline. I am using nested categories dont imagine this would make any difference. I am not using variants in my products, each product is distinct.
I have ran threw debugging in visual studio and before I add the product everything looks fine. ie definately showing the correct producted which was selected for adding. I must be missing something.
Update: I have set up a new small test project with basic products but same razor code and everything works as should. so must be something to do with my setup but cant think what anyone any suggestions
Upate: solved my problem. nothing to do with ucommerce down to a bug in my code. For what its worth I was displaying the products that belonged to a category in the one page in a grid with a separate submission form for each product so as it could be added directly to the basket, without viewing details, using javascript to submitt the form. I had forgot to add the product id to the end of each form id so it was unique which meant it was always submitting the first product in the category.
adding product to basket problem
I can add a product to the basket ok. if however i add another product from the same category it only updates the total of the first pruduct from same category added.
using latest version and code
TransactionLibrary.AddToBasket(Convert.ToInt32(quantity), product.Sku);
TransactionLibrary.ExecuteBasketPipeline();
Ive noticed when you add a product an entry goes in uCommerce_OrderLine and you can see if product is in same category it does not add new entry just updates total in entry already in for that category
any ides?
If it's the same product i should update existing entries with the new amount (Im pretty sure there is a overload to prevent this in one of the helpers). But you are saying that different products with same category are merged into one orderline? That does not sound right to me. Can you confirm that the product is different?
Yes its definetaly a different product. Ive tested it thoroughly and different products with same category are merged into one orderline. I am using nested categories dont imagine this would make any difference. I am not using variants in my products, each product is distinct.
I have ran threw debugging in visual studio and before I add the product everything looks fine. ie definately showing the correct producted which was selected for adding. I must be missing something.
Update: I have set up a new small test project with basic products but same razor code and everything works as should. so must be something to do with my setup but cant think what anyone any suggestions
Upate: solved my problem. nothing to do with ucommerce down to a bug in my code. For what its worth I was displaying the products that belonged to a category in the one page in a grid with a separate submission form for each product so as it could be added directly to the basket, without viewing details, using javascript to submitt the form. I had forgot to add the product id to the end of each form id so it was unique which meant it was always submitting the first product in the category.
Thanks for being awesome and posting your follow-up to the forum.
is working on a reply...