WordPress.org

Forums

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

  1. Klondike55
    Member
    Posted 10 months 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 3.8.12.1
    Gold Cart for WP e-Commerce Version 2.9.7.6

    / 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 )
    return;

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

    ...

    https://wordpress.org/plugins/wp-e-commerce/

  2. Jeff Pye Brook
    Member
    Posted 10 months ago #

    Change the auto_increment value for the database table

  3. Justin Sainton
    Member
    Plugin Author

    Posted 10 months 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
    Member
    Posted 10 months 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....

    Jeff

Reply

You must log in to post.

About this Plugin

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

About this Topic