this article last updated: July 1, 2009 Due to inevitable changes that will be made to the shopping cart software over time, the cart's variable and database structure may change from time to time without advanced notice. We will attempt to keep the information in this article up-to-date, but Modular Merchant makes no guarantee as to the accuracy of the information provided in this article. Use this information at your own risk.
This article outlines the database structure for the MMv4 product_royalty database table.
- id
Primary Key of the table.
int(10) | unsigned | auto increment | primary key | indexed
- pid
A reference to the product.id field.
int(10) | unsigned | indexed
- vid
A reference to the vendor.id field. If the value of this field is zero, then this royalty rule will be applied to every vendor associated with this product.
int(10) | unsigned | indexed
- value
The numeric value of the royalty earned by the vendor for each unit of the product sold.
double(16,2)
- type
Determines whether the value field is a dollar value or percentage of the product's purchase price.
char(1) | Values: D,P | Default: D
- use_cogs_in_royalty
If set to a value greater than zero, then the product.cogs value is first subtracted from the product's purchase price when the royalty (if any) is calculated.
int(10) | unsigned | Values: 0/timestamp | Default: 0
|