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.

  • Jais Edelmann 45 posts 126 karma points
    Aug 22, 2012 @ 11:32
    Jais Edelmann
    0

    Cant add to basket after upgrade to 2.6.1.0 from 2.1

    Code snippet

     

     if (p.IsVariant)
                {
                    Product _vp = Product.SingleOrDefault(x => x.VariantSku == p.VariantSku) ?? new Product();
                    SiteContext.Current.OrderContext.GetBasket().PurchaseOrder.AddProduct(cat, _vp, Quantity);
                    //UCommerce.Xslt.Library.AddToBasket(cat.Name, Quantity, _vp.VariantSku);
                }
                else
                {
                    SiteContext.Current.OrderContext.GetBasket().PurchaseOrder.AddProduct(cat, p, Quantity);
                }
                //update basket pipeline
                var basketPipeline = PipelineFactory.Create<PurchaseOrder>("Basket");
                PipelineExecutionResult result = basketPipeline.Execute(SiteContext.Current.OrderContext.GetBasket().PurchaseOrder);

    Heres the exception

     

    Invalid object name 'uCommerce_QuantityTarget'.
    
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    
    Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'uCommerce_QuantityTarget'.
    
    Source Error: 
    
    
    Line 214:            //update basket pipeline
    Line 215:            var basketPipeline = PipelineFactory.Create<PurchaseOrder>("Basket");
    Line 216:            PipelineExecutionResult result = basketPipeline.Execute(SiteContext.Current.OrderContext.GetBasket().PurchaseOrder);
    Line 217:        }
    Line 218:
    
    Source File: C:\Development\Uniqueindretning\www.uniquewebshop.dk\src\core\BasketManager.cs    Line: 216 
  • Søren Spelling Lund 1797 posts 2786 karma points
    Aug 24, 2012 @ 09:57
    Søren Spelling Lund
    1

     

    It seems that your database schema isn't updated to the latest version.

    You need to ensure that the user running the app pool has permissions to modify the database structure. With that in place you can install uCommerce on top of your existing installation and it will migrate your data store automatically.

    Alternatively if you can't get the proper access for the app pool identity you can do a manual database update thusly:

    1. Find the current schema version in the table uCommerce_SystemVersion (will be somewhere in the fiftees for 2.1)
    2. Locate the .sql database migrations in /umbraco/commerce/install
    3. Run each migration with a larger number than current schema version in order, e.g. if your schema version is 50 you want to run 51, 52, 53, etc. in that order

    Hope this helps.

  • Jais Edelmann 45 posts 126 karma points
    Aug 24, 2012 @ 10:51
    Jais Edelmann
    0

    Thanks Søren, that helped, however im still struggling with my vouchers ill post that to my voucher threat.

Please Sign in or register to post replies

Write your reply to:

Draft