MMv4 KB
 
subscription_item DB Table
  Last Edited - 05/24/2010 10:57am PDT
  Category Path - Developer's Guide > Database Structure
 
This article outlines the database structure for the MMv4 subscription_item database table.

  • id
    Primary Key of rec_order_item table.
    int(10) | unsigned | auto increment | primary key | indexed
  • cid
    A reference to the customer.id field associated with this scheduled order item record.
    int(10) | unsigned | indexed
  • sai
    The system ID number of the shipping address associated with this scheduled order item record.
    int(10) | unsigned | indexed
  • ship_method_id
    The system ID number of the shipping method associated with this scheduled order item record.
    int(10) | unsigned | indexed
  • pid
    The system ID number of the product associated with this scheduled order item record.
    int(10) | unsigned | indexed
  • qty
    The number of the product to be shipped when this scheduled order is run.
    int(10)
  • price_alt
    The alternative price that will override the default product price of the product.
    double(16,2) | indexed
  • price_auth
    If the value in this field is greater than 0, the alternative price is used instead of the default product price.  The recorded value is the system ID number of the admin that overrode the default price.

    int(10) | unsigned | indexed
  • gift_wrap
    If the value i this field is greater than 0, the product should be gift-wrapped.
    int(10) | unsigned | Values: 0/timestamp | indexed
  • create_date
    The Unix timestamp of the creation date of this scheduled order item record.
    int(10) | unsigned | Values: 0/timestamp | indexed
  • bill_date
    The Unix timestamp of the date the order should be processed.
    int(10) | unsigned | Values: 0/timestamp | indexed
  • bill_times
    The number of times the product will rebill as itself.
    int(10) | unsigned | indexed
  • rebill_as
    The system ID number of the next product in the chain, if any.
    int(10) | unsigned | indexed
  • rec_type
    The subscription type, whether it will rebill per x amount of days, every x days of y, or every anniversary of the original subscription order.
    varchar(255) | indexed
  • rec_term
    The term of the subscription.
    int(10) | unsigned | indexed
  • rec_num_time_spans
    The number of time spans, this can be x days, months, year
    int(10) | unsigned | indexed
  • rec_time_span
    This is the identifier for the rec_num_time_spans column. The values can be days, weeks, months, or years.
    char(1) | indexed | values: D/W/M/Y
  • rec_grace
    The amount of days for the subscription grace period. If the subscription is purchased within this grace period, the rebilling terms will skip the first payment and start the following
    int(10) | unsigned | indexed
  • hold
    If the value in this field is greater than 0, the product will be skipped when the scheduled order is run.
    int(10) | unsigned | Values: 0/timestamp | indexed
  • reminder_sent
    If the value in this field is greater than 0, the customer has received reminder email about next scheduled order for this product.  This field is reset to 0 every time the scheduled order is run.
    int(10) | unsigned | Values: 0/timestamp | indexed
  • declines
    The number of times the scheduled order has been declined since the last time it ran successfully.
    int(10) | unsigned | indexed
  • completed_cycles
    The number of scheduled orders for this product that have already run.
    int(10) | unsigned | indexed
  • retain_order_notes
    If the value in this field is greater than 0, the order notes will be retained after the scheduled order is run.
    int(10) | unsigned | Values: 0/timestamp | indexed
  • order_notes
    Customer_facing notes that will be appended to the order receipt.
    text | unsigned

 

 

Powered by ModularKB