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.

  • Shibu 4 posts 24 karma points
    Feb 21, 2015 @ 13:59
    Shibu
    0

    How to create a new basket

    Hi,

    Can you guide me how to add a product into the basket. I am using sitecore  & uCommerce. 

    Thanks 

  • Martin 181 posts 740 karma points
    Feb 21, 2015 @ 16:41
    Martin
    0

    Hi Shibu,

    It's quite simple. Whether you're using Umbraco or SiteCore it's the same API (as far I'm aware). Try to take a look at this http://docs.ucommerce.net/ucommerce/v6/getting-started/transaction-foundation/basket.html at uCommerce documentation. It should help you get started.

    You are supposed to look at the TransactionLibrary.

    Best regards Martin

  • Shibu 4 posts 24 karma points
    Feb 22, 2015 @ 15:54
    Shibu
    0

    Hi Martin 

    I have followed the instruction as mentioned in the document but it is giving me the message that product sku "blahblah" doesnot exists.

    Below is code what I have written

     

    Get a product

    var productItem = UCommerce.EntitiesV2.Product.SingleOrDefault(x => x.ProductId == 105);

    Adding to Basket

    TransactionLibrary.AddToBasket("200", productItem.Sku);

    TransactionLibrary.ExecuteBasketPipeline();

    But I am getting an exception that

    System.ArgumentException: The product with SKU '5159803' does not exist

    But db it is present and and I am not able to find the solution of it.


     

    Please reply what I am doing wrong over here.

     

     

     

     

  • Martin 181 posts 740 karma points
    Feb 22, 2015 @ 19:56
    Martin
    0

    Hi Shibu,

    Is the product a product family (having variant products?)

  • Shibu 4 posts 24 karma points
    Feb 23, 2015 @ 00:21
    Shibu
    0

    Hi

    No product is not a variant products. But let me tell you now the same code is working. I am surprised to see why this is behaving like this 

    Thanks

    Shibu

     

  • Martin 181 posts 740 karma points
    Feb 23, 2015 @ 20:29
    Martin
    0

    Hi again,

    Not to be rude but did you solve it? :) I'm not following your last comment entirely.

    Best regards Martin

Please Sign in or register to post replies

Write your reply to:

Draft