Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • lj 81 posts 425 karma points
    Aug 23, 2013 @ 16:46
    lj
    0

    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?

     

     

  • Nickolaj Lundgreen 233 posts 1132 karma points
    Aug 23, 2013 @ 19:55
    Nickolaj Lundgreen
    0

    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?

  • lj 81 posts 425 karma points
    Aug 23, 2013 @ 21:16
    lj
    102

    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.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Aug 27, 2013 @ 07:31
    Søren Spelling Lund
    0

    Thanks for being awesome and posting your follow-up to the forum.

Please Sign in or register to post replies

Write your reply to:

Draft