Commit | Line | Data |
---|---|---|
3c7d2158 | 1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Contribute</base> | |
6a488035 TO |
5 | <class>Product</class> |
6 | <comment>able - stores "product info" for premiums and can be used for non-incentive products </comment> | |
3c7d2158 | 7 | <name>civicrm_product</name> |
8 | <add>1.4</add> | |
6a488035 | 9 | <log>true</log> |
d31fb4e3 | 10 | <component>CiviContribute</component> |
8ab43c93 | 11 | <labelField>name</labelField> |
3c7d2158 | 12 | <field> |
455cfd16 | 13 | <name>id</name> |
0d94665e | 14 | <title>Product ID</title> |
455cfd16 EM |
15 | <type>int unsigned</type> |
16 | <required>true</required> | |
0481e12c A |
17 | <html> |
18 | <type>Number</type> | |
19 | </html> | |
455cfd16 | 20 | <add>1.4</add> |
3c7d2158 | 21 | </field> |
22 | <primaryKey> | |
455cfd16 EM |
23 | <name>id</name> |
24 | <autoincrement>true</autoincrement> | |
6a488035 TO |
25 | </primaryKey> |
26 | <field> | |
455cfd16 EM |
27 | <name>name</name> |
28 | <uniqueName>product_name</uniqueName> | |
29 | <title>Product Name</title> | |
30 | <type>varchar</type> | |
31 | <length>255</length> | |
32 | <required>true</required> | |
33 | <export>true</export> | |
34 | <localizable>true</localizable> | |
35 | <comment>Required product/premium name</comment> | |
36 | <add>1.4</add> | |
37 | </field> | |
38 | <field> | |
39 | <name>description</name> | |
40 | <title>Description</title> | |
41 | <type>text</type> | |
42 | <localizable>true</localizable> | |
43 | <comment>Optional description of the product/premium.</comment> | |
44 | <add>1.4</add> | |
45 | </field> | |
46 | <field> | |
47 | <name>sku</name> | |
48 | <title>SKU</title> | |
49 | <type>varchar</type> | |
50 | <length>50</length> | |
51 | <export>true</export> | |
52 | <comment>Optional product sku or code.</comment> | |
53 | <add>1.4</add> | |
54 | </field> | |
55 | <field> | |
56 | <name>options</name> | |
57 | <title>Options</title> | |
58 | <type>text</type> | |
59 | <localizable>true</localizable> | |
60 | <comment>Store comma-delimited list of color, size, etc. options for the product.</comment> | |
61 | <add>1.4</add> | |
62 | </field> | |
63 | <field> | |
64 | <name>image</name> | |
65 | <title>Image</title> | |
66 | <type>varchar</type> | |
67 | <length>255</length> | |
68 | <comment>Full or relative URL to uploaded image - fullsize.</comment> | |
69 | <add>1.4</add> | |
70 | </field> | |
71 | <field> | |
72 | <name>thumbnail</name> | |
73 | <title>Thumbnail</title> | |
74 | <type>varchar</type> | |
75 | <length>255</length> | |
76 | <comment>Full or relative URL to image thumbnail.</comment> | |
77 | <add>1.4</add> | |
78 | </field> | |
79 | <field> | |
80 | <name>price</name> | |
81 | <title>Price</title> | |
82 | <type>decimal</type> | |
83 | <comment>Sell price or market value for premiums. For tax-deductible contributions, this will be stored as non_deductible_amount in the contribution record.</comment> | |
84 | <add>1.4</add> | |
85 | </field> | |
86 | <field> | |
87 | <name>currency</name> | |
88 | <type>varchar</type> | |
89 | <length>3</length> | |
90 | <default>NULL</default> | |
91 | <comment>3 character string, value from config setting or input via user.</comment> | |
92 | <add>3.2</add> | |
93 | <pseudoconstant> | |
94 | <table>civicrm_currency</table> | |
95 | <keyColumn>name</keyColumn> | |
96 | <labelColumn>full_name</labelColumn> | |
c3de5c5a | 97 | <nameColumn>name</nameColumn> |
a8fdb24e | 98 | <abbrColumn>symbol</abbrColumn> |
455cfd16 EM |
99 | </pseudoconstant> |
100 | <html> | |
101 | <type>Select</type> | |
fd735f54 | 102 | <label>Currency</label> |
455cfd16 EM |
103 | </html> |
104 | </field> | |
105 | <field> | |
106 | <name>financial_type_id</name> | |
57e94608 | 107 | <title>Financial Type ID</title> |
455cfd16 EM |
108 | <type>int unsigned</type> |
109 | <default>NULL</default> | |
110 | <pseudoconstant> | |
111 | <table>civicrm_financial_type</table> | |
112 | <keyColumn>id</keyColumn> | |
113 | <labelColumn>name</labelColumn> | |
114 | </pseudoconstant> | |
115 | <comment>FK to Financial Type.</comment> | |
57e94608 A |
116 | <html> |
117 | <label>Financial Type</label> | |
118 | </html> | |
455cfd16 | 119 | <add>4.3</add> |
3c7d2158 | 120 | </field> |
121 | <foreignKey> | |
455cfd16 EM |
122 | <name>financial_type_id</name> |
123 | <table>civicrm_financial_type</table> | |
124 | <key>id</key> | |
125 | <onDelete>SET NULL</onDelete> | |
126 | <add>4.3</add> | |
3c7d2158 | 127 | </foreignKey> |
128 | ||
129 | <field> | |
455cfd16 EM |
130 | <name>min_contribution</name> |
131 | <title>Minimum Contribution</title> | |
132 | <type>decimal</type> | |
133 | <comment>Minimum contribution required to be eligible to select this premium.</comment> | |
134 | <add>1.4</add> | |
135 | </field> | |
136 | <field> | |
137 | <name>cost</name> | |
138 | <title>Cost</title> | |
139 | <type>decimal</type> | |
140 | <comment>Actual cost of this product. Useful to determine net return from sale or using this as an incentive.</comment> | |
141 | <add>1.4</add> | |
142 | </field> | |
143 | <field> | |
144 | <name>is_active</name> | |
145 | <title>Is Active</title> | |
146 | <type>boolean</type> | |
147 | <required>true</required> | |
148 | <comment>Disabling premium removes it from the premiums_premium join table below.</comment> | |
149 | <add>1.4</add> | |
150 | </field> | |
151 | <field> | |
152 | <name>period_type</name> | |
153 | <title>Period Type</title> | |
154 | <type>varchar</type> | |
155 | <length>8</length> | |
156 | <default>'rolling'</default> | |
157 | <comment>Rolling means we set start/end based on current day, fixed means we set start/end for current year or month | |
158 | (e.g. 1 year + fixed -> we would set start/end for 1/1/06 thru 12/31/06 for any premium chosen in 2006) </comment> | |
159 | <pseudoconstant> | |
160 | <callback>CRM_Core_SelectValues::periodType</callback> | |
161 | </pseudoconstant> | |
162 | <add>1.4</add> | |
163 | <html> | |
164 | <type>Select</type> | |
165 | </html> | |
166 | </field> | |
167 | <field> | |
168 | <name>fixed_period_start_day</name> | |
169 | <title>Fixed Period Start Day</title> | |
170 | <type>int</type> | |
171 | <default>0101</default> | |
172 | <comment>Month and day (MMDD) that fixed period type subscription or membership starts.</comment> | |
173 | <add>1.4</add> | |
174 | </field> | |
175 | <field> | |
176 | <name>duration_unit</name> | |
177 | <title>Duration Unit</title> | |
178 | <type>varchar</type> | |
179 | <length>8</length> | |
180 | <default>'year'</default> | |
181 | <pseudoconstant> | |
182 | <callback>CRM_Core_SelectValues::getPremiumUnits</callback> | |
183 | </pseudoconstant> | |
184 | <add>1.4</add> | |
185 | <html> | |
186 | <type>Select</type> | |
187 | </html> | |
188 | </field> | |
189 | <field> | |
190 | <name>duration_interval</name> | |
191 | <title>Duration Interval</title> | |
192 | <type>int</type> | |
193 | <comment>Number of units for total duration of subscription, service, membership (e.g. 12 Months).</comment> | |
194 | <add>1.4</add> | |
195 | </field> | |
196 | <field> | |
197 | <name>frequency_unit</name> | |
198 | <title>Frequency Unit</title> | |
199 | <type>varchar</type> | |
200 | <length>8</length> | |
201 | <default>'month'</default> | |
202 | <comment>Frequency unit and interval allow option to store actual delivery frequency for a subscription or service.</comment> | |
203 | <pseudoconstant> | |
204 | <callback>CRM_Core_SelectValues::getPremiumUnits</callback> | |
205 | </pseudoconstant> | |
206 | <add>1.4</add> | |
207 | <html> | |
208 | <type>Select</type> | |
209 | </html> | |
210 | </field> | |
211 | <field> | |
212 | <name>frequency_interval</name> | |
213 | <title>Frequency Interval</title> | |
214 | <type>int</type> | |
215 | <comment>Number of units for delivery frequency of subscription, service, membership (e.g. every 3 Months).</comment> | |
216 | <add>1.4</add> | |
6a488035 TO |
217 | </field> |
218 | </table> |