Tier prices problem with 3.9 version

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 年 前
Hi everybody.

As you probably knows now nop 3.9 has included in the tier price also the "special prices" properties.
We have already upgraded the version 3.8 to the last 3.9 version, and it is working very good (www.hobbystore.it is the site).

But I have a problem with the tier prices: We didn't use this feature with the previous version, but we used a lot the special price product properties.

Today I've tryed to set up a "special price" in the tier prices and I discovered an error. Below you will find the error:

Server Error in '/Hobbystore390' Application.

Cannot insert the value NULL into column 'ProductVariantId', table 'Hobbystore390.dbo.TierPrice'; column does not allow nulls. INSERT fails.
The statement has been terminated.
  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: Cannot insert the value NULL into column 'ProductVariantId', table 'Hobbystore390.dbo.TierPrice'; column does not allow nulls. INSERT fails.
The statement has been terminated.

Source Error:


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  


Can anyone help me to fix it?

Thank you in advance
Lorenzo
6 年 前
It is a very bad issue: nobody has the same problem? Solution? Suggestion?
6 年 前
uciocan wrote:
Can anyone help me to fix it?

Hi,

I just try to set up special price on 3.90 and was able to do it without any problem.
Can you share steps to reproduce error?

By the way, by default there are no ProductVariantId column in TierPrice table.

Regards,
Tomasz
6 年 前
Hi Tomasz

To add a Tier price I add a new tier price

Quantity : 01
Price 100
Customer role: all

and discover and error in the follow page:
errorpage.htm?aspxerrorpath=/Admin/Product/TierPriceCreatePopup

(I think that could be an upgrade error in the previous upgrade and we didn't discover it just because we didn't use the tier price before the 3.9 version)

Nothing is written in the log, but when I tried in localhost the error written was:

Server Error in '/Hobbystore390' Application.

Cannot insert the value NULL into column 'ProductVariantId', table 'Hobbystore390.dbo.TierPrice'; column does not allow nulls. INSERT fails.
The statement has been terminated.
  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: Cannot insert the value NULL into column 'ProductVariantId', table 'Hobbystore390.dbo.TierPrice'; column does not allow nulls. INSERT fails.
The statement has been terminated.

Source Error:


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:



[SqlException (0x80131904): Cannot insert the value NULL into column 'ProductVariantId', table 'Hobbystore390.dbo.TierPrice'; column does not allow nulls. INSERT fails.
The statement has been terminated.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +3278660
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +791
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4927
   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +92
   System.Data.SqlClient.SqlDataReader.get_MetaData() +102
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +552
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3114
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +554
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +98
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +307
   System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch(TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) +104
   System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext) +505
   System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.Execute(Dictionary`2 identifierValues, List`1 generatedValues) +308
   System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() +243

[UpdateException: An error occurred while updating the entries. See the inner exception for details.]
   System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() +525
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) +459
   System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) +253
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +210
   System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) +300
   System.Data.Entity.Internal.InternalContext.SaveChanges() +156

[DbUpdateException: An error occurred while updating the entries. See the inner exception for details.]
   System.Data.Entity.Internal.InternalContext.SaveChanges() +292
   Nop.Data.EfRepository`1.Insert(T entity) in C:\Sviluppo\Hobbystore390\Libraries\Nop.Data\EfRepository.cs:81
   Nop.Services.Logging.DefaultLogger.InsertLog(LogLevel logLevel, String shortMessage, String fullMessage, Customer customer) in C:\Users\Massimo\Dropbox\hobbystore\Sorgenti\Hobbystore390\Libraries\Nop.Services\Logging\DefaultLogger.cs:238
   Nop.Services.Logging.LoggingExtensions.FilteredLog(ILogger logger, LogLevel level, String message, Exception exception, Customer customer) in C:\Users\Massimo\Dropbox\hobbystore\Sorgenti\Hobbystore390\Libraries\Nop.Services\Logging\LoggingExtensions.cs:41
   Nop.Web.Framework.Controllers.BaseController.LogException(Exception exc) in C:\Users\Massimo\Dropbox\hobbystore\Sorgenti\Hobbystore390\Presentation\Nop.Web.Framework\Controllers\BaseController.cs:108
   Nop.Admin.Controllers.BaseAdminController.OnException(ExceptionContext filterContext) in C:\Users\Massimo\Dropbox\hobbystore\Sorgenti\Hobbystore390\Presentation\Nop.Web\Administration\Controllers\BaseAdminController.cs:42
   System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception) +175
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +164
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +44
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +399
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +137

  


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1087.0
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.