ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Using ProductCart
  New Posts New Posts RSS Feed - Get OrderNumber in ProductCart API
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Get OrderNumber in ProductCart API

 Post Reply Post Reply
Author
Message
meanddreams View Drop Down
Newbie
Newbie


Joined: 31-July-2012
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote meanddreams Quote  Post ReplyReply Direct Link To This Post Topic: Get OrderNumber in ProductCart API
    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
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.