HomeHome Product Discus... Product Discus...SmithCartSmithCartOnCheckout Complete Event - Calling a 3rd Party Webservice or Stored ProcedureOnCheckout Complete Event - Calling a 3rd Party Webservice or Stored Procedure
Previous
 
Next
New Post
6/15/2010 11:40 AM
 

Question:
Is there some existing setting or perhaps a sproc we can use as a trigger to call a web service when a transaction completes? We have a client where we intend to use Smith Cart, but they will be using fsifullment as their 3rd party vendor.

Answer:
Yes in cart v2.93 there is a new feature in the cart settings under the general cart setup section called “Enable OnCheckout Complete Event”. This allows you to call a custom SQL Server stored procedure that you program. The event that triggers the stored procedure being executed is a successful checkout in the cart. Note: If you installed DNN with a database objectqualifier you must append it to your custom stored procedure.


Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
7/27/2010 8:33 AM
 
Can you provide us with an example on how to create the Stored Procedure to call a web service?

When Smith Cart calls the Stored Procedure, what parameters can be passed in?

Thank you.
 
New Post
7/27/2010 10:04 AM
 

I was the one who asked for the calling of a stored procedure. In retrospect, a nice (really nice) feature would have been to pass variables, and perhaps that is something that can be easily included at some later point. (I'm using a stored procedure to call a routine that imports to MAS90, and I've added a couple of fields to the database, like "EnteredIntoMAS" so I can keep track of which orders have been sent and which haven't).

However, it would be REALLY nice if we could pass a pseudo-variable, such as:

dbo.MyOrdersProcess [ORDERNO]

... where "ORDERNO" would be the order number that was just placed, passed as a variable to the SP.

Just a thought.

:)

--Greg

 
New Post
7/27/2010 3:19 PM
 

In your stored procedure you could also use the SELECT IDENT_CURRENT(‘tablename’) on the "smith_storeorders" table it returns the last IDENTITY value produced in a table, regardless of the connection that created the value, and regardless of the scope of the statement that produced the value. The OnCheckout Complete Event could pass parameters to your stored proc but the SELECT IDENT_CURRENT(‘tablename’) will give you all the data you need in any of the tables; customer, orders, orderdetail, payhist.

Another option is to use a trigger on the table.

-Scott



Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartOnCheckout Complete Event - Calling a 3rd Party Webservice or Stored ProcedureOnCheckout Complete Event - Calling a 3rd Party Webservice or Stored Procedure