Copied to clipboard

Flag this post as spam?

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


  • Topic author was deleted

    Dec 18, 2012 @ 13:01

    uCommerce : Unit price cannot be null when adding product to basket

    Umbraco Version - UmbracoCms.4.10.1

    asp.net version  - 4

    Windows and iis version = iis7, windows 7

    Stacktrace :

    at UCommerce.EntitiesV2.PurchaseOrder.AddProduct(PriceGroup priceGroup, Product product, Int32 quantity, Boolean addToExistingLine)
    at UCommerce.Transactions.TransactionLibraryInternal.AddToBasket(String catalogName, Int32 quantity, String sku, String variantSku, Boolean addToExistingLine, Boolean executeBasketPipeline)
    at Castle.Proxies.Invocations.TransactionLibraryInternal_AddToBasket.InvokeMethodOnTarget()
    at Castle.DynamicProxy.AbstractInvocation.Proceed()
    at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation)
    at Castle.DynamicProxy.AbstractInvocation.Proceed()
    at Castle.Proxies.TransactionLibraryInternalProxy.AddToBasket(String catalogName, Int32 quantity, String sku, String variantSku, Boolean addToExistingLine, Boolean executeBasketPipeline)
    at UCommerce.Api.TransactionLibrary.AddToBasket(Int32 quantity, String sku, String variantSku, Boolean addToExistingLine, Boolean executeBasketPipeline, Nullable`1 catalogId)
    at ASP._Page_macroScripts_Webservice_cshtml.AddToBasket(String addToBasketKey, String quantityKey, Product variant) in ....:line 46
    at ASP._Page_macroScripts_Webservice_cshtml.Execute() in ... 176</span>

     

    Using code from example :

    TransactionLibrary.AddToBasket(quantity,
    variant.Sku, variant.VariantSku);

    And still getting error :

    Unit price
    cannot be null when adding product to basket.

    Even though I found that it should be fixed :

    Change log for 3.0.0.12278

    FIX: Adding a product without price to basket would cause an exception.

    Then the question is, how to add product with variants to the cart without price (it is catalog not shop).

     

    Thank you

  • Comment author was deleted

    Dec 18, 2012 @ 14:55

    Edited: had another thing but already figure that out.

    Does anyone can help me with the first issue ? :)

  • Vilius Janulis 38 posts 79 karma points
    Jan 11, 2013 @ 13:30
    Vilius Janulis
    0

    Søren Spelling Lund no reply ? :)

    Something like, when adding to cart (razor) check if price is set, if not add random (1) as a pirce and the add to basked would work for me :)

     

    Thanks

  • Ivan Saric 40 posts 89 karma points
    Feb 18, 2014 @ 18:34
    Ivan Saric
    0

    Did you find any solution?

Please Sign in or register to post replies

Write your reply to:

Draft