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
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:
Find the current schema version in the table uCommerce_SystemVersion (will be somewhere in the fiftees for 2.1)
Locate the .sql database migrations in /umbraco/commerce/install
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
Cant add to basket after upgrade to 2.6.1.0 from 2.1
Code snippet
Heres the exception
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:
Hope this helps.
Thanks Søren, that helped, however im still struggling with my vouchers ill post that to my voucher threat.
is working on a reply...