Print Page | Close Window

Get OrderNumber in ProductCart API

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=5241
Printed Date: 09-March-2025 at 7:41pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Get OrderNumber in ProductCart API
Posted By: meanddreams
Subject: Get OrderNumber in ProductCart API
Date Posted: 06-August-2012 at 8:31am
Hi,

I'm using ProductCart API to fetch new orders and their details. GetOrderDetails method takes "OrderId" parameter however I found that it's the actual Primary key value of the database. Response given by this method doesn't have actual Order# (which can be used in product cart admin section to search an order).

Can anybody tell me how to get actual Order# (not OrderId)?

Thanks,

Viresh



Replies:
Posted By: Guests
Date Posted: 06-August-2012 at 1:34pm
Hi Viresh,

In ProductCart you have the option to start your order numbers at a number greater than the primary key enumeration in the database. If a value is set for this, it's added to the value of the order id in the db to create the apparent Order Id displayed in the application.

The value for this is stored in the /includes/settings.asp page as the value for the constant "scPre".

It would be nicer if there were a comment in the code here, but if you open /pc/orderCompleteTracking.asp you'll notice the following at the top:
pOrderNumber = (int(pOID)+scpre)

Here, pOID is the raw id of the order in the database and scPre is the number added to it to derive the apparent Order ID displayed in the application.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net