Magento Database Additions


The Subscribe Pro extension for Magento 1 adds several fields to the Magento database.

Table: sales_flat_quote_item

Fields added:

  • item_fulfils_subscription - boolean - Whether or not the quote item is part of a subscription order
  • subscription_id - string - The Subscription ID in Subscribe Pro
  • subscription_interval - string - The interval name for the subscription (e.g. One month, 2 weeks, etc.)
  • subscription_reorder_ordinal - int - The number of recurring orders which have been placed for this subscription
  • subscription_next_order_date - date - The next order date for the subscription being created.
  • create_new_subscription_at_checkout - boolean - Whether or not to create a new subscription
  • new_subscription_interval - string - If creating a new subscription, the interval name

Schema:

Magento 1 flat quote item schema

Example Data:

Magento 1 flat quote item example data

Table: sales_flat_order_item table

  • item_fulfils_subscription - boolean - Whether or not the quote item is part of a subscription order
  • subscription_id - string - The Subscription ID in Subscribe Pro
  • subscription_interval - string - The interval name for the subscription (e.g. One month, 2 weeks, etc.
  • subscription_reorder_ordinal - int - The number of recurring orders which have been placed for this subscription
  • subscription_next_order_date - date - The next order date for the subscription being created.

Schema:

Magento 1 flat order schema

Example Data:

Magento 1 flat order item example data

Payment Information On the sales_flat_order_payment and sales_flat_quote_payment tables, we include the information from the Subscribe Pro payment method in the "method" and additional_information fields. The Credit Card expiration year and card type are both also stored in those tables in the cc_exp_year and cc_type fields.

Table: sales_flat_order_payment

Magento 1 flat order payment

Table: sales_flat_quote_payment

Magento 1 flat quote payment

How to find the Gateway Transaction ID in Magento for transactions made through the Subscribe Pro Vault

In Magento for transactions made through the Subscribe Pro Vault payment method, the Subscribe Pro Transaction ID is stored. However, we also store the gateway transaction ID so that it can be accessed if needed.

On the sales_flat_order_payment table in Magento, there’s an additional_information field, which contains a string representation of a JSON object. One of the parameters of that object is called gateway_transaction_id, which should match up with the transaction IDs in their gateway. You can find that by matching the Subscribe Pro transaction ID with the cc_trans_id field.