Checkout Errors


https://forum.kartris.com/Topic6607.aspx
Print Topic | Close Window

By shulemj - Tue 5 Jul 2016
I am not sure of these two errors are related, but they might be, so I post them together.

P.S. I'm setup with automatic UPS prices.

Error 1: Shipping gets 100% discount
Regardless of the shipping method I choose, the price comes up right, but gets discounted by 100%.
Shipping


$ 91.01-100%1$ 0.00

Error 2: Checkout "Proceed" Button Loops back to same page
(Choosing PO/Offline method)
As I click the 'Proceed' button after choosing addresses, shipping method, agreeing to terms, I get another frame of the Checkout.aspx which seems like confirmation page, with another 'Proceed' button. Only, this time, no matter how many time I click the button, I come back to that confirmation screen.
By Paul - Tue 5 Jul 2016
Does anything show in the error logs?
By shulemj - Tue 5 Jul 2016
Nothing in the error log
By shulemj - Thu 4 Aug 2016
On error 2 (Checkout "Proceed" Button Loops back to same page), I got the following error in the log:

-----------------------------------------------------------------------------
>> OrdersBLL.Add
-----------------------------------------------------------------------------
>> System.Data.SqlClient.SqlException
>> 8/3/2016 6:21:51 PM
>> Version:2.9005
>> URL:http://www.malchutjudaica.com/Checkout.aspx
>> 00.00.000.000 (masked by me here)
>> CUSTOM MESSAGE:
Database Error: A general error has occurred.
>> NUMBER:1088
>> MESSAGE:
Cannot find the object "trigKartrisInvoiceRows_DML" because it does not exist or you do not have permissions.
>> STACK:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteScalar()
at OrdersBLL.Add(Int32 C_ID, String strUserEmailAddress, String strUserPassword, Address BillingAddress, Address ShippingAddress, Boolean blnSameShippingAsBilling, Basket BasketObject, List`1 BasketArray, String strOrderDetails, String strGatewayName, Int32 intLanguageID, Int32 intCurrencyID, Int32 intGatewayCurrencyID, Boolean blnOrderEmails, String strShippingMethod, Double numGatewayTotalPrice, String strEUVATNumber, String strPromotionDescription, String strPurchaseOrderNo, String strComments)
==================================================
By Tiggywiggler - Thu 11 Aug 2016
That trigger was removed in version 2.0000, are you running a very old database or application behind the scenes? Have you upgraded from one version to another without running the upgrade scripts?
By shulemj - Sun 14 Aug 2016
I actually installed a new Kartris from file kartris2_9005b1_WPI.
By Paul - Mon 15 Aug 2016
I searched the source in visual studio of the latest version for

trigKartrisInvoiceRows_DML

and it only finds it in old upgrade SQL scripts.

The last reference is the 1.4->2.0 upgrade script, which drops (deletes) the trigger. A clean install won't use these update scripts, it would run the MainData script, and that does not have that trigger in it. So I don't see where that trigger came from unless you have an older db. If that was upgraded using the update scripts, it shouldn't have that trigger (because the 1.4->2.0 drops it)
By shulemj - Mon 15 Aug 2016
So it appears that our database needs some updating. What is the recommended method to do that while preserving the existing data?
By Tiggywiggler - Mon 15 Aug 2016
What version is the DB?

what version of application did you upgrade from? That would be a good thing to know.
By shulemj - Mon 15 Aug 2016
This is not an upgrade, but an original download from Kartris' website. Does kartris2_9005b1_WPI tell you which version? I think it's v2.9005.

I do remember that during the setup I was instructed to run several SQL scripts from \Uploads\Resources (via the DataTool) and may have received an error on two upgrades.


Does this answer anything?
By Tiggywiggler - Tue 16 Aug 2016
So you did an original download of the source code and setup a new database from scratch? You didn't copy the database from somewhere else?
By Tiggywiggler - Tue 16 Aug 2016
So you did an original download of the source code and setup a new database from scratch? You didn't copy the database from somewhere else?
By shulemj - Tue 16 Aug 2016
That's right. I used the DB included with the download.I think we did the initial DB setup with the DataTool, and then tried to upgrade with the enclosed scripts.
By Tiggywiggler - Tue 16 Aug 2016
When you download the latest source code, you get a creation script with it that creates a copy of the latest type of database.

This 'latest type' of database does not have the triggers you have pointed to, so it does not make any sense that you have used the latest database, and you have these triggers. Something else is going on and I don't know what it is.
By shulemj - Tue 16 Aug 2016
Wow, so I don't know what to do at this point, and I really don't want to loose my data.

Would it make sense to start anew, with a new database, and then use the datatool to import all my product data?
By shulemj - Tue 30 Aug 2016
Update:

All the issues were caused by a bad database setup (see below for details). Once we rebuilt the database, both issues resolved. Thank you both for all your help.



Bad Database Setup

I will detail what went wrong so others can learn what not to do...

We ran the "kartrisSQL_MainData.sql" for initial setup, but then we also tried to run each update script in "\Uploads\Resources\" which totally messed up the database.

Please note that kartrisSQL_MainData.sql has the up-to-date database structure. Thank you Paul for clarifying this.
By Tiggywiggler - Fri 2 Sep 2016
Thank you for the update. Glad to hear that you found a solution. Well done Paul for recognising the cause.