WP eCommerce
New starting "Order ID" (4 posts)

  1. Klondike55
    Posted 1 year ago #

    Anyone know how to manipulate the incrementing of the ID assigned to orders? We need to start ordering at 100 for our test site and increment from there. I would assume that this could be achieved within the "__construct" function found in purchase-log.class.php, but this is non-obvious. Has anyone been able to achieve an alternate starting ID in the eCommerce plugin?

    WP eCommerce Version
    Gold Cart for WP e-Commerce Version

    / wp-content/plugins/wp-e-commerce/wpsc-includes/purchase-log.class.php:

    * Constructor of the purchase log object. If no argument is passed, this simply
    * create a new empty object. Otherwise, this will get the purchase log from the
    * DB either by using purchase log id or sessionid (specified by the 2nd argument).
    * Eg:
    * // get purchase log with ID number 23
    * $log = new WPSC_Purchase_Log( 23 );
    * // get purchase log with sessionid "asdf"
    * $log = new WPSC_Purchase_Log( 'asdf', 'sessionid' )
    * @access public
    * @since 3.9
    * @param string $value Optional. Defaults to false.
    * @param string $col Optional. Defaults to 'id'.
    public function __construct( $value = false, $col = 'id' ) {
    if ( false === $value )

    if ( is_array( $value ) ) {
    $this->set( $value );
    global $wpdb;



  2. Jeff Pye Brook
    Posted 1 year ago #

    Change the auto_increment value for the database table

  3. Justin Sainton
    Plugin Author

    Posted 1 year ago #

    Hi Klondike55,

    Are you needing this at the actual data model level (e.g. in the database) or strictly for presentation (e.g. on sales logs, sales listings, emails, etc.)?

  4. Klondike55
    Posted 1 year ago #

    Hi Justin,

    Thanks thanks for the reply. This would be at the data model level. I've done a bit more poking around, and it seems that the ID is incremental in the db, and not derived in the php....


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic