1 <:.set article_type = "Product" -:>
2 <:wrap admin/base.tmpl title => [cond [ifNew] "Add Product" "Edit Product"], menuitem=>"edit", showtitle=>"1", js => "admin_edit.js" :>
4 <p><b><:message:></b></p>
6 <:.set oldf = @{name, def: cgi.param(name).defined ? cgi.param(name) : def} -:>
7 <:include admin/product_menu.tmpl:>
8 <:ifNew:><:or:><:if Or [iadminuser_count] [iadmingroup_count]:>
9 <form action="/cgi-bin/admin/adminusers.pl">
10 <input type="hidden" name="id" value="<: article id:>" />
11 <table class="editform editformtiny">
13 <th>Manage access:</th>
15 <select name="adminid">
16 <:iterator begin adminusers:>
17 <option value="<:iadminuser id:>">User <:iadminuser logon:>
18 </option><:iterator end adminusers:>
19 <:iterator begin admingroups:>
20 <option value="<:iadmingroup id:>">Group <:iadmingroup name:>
21 </option><:iterator end admingroups:>
23 <input type="submit" name="a_showobjectart" value="Manage" />
25 <td class="help"><:help access manage:>
31 <:or Or:><:eif Or:><:eif:>
32 <form action="<:script:>" enctype="multipart/form-data" method="post">
33 <input type="hidden" name="lastModified" value="<:article lastModified:>" />
34 <input type="hidden" name="type" value="Product" />
35 <input type="hidden" name="id" value="<:product id:>" />
36 <:ifNew:><:csrfp admin_add_article hidden:><:or:><:csrfp admin_save_article hidden:><:eif:>
37 <table class="editform">
41 <:ifFieldPerm parentid:><select name="parentid"><:list:></select><:or:><:parent title:> (<:parent id:>)<:eif:></td>
42 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help product catalog:> <:error_img
47 <td><:ifFieldPerm title:><input type="text" name="title" value="<:old title default title:>" size="60" /><:or:><:product title:><:eif:> </td>
48 <td class="help"><:help product title:> <:error_img title:></td>
50 <:if Cfg "title alias" [concatenate level [article level]]:><tr>
53 <:if FieldPerm titleAlias:><input type="text" name="titleAlias" maxlength="<:cfg fields alias_size 60:>" size="60" value="<:old titleAlias article titleAlias:>" /><:or FieldPerm:><:article titleAlias:><:eif FieldPerm:>
55 <td class="help"><:help edit titleAlias:> <:error_img titleAlias:></td>
56 </tr><:or Cfg:><:eif Cfg:>
59 <td><:ifFieldPerm summary:><input type="text" name="summary" value="<:old summary default summary:>" size="60" /><:or:><:product summary:><:eif:> </td>
60 <td class="edit"><:help product summary:> <:error_img
65 <td><:ifFieldPerm description:><input type="text" name="description" value="<:old description default description:>" size="60" /><:or:><:product description:><:eif:> </td>
66 <td class="help"><:help product description:> <:error_img
70 <th>Product Code:</th>
71 <td><:ifFieldPerm product_code:><input type="text" name="product_code" value="<:old product_code default product_code:>" size="60" /><:or:><:product product_code:><:eif:> </td>
72 <td class="help"><:help product product_code:> <:error_img
78 <:ifFieldPerm body:><textarea name="body" rows="15" cols="60" ><:old body default body:></textarea><:or:><:bodytext product body:><:eif:>
80 <td class="help"><:help body body:> <:error_img
83 <:if Cfgsection [concatenate level [article level] " menus"]:><tr>
86 <:if FieldPerm menu:><select name="menu" id="menu">
87 <:iterator begin cfgsection [concatenate level [article level] " menus"] sort=key:><option value="<:cfgentry key:>"<:if Eq [old menu] [cfgentry key]:> selected="selected"<:or Eq:><:eif Eq:>><:cfgentry value:></option><:iterator separator cfgsection:>
88 <:iterator end cfgsection:>
89 </select><:or FieldPerm:><:article menu:><:eif FieldPerm:>
91 <td class="help"><:help article menu:> <:error_img menu:></td>
92 </tr><:or Cfgsection:><:eif Cfgsection:>
95 <td><:ifFieldPerm template:><:templates:><:or:><:product template:><:eif:></td>
96 <td class="help"><:help product template:> <:error_img
100 <th>List article:</th>
101 <td> <:if FieldPerm listed:><:list listed:><:or FieldPerm:><:if Article listed:><:ifEq [article listed] "1":>Yes<:or:>In Sections, but not menu<:eif:><:or Article:>No<:eif Article:><:eif FieldPerm:> </td>
102 <td class="help"><:help edit listed:> <:error_img listed:></td>
107 <:ifFieldPerm linkAlias:><input type="text" name="linkAlias" maxlength="<:cfg fields linkAlias_size 255:>" size="40" value="<: old linkAlias article linkAlias :>" />
108 <:or:><:default linkAlias:><:eif:></td>
109 <td class="help"><:help edit linkAlias:> <:error_img linkAlias:></td>
113 <td><:iterator begin flags:><:if FieldPerm flags:>
114 <input type="checkbox" name="flags" value="<:flag id:>" <:ifFlagSet [flag id]:>checked="checked"<:or:>
115 <:eif:> /><:or FieldPerm:><:ifFlagSet [flag id]:>Yes<:or:>No<:eif:>
116 <:eif FieldPerm:><:flag desc:><:iterator separator flags:><br /><:iterator end flags:></td>
117 <td class="help"><:help edit flags:> <:error_img flags:></td>
122 <:ifFieldPerm pageTitle:><input type="text" name="pageTitle" value='<:old pageTitle article pageTitle:>' size="60" maxlength="255" /> (alternate title)<:or:><:article pageTitle:><:eif:>
124 <td class="help"><:help edit pageTitle:> <:error_img pageTitle:></td>
127 <th>Meta description:</th>
129 <:ifFieldPerm metaDescription:><input type="text" name="metaDescription" value='<:old metaDescription article metaDescription:>' size="60" maxlength="255" /><:or:><:article metaDescription:><:eif:>
131 <td class="help"><:help edit metaDescription:> <:error_img metaDescription:></td>
134 <th>Meta keywords:</th>
136 <:ifFieldPerm metaKeywords:><input type="text" name="metaKeywords" value='<:old metaKeywords article metaKeywords:>' size="60" maxlength="255" /> (comma separated)<:or:><:article metaKeywords:><:eif:>
138 <td class="help"><:help edit metaKeywords:> <:error_img metaKeywords:></td>
141 <th>Author name:</th>
143 <:if FieldPerm author:><input type="text" name="author" value='<:ifCfg editor auto_author:><:old author adminuser name:><:or:><:old author:><:eif:>' size="40" maxlength="255" /><:or FieldPerm:><:article author:><:eif FieldPerm:>
145 <td class="help"><:help edit author:> <:error_img author:></td>
150 <:ifFieldPerm leadTime:>
151 <input type="text" name="leadTime" value="<:old leadTime default leadTime:>" size="5" /><:or:><:product leadTime:><:eif:>
153 <td class="help"><:help product leadtime:> <:error_img leadTime:></td>
156 <th><:cfg "product fields" retailPrice "Retail price":>:</th>
158 <:ifFieldPerm retailPrice:><input type="text" name="retailPrice" value="<:= oldf("retailPrice", bse.number("money", product.retailPrice)) :>" size="7" />
159 (0.00)<:or:><:money product retailPrice:><:eif:> </td>
160 <td class="help"><:help product retail:> <:error_img retailPrice:></td>
164 <th><:cfg "product field" tier_prices "Tier prices":>:</th>
166 <input type="hidden" name="save_pricing_tiers" value="1" />
167 <table class="editform editformtiny">
168 <:iterator begin price_tiers:>
170 <th><:price_tier description:></th>
171 <td>$<:if FieldPerm retailPrice:><input type="text" name="tier_price_<:price_tier id:>" value="<:ifEq [tier_price] "":><:oldi [cat "tier_price_" [price_tier id]] 0:><:or:><:oldi [cat "tier_price_" [price_tier id]] 0 money tier_price:><:eif:>" size="7" /> (0.00)<:or FieldPerm:><:ifEq [tier_price] "":>-<:or:><:money tier_price:><:eif:><:eif FieldPerm:></td>
172 <td class="help"><:error_img [cat "tier_price_" [price_tier id]]:></td>
175 <:iterator end price_tiers:>
178 <td class="help"><:help product tier_price:></td>
180 <:or Price_tiers:><:eif Price_tiers:>
182 <th>Wholesale price:</th>
184 <:ifFieldPerm wholesalePrice:><input type="text" name="wholesalePrice" value="<:old wholesalePrice money default wholesalePrice:>" size="7" />
185 (0.00)<:or:><:money product wholesalePrice:><:eif:></td>
186 <td class="help"><:help product wholesale:> <:error_img wholesalePrice:></td>
191 <:ifFieldPerm gst:><input type="text" name="gst" value="<:old gst money default gst:>" size="7" />
192 (0.00)<:or:><:money product gst:><:eif:></td>
193 <td class="help"><:help product gst:> <:error_img gst:></td>
197 <td><:ifFieldPerm weight:><input type="text" name="weight" value="<:old weight default weight:>" size="7" /><:or:><:product weight:><:eif:> grams</td>
198 <td class="help"><:help product weight:> <:error_img weight:></td>
202 <td><:ifFieldPerm length:><input type="text" name="length" value="<:old length default length:>" size="7" /><:or:><:product length:><:eif:> mm</td>
203 <td class="help"><:help product length:> <:error_img length:></td>
207 <td><:ifFieldPerm width:><input type="text" name="width" value="<:old width default width:>" size="7" /><:or:><:product width:><:eif:> mm</td>
208 <td class="help"><:help product width:> <:error_img width:></td>
212 <td><:ifFieldPerm height:><input type="text" name="height" value="<:old height default height:>" size="7" /><:or:><:product height:><:eif:> mm</td>
213 <td class="help"><:help product height:> <:error_img height:></td>
216 <th>Release date:</th>
218 <:ifFieldPerm release:><input type="text" name="release" value="<:old release date "%d/%m/%Y" default release:>" size="11" />
219 (dd/mm/yyyy)<:or:><:date "%d/%m/%Y" product release:><:eif:></td>
220 <td class="help"><:help product release:> <:error_img
224 <th>Expiry date:</th>
226 <:ifFieldPerm expire:><input type="text" name="expire" value="<:old expire date "%d/%m/%Y" default expire:>" size="11" />
227 (dd/mm/yyyy)<:or:><:date "%d/%m/%Y" product expire:><:eif:></td>
228 <td class="help"><:help product expire:> <:error_img
232 <th>Summary length:</th>
234 <:ifFieldPerm summaryLength:><input type="text" name="summaryLength" size="10" maxlength="10" value="<:old summaryLength default summaryLength:>" /><:or:><:product summaryLength:><:eif:>
236 <td class="help"><:help product summary:> <:error_img summaryLength:></td>
239 <th>Display threshold:</th>
241 <:ifFieldPerm threshold:><input type="text" name="threshold" size="10" maxlength="10" value="<:old threshold default threshold:>" /><:or:><:product threshold:><:eif:>
243 <td class="help"><:help product threshold:> <:error_img threshold:></td>
245 <:include admin/include/edit_common.tmpl:>
249 <:ifFieldPerm options:><input type="text" name="options" value="<:old options default options:>" size="30" />
250 (<:alloptions:>)<:or:><:product options:><:eif:> </td>
251 <td class="help"><:help product options:> <:error_img options:></td>
253 <:include admin/product_custom.tmpl optional -:>
254 <:include admin/include/custom/product_custom.tmpl optional -:>
255 <:include admin/include/product_custom.tmpl optional -:>
256 <:include admin/include/article_cfg_custom.tmpl -:>
258 <th>Thumbnail image:</th>
260 <:ifFieldPerm thumbImage:><input type="file" name="thumbnail" /><:or:><:eif:>
261 <:ifProduct thumbImage:><img src="/images/<:product thumbImage:>">
262 <:if FieldPerm thumbImage:><input type="checkbox" name="remove_thumb" />
263 Remove<:or FieldPerm:><:eif FieldPerm:><:or:><:eif:> </td>
264 <td class="help"><:help product thumb:> <:error_img
269 <th><a name="files"></a>Files:</th>
271 <table class="editform editformsmall">
280 <:iterator begin files:>
282 <td><:file displayName:></td>
283 <td align="center"><:kb file sizeInBytes:></td>
284 <td><:file contentType:></td>
285 <td align="center"><:ifFile download:>Yes<:or:>No<:eif:></td>
286 <td align="center"><:ifFile forSale:>Yes<:or:>No<:eif:></td>
287 <td align="center"><:ifFile requireUser:>Yes<:or:>No<:eif:></td>
289 <:iterator end files:>
291 <p><a href="<:script:>?filelist=1&id=<:article id:>"><b>Manage Files</b></a>
294 No files are attached to this article. <a href="<:script:>?filelist=1&id=<:article id:>"><b>Manage Files</b></a><:eif Files:>
296 <td class="help"><:help product
297 files:> <:error_img files:></td>
301 <td> <:if Images:> <:iterator begin
302 images:> <img src="/images/<: image image :>" alt="<:image alt :>" width=
303 <:image width:> height=<:image height:>> <:iterator separator images:>
304 <hr noshade size="1">
305 <: iterator end images :>
306 <p align="left"><a href="<:script:>?id=<:article id:>&showimages=1"><b>Manage Images</b></a></p>
307 <:or Images:>No images are attached to this article. <a href="<:script:>?id=<:article id:>&showimages=1"><b>Manage Images</b></a>
310 <td class="help"><:help product images:> <:error_img
313 <:or Article:><:eif Article:>
315 <th>Purchase subscribes to:</th>
317 <select name="subscription_id">
318 <option value="-1"<:ifEq [old subscription_id] "-1":> selected="selected"<:or:><:eif:>>(nothing)</option>
319 <:iterator begin subscriptions:>
320 <option value="<:subscription subscription_id:>"<:ifEq [old subscription_id] [subscription subscription_id]:> selected="selected"<:or:><:eif:>><:subscription title:></option>
321 <:iterator end subscriptions:>
322 </select> for <input type="text" name="subscription_period" value="<:ifEq [old subscription_period] "":><:default subscription_period:><:or:><:old subscription_period:><:eif:>" size="3" /><:error_img subscription_period:> months.
324 <td class="help"><:help product subscription_id:></td>
327 <th>Can be used to:</th>
329 <select name="subscription_usage">
330 <option value="3"<:ifEq [old subscription_usage] "3":> selected="selected"<:or:><:eif:>>Start or renew a subscription</option>
331 <option value="1"<:ifEq [old subscription_usage] "1":> selected="selected"<:or:><:eif:>>Start a subscription only</option>
332 <option value="2"<:ifEq [old subscription_usage] "2":> selected="selected"<:or:><:eif:>>Renew a subscription only</option>
335 <td class="help"><:help product subscription_usage:></td>
338 <th>User must be subscribed to:</th>
340 <select name="subscription_required">
341 <option value="-1"<:ifEq [old subscription_required] "-1":> selected="selected"<:or:><:eif:>>(nothing)</option>
342 <:iterator begin subscriptions:>
343 <option value="<:subscription subscription_id:>"<:ifEq [old subscription_required] [subscription subscription_id]:> selected="selected"<:or:><:eif:>><:subscription title:></option>
344 <:iterator end subscriptions:>
345 </select> to purchase this product
347 <td class="help"><:help product subscription_id:></td>
349 <tr><td colspan="3">*These fields cannot be modified once this product has been
350 included in an order.</td></tr>
351 <:.call "admin/include/edit_metadata.tmpl", tr: 1:>
352 <:if UserCan edit_save:article:>
354 <td colspan="3" class="buttons"><:ifNew:><input type="submit" name="save" value="Add Product" /><:or:><input type="submit" name="save" value="Update Product" /><:eif:>
355 </td></tr><:or UserCan:><:eif UserCan:>