PageRenderTime 55ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/settings-pages/presentation.php

https://gitlab.com/endomorphosis/reservationtelco
PHP | 1070 lines | 936 code | 131 blank | 3 comment | 84 complexity | b2dddc93767f75702e22bd36e4dc344d MD5 | raw file
  1. <?php
  2. function options_categorylist() {
  3. global $wpdb;
  4. $current_default = get_option('wpsc_default_category');
  5. $group_sql = "SELECT * FROM `".WPSC_TABLE_CATEGORISATION_GROUPS."` WHERE `active`='1'";
  6. $group_data = $wpdb->get_results($group_sql,ARRAY_A);
  7. $categorylist .= "<select name='wpsc_options[wpsc_default_category]'>";
  8. if(get_option('wpsc_default_category') == 'all') {
  9. $selected = "selected='selected'";
  10. } else {
  11. $selected = '';
  12. }
  13. $categorylist .= "<option value='all' ".$selected." >".__('Show All Products', 'wpsc')."</option>";
  14. if(get_option('wpsc_default_category') == 'list') {
  15. $selected = "selected='selected'";
  16. } else {
  17. $selected = '';
  18. }
  19. $categorylist .= "<option value='list' ".$selected." >".__('Show Category List', 'wpsc')."</option>";
  20. if(get_option('wpsc_default_category') == 'all+list') {
  21. $selected = "selected='selected'";
  22. } else {
  23. $selected = '';
  24. }
  25. $categorylist .= "<option value='all+list' ".$selected." >".__('Show All Products + Category List', 'wpsc')."</option>";
  26. $categorylist .="<optgroup label='Select a default Product Category:'></optgroup>";
  27. foreach($group_data as $group) {
  28. $cat_sql = "SELECT * FROM `".WPSC_TABLE_PRODUCT_CATEGORIES."` WHERE `group_id` IN ({$group['id']}) AND `active`='1'";
  29. $category_data = $wpdb->get_results($cat_sql,ARRAY_A);
  30. if($category_data != null) {
  31. $categorylist .= "<optgroup label='{$group['name']}'>";
  32. foreach((array)$category_data as $category) {
  33. if(get_option('wpsc_default_category') == $category['id']) {
  34. $selected = "selected='selected'";
  35. } else {
  36. $selected = "";
  37. }
  38. $categorylist .= "<option value='".$category['id']."' ".$selected." >".$category['name']."</option>";
  39. }
  40. $categorylist .= "</optgroup>";
  41. }
  42. }
  43. $categorylist .= "</select>";
  44. return $categorylist;
  45. }
  46. function wpsc_options_presentation(){
  47. global $wpdb;
  48. ?>
  49. <form name='cart_options' id='cart_options' method='post' action=''>
  50. <div id="options_presentation">
  51. <h2><?php echo __('Presentation Settings', 'wpsc'); ?></h2>
  52. <?php
  53. /* wpsc_setting_page_update_notification displays the wordpress styled notifications */
  54. wpsc_settings_page_update_notification(); ?>
  55. <div class='product_and_button_settings'>
  56. <h3 class="form_group"><?php echo __('Button Settings', 'wpsc');?></h3>
  57. <table class='wpsc_options form-table'>
  58. <tr>
  59. <th scope="row"><?php echo __('Button Type', 'wpsc');?>:</th>
  60. <td>
  61. <?php
  62. $addtocart_or_buynow = get_option('addtocart_or_buynow');
  63. $addtocart_or_buynow1 = "";
  64. $addtocart_or_buynow2 = "";
  65. switch($addtocart_or_buynow) {
  66. case 0:
  67. $addtocart_or_buynow1 = "checked ='checked'";
  68. break;
  69. case 1:
  70. $addtocart_or_buynow2 = "checked ='checked'";
  71. break;
  72. }
  73. ?>
  74. <input type='radio' value='0' name='wpsc_options[addtocart_or_buynow]' id='addtocart_or_buynow1' <?php echo $addtocart_or_buynow1; ?> />
  75. <label for='addtocart_or_buynow1'><?php echo __('Add To Cart', 'wpsc');?></label> &nbsp;<br />
  76. <input type='radio' value='1' name='wpsc_options[addtocart_or_buynow]' id='addtocart_or_buynow2' <?php echo $addtocart_or_buynow2; ?> />
  77. <label for='addtocart_or_buynow2'><?php echo __('Buy Now', 'wpsc');?></label>
  78. </td>
  79. </tr>
  80. <tr>
  81. <th scope="row"><?php echo __('Hide "Add to cart" button', 'wpsc');?>: </th>
  82. <td>
  83. <?php
  84. $hide_addtocart_button = get_option('hide_addtocart_button');
  85. $hide_addtocart_button1 = "";
  86. $hide_addtocart_button2 = "";
  87. switch($hide_addtocart_button) {
  88. case 0:
  89. $hide_addtocart_button2 = "checked ='checked'";
  90. break;
  91. case 1:
  92. $hide_addtocart_button1 = "checked ='checked'";
  93. break;
  94. }
  95. ?>
  96. <input type='radio' value='1' name='wpsc_options[hide_addtocart_button]' id='hide_addtocart_button1' <?php echo $hide_addtocart_button1; ?> /> <label for='hide_addtocart_button1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  97. <input type='radio' value='0' name='wpsc_options[hide_addtocart_button]' id='hide_addtocart_button2' <?php echo $hide_addtocart_button2; ?> /> <label for='hide_addtocart_button2'><?php echo __('No', 'wpsc');?></label>
  98. </td>
  99. </tr>
  100. </table>
  101. <h3 class="form_group"><?php echo __('Product Settings', 'wpsc');?></h3>
  102. <table class='wpsc_options form-table'>
  103. <tr>
  104. <th scope="row"><?php echo __('Show Product Ratings', 'wpsc');?>:</th>
  105. <td>
  106. <?php
  107. $display_pnp = get_option('product_ratings');
  108. $product_ratings1 = "";
  109. $product_ratings2 = "";
  110. switch($display_pnp) {
  111. case 0:
  112. $product_ratings2 = "checked ='checked'";
  113. break;
  114. case 1:
  115. $product_ratings1 = "checked ='checked'";
  116. break;
  117. }
  118. ?>
  119. <input type='radio' value='1' name='wpsc_options[product_ratings]' id='product_ratings1' <?php echo $product_ratings1; ?> /> <label for='product_ratings1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  120. <input type='radio' value='0' name='wpsc_options[product_ratings]' id='product_ratings2' <?php echo $product_ratings2; ?> /> <label for='product_ratings2'><?php echo __('No', 'wpsc');?></label>
  121. </td>
  122. </tr>
  123. <tr>
  124. <th scope="row">
  125. <?php echo __('Display Fancy Purchase Notifications', 'wpsc');?>:
  126. </th>
  127. <td>
  128. <?php
  129. $fancy_notifications = get_option('fancy_notifications');
  130. $fancy_notifications1 = "";
  131. $fancy_notifications2 = "";
  132. switch($fancy_notifications) {
  133. case 0:
  134. $fancy_notifications2 = "checked ='checked'";
  135. break;
  136. case 1:
  137. $fancy_notifications1 = "checked ='checked'";
  138. break;
  139. }
  140. ?>
  141. <input type='radio' value='1' name='wpsc_options[fancy_notifications]' id='fancy_notifications1' <?php echo $fancy_notifications1; ?> /> <label for='fancy_notifications1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  142. <input type='radio' value='0' name='wpsc_options[fancy_notifications]' id='fancy_notifications2' <?php echo $fancy_notifications2; ?> /> <label for='fancy_notifications2'><?php echo __('No', 'wpsc');?></label>
  143. </td>
  144. </tr>
  145. <tr>
  146. <th scope="row"><?php echo __('Show Postage and Packaging', 'wpsc');?>:</th>
  147. <td>
  148. <?php
  149. $display_pnp = get_option('display_pnp');
  150. $display_pnp1 = "";
  151. $display_pnp2 = "";
  152. switch($display_pnp) {
  153. case 0:
  154. $display_pnp2 = "checked ='checked'";
  155. break;
  156. case 1:
  157. $display_pnp1 = "checked ='checked'";
  158. break;
  159. }
  160. ?>
  161. <input type='radio' value='1' name='wpsc_options[display_pnp]' id='display_pnp1' <?php echo $display_pnp1; ?> /> <label for='display_pnp1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  162. <input type='radio' value='0' name='wpsc_options[display_pnp]' id='display_pnp2' <?php echo $display_pnp2; ?> /> <label for='display_pnp2'><?php echo __('No', 'wpsc');?></label>
  163. </td>
  164. </tr>
  165. <tr>
  166. <th scope="row"><?php echo __('Disable link in Title', 'wpsc');?>: </th>
  167. <td>
  168. <?php
  169. $hide_name_link = get_option('hide_name_link');
  170. $hide_name_link1 = "";
  171. $hide_name_link2 = "";
  172. switch($hide_name_link) {
  173. case 0:
  174. $hide_name_link2 = "checked ='checked'";
  175. break;
  176. case 1:
  177. $hide_name_link1 = "checked ='checked'";
  178. break;
  179. }
  180. ?>
  181. <input type='radio' value='1' name='wpsc_options[hide_name_link]' id='hide_name_link1' <?php echo $hide_name_link1; ?> />
  182. <label for='hide_name_link1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  183. <input type='radio' value='0' name='wpsc_options[hide_name_link]' id='hide_name_link2' <?php echo $hide_name_link2; ?> />
  184. <label for='hide_name_link2'><?php echo __('No', 'wpsc');?></label>
  185. </td>
  186. </tr>
  187. <tr>
  188. <th scope="row"><?php echo __('Add quantity field to each product description', 'wpsc');?>:</th>
  189. <td>
  190. <?php
  191. $multi_adding = get_option('multi_add');
  192. switch($multi_adding) {
  193. case 1:
  194. $multi_adding1 = "checked ='checked'";
  195. break;
  196. case 0:
  197. $multi_adding2 = "checked ='checked'";
  198. break;
  199. }
  200. ?>
  201. <input type='radio' value='1' name='wpsc_options[multi_add]' id='multi_adding1' <?php echo $multi_adding1; ?> />
  202. <label for='multi_adding1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  203. <input type='radio' value='0' name='wpsc_options[multi_add]' id='multi_adding2' <?php echo $multi_adding2; ?> />
  204. <label for='multi_adding2'><?php echo __('No', 'wpsc');?></label>
  205. </td>
  206. </tr>
  207. </table>
  208. </div>
  209. <div class='themes_and_appearance'>
  210. <h4><?php _e("Theme Customisation", 'wpsc'); ?></h4>
  211. <?php
  212. if($_SESSION['wpsc_themes_copied'] == true) {
  213. ?>
  214. <div class="updated fade below-h2" id="message" style="background-color: rgb(255, 251, 204);">
  215. <p><?php _e("Thanks, the themes have been copied."); ?></p>
  216. </div>
  217. <?php
  218. $_SESSION['wpsc_themes_copied'] = false;
  219. }
  220. ?>
  221. <?php
  222. if(wpsc_count_themes_in_uploads_directory() > 0) {
  223. ?>
  224. <p><?php _e("Theming your stores appearance is easy.");?></p>
  225. <p>
  226. <?php _e("You just need to edit the appropriate files in the following location.", 'wpsc'); ?><br /><br />
  227. <span class='display-path'><strong><?php _e("Path:", 'wpsc'); ?></strong> <?php echo str_replace(ABSPATH, "", WPSC_THEMES_PATH).WPSC_THEME_DIR."/"; ?> </span>
  228. </p>
  229. <p><strong><?php _e("To create a new theme:", 'wpsc'); ?></strong></p>
  230. <ol>
  231. <li><?php _e("Copy the default directory and rename it 'newTheme'"); ?></li>
  232. <li><?php _e("Rename the default.css file inside the 'newTheme' directory to 'newTheme.css'"); ?></li>
  233. </ol>
  234. <?php
  235. } else if(!is_writable(WPSC_THEMES_PATH)) {
  236. ?>
  237. <p><?php _e("The permissions on your themes directory are incorrect.", 'wpsc'); ?> </p>
  238. <p><?php _e("Please set the permissions to 775 on the following directory.", 'wpsc'); ?><br /><br />
  239. <span class='display-path'><strong><?php _e("Path:", 'wpsc'); ?></strong> <?php echo str_replace(ABSPATH, "", WPSC_THEMES_PATH).WPSC_THEME_DIR."/"; ?> </span></p>
  240. <?php
  241. } else {
  242. ?>
  243. <p><?php _e("Your theme files have not been moved. Until your theme files have been moved, we have disabled automatic upgrades.", 'wpsc');?>
  244. <p><?php printf(__("Click here to <a href='%s'>Move your files</a> to a safe place", 'wpsc'), wp_nonce_url("admin.php?wpsc_admin_action=copy_themes", 'copy_themes') ); ?> </p>
  245. <?php
  246. }
  247. ?>
  248. <p><a href='http://www.instinct.co.nz/e-commerce/docs/'><?php _e("Read Tutorials", 'wpsc'); ?></a></p>
  249. </div>
  250. <div style='clear:both;'></div>
  251. <h3 class="form_group"><?php echo __('Product Page Settings', 'wpsc');?></h3>
  252. <table class='wpsc_options form-table'>
  253. <tr>
  254. <th scope="row"><?php echo __('Catalog View', 'wpsc');?>:</th>
  255. <td>
  256. <?php
  257. $display_pnp = get_option('product_view');
  258. $product_view1 = null;
  259. $product_view2 = null;
  260. $product_view3 = null;
  261. switch($display_pnp) {
  262. case "grid":
  263. if(function_exists('product_display_grid')) {
  264. $product_view3 = "selected ='selected'";
  265. break;
  266. }
  267. case "list":
  268. if(function_exists('product_display_list')) {
  269. $product_view2 = "selected ='selected'";
  270. break;
  271. }
  272. default:
  273. $product_view1 = "selected ='selected'";
  274. break;
  275. }
  276. if(get_option('list_view_quantity') == 1) {
  277. $list_view_quantity_value = "checked='checked'";
  278. } else {
  279. $list_view_quantity_value = '';
  280. }
  281. if(get_option('show_images_only') == 1) {
  282. $show_images_only_value = "checked='checked'";
  283. } else {
  284. $show_images_only_value = '';
  285. }
  286. if(get_option('display_variations') == 1) {
  287. $display_variations = "checked='checked'";
  288. } else {
  289. $display_variations = '';
  290. }
  291. if(get_option('display_description') == 1) {
  292. $display_description = "checked='checked'";
  293. } else {
  294. $display_description = '';
  295. }
  296. if(get_option('display_addtocart') == 1) {
  297. $display_addtocart = "checked='checked'";
  298. } else {
  299. $display_addtocart = '';
  300. }
  301. if(get_option('display_moredetails') == 1) {
  302. $display_moredetails= "checked='checked'";
  303. } else {
  304. $display_moredetails = '';
  305. }
  306. ?>
  307. <select name='wpsc_options[product_view]' onchange="toggle_display_options(this.options[this.selectedIndex].value)">
  308. <option value='default' <?php echo $product_view1; ?>><?php echo __('Default View', 'wpsc');?></option>
  309. <?php
  310. if(function_exists('product_display_list')) {
  311. ?>
  312. <option value='list' <?php echo $product_view2; ?>><?php echo __('List View', 'wpsc');?></option>
  313. <?php
  314. } else {
  315. ?>
  316. <option value='list' disabled='disabled' <?php echo $product_view2; ?>><?php echo __('List View', 'wpsc');?></option>
  317. <?php
  318. }
  319. if(function_exists('product_display_grid')) {
  320. ?>
  321. <option value='grid' <?php echo $product_view3; ?>><?php echo __('Grid View', 'wpsc');?></option>
  322. <?php
  323. } else {
  324. ?>
  325. <option value='grid' disabled='disabled' <?php echo $product_view3; ?>><?php echo __('Grid View', 'wpsc');?></option>
  326. <?php
  327. }
  328. ?>
  329. </select>
  330. <?php
  331. if(!function_exists('product_display_grid')) {
  332. ?><a href='http://getshopped.org/extend/premium-upgrades/'><?php echo __('Purchase unavailable options', 'wpsc'); ?></a> <?php
  333. }
  334. ?>
  335. <div id='list_view_options' <?php if(is_null($product_view2)) { echo "style='display:none;'";} ?> >
  336. <input type='checkbox' value='1' name='wpsc_options[list_view_quantity]' id='list_view_quantity' <?php echo $list_view_quantity_value;?> />
  337. <label for='list_view_options'><?php echo __('Show quantity form in list view', 'wpsc');?></label>
  338. </div>
  339. <div id='grid_view_options' <?php echo $list_view_quantity_style;?> <?php if(is_null($product_view3)) { echo "style='display:none;'";} ?>>
  340. <input type='text' name='wpsc_options[grid_number_per_row]' id='grid_number_per_row' size='1' value='<?php echo get_option('grid_number_per_row');?>' />
  341. <label for='grid_number_per_row'><?php echo __('Products Per Row', 'wpsc');?></label><br />
  342. <input type='hidden' value='0' name='wpsc_options[show_images_only]' />
  343. <input type='checkbox' value='1' name='wpsc_options[show_images_only]' id='show_images_only' <?php echo $show_images_only_value;?> />
  344. <label for='show_images_only'><?php echo __('Show images only', 'wpsc');?></label><br />
  345. <input type='hidden' value='0' name='wpsc_options[display_variations]' />
  346. <input type='checkbox' value='1' name='wpsc_options[display_variations]' id='display_variations' <?php echo $display_variations;?> />
  347. <label for='display_variations'><?php echo __('Display Variations', 'wpsc');?></label><br />
  348. <input type='hidden' value='0' name='wpsc_options[display_description]' />
  349. <input type='checkbox' value='1' name='wpsc_options[display_description]' id='display_description' <?php echo $display_description;?> />
  350. <label for='display_description'><?php echo __('Display Description', 'wpsc');?></label><br />
  351. <input type='hidden' value='0' name='wpsc_options[display_addtocart]' />
  352. <input type='checkbox' value='1' name='wpsc_options[display_addtocart]' id='display_addtocart' <?php echo $display_addtocart;?> />
  353. <label for='display_addtocart'><?php echo __('Display "Add To Cart" Button', 'wpsc');?></label><br />
  354. <input type='hidden' value='0' name='wpsc_options[display_moredetails]' />
  355. <input type='checkbox' value='1' name='wpsc_options[display_moredetails]' id='display_moredetails' <?php echo $display_moredetails;?> />
  356. <label for='display_moredetails'><?php echo __('Display "More Details" Button', 'wpsc');?></label>
  357. </div>
  358. </td>
  359. </tr>
  360. <?php
  361. // }
  362. ?>
  363. <tr>
  364. <th scope="row"><?php echo __('Theme', 'wpsc');?>:</th>
  365. <td>
  366. <?php
  367. echo wpsc_list_product_themes();
  368. ?>
  369. </td>
  370. </tr>
  371. <tr>
  372. <th scope="row"><?php echo __('Product page displays', 'wpsc'); ?>:</th>
  373. <td>
  374. <?php echo options_categorylist(); ?>
  375. </td>
  376. </tr>
  377. <?php
  378. $wpsc_sort_by = get_option('wpsc_sort_by');
  379. switch($wpsc_sort_by) {
  380. case 'name':
  381. $wpsc_sort_by1 = "selected ='selected'";
  382. break;
  383. case 'price':
  384. $wpsc_sort_by2 = "selected ='selected'";
  385. break;
  386. case 'dragndrop':
  387. $wpsc_sort_by4 = "selected='selected'";
  388. break;
  389. case 'id':
  390. default:
  391. $wpsc_sort_by3 = "selected ='selected'";
  392. break;
  393. }
  394. ?>
  395. <tr>
  396. <th scope="row">
  397. <?php echo __('Sort Products By', 'wpsc');?>:
  398. </th>
  399. <td>
  400. <select name='wpsc_options[wpsc_sort_by]'>
  401. <option <?php echo $wpsc_sort_by1; ?> value='name'><?php echo __('Name', 'wpsc');?></option>
  402. <option <?php echo $wpsc_sort_by2; ?> value='price'><?php echo __('Price', 'wpsc');?></option>
  403. <option <?php echo $wpsc_sort_by4; ?> value='dragndrop'><?php echo __('Drag &amp; Drop', 'wpsc');?></option>
  404. <option <?php echo $wpsc_sort_by3; ?> value='id'><?php echo __('Time Uploaded', 'wpsc');?></option>
  405. </select><br />
  406. <?php _e('If you have used the drag-drop interface on the edit-products page to order your products then you must use the Drag &amp; Drop option.','wpsc'); ?>
  407. </td>
  408. </tr>
  409. <tr>
  410. <th scope="row"><?php echo __('Show Breadcrumbs', 'wpsc');?>:</th>
  411. <td>
  412. <?php
  413. $show_breadcrumbs = get_option('show_breadcrumbs');
  414. $show_breadcrumbs1 = "";
  415. $show_breadcrumbs2 = "";
  416. switch($show_breadcrumbs) {
  417. case 0:
  418. $show_breadcrumbs2 = "checked ='checked'";
  419. break;
  420. case 1:
  421. $show_breadcrumbs1 = "checked ='checked'";
  422. break;
  423. }
  424. ?>
  425. <input type='radio' value='1' name='wpsc_options[show_breadcrumbs]' id='show_breadcrumbs1' <?php echo $show_breadcrumbs1; ?> /> <label for='show_breadcrumbs1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  426. <input type='radio' value='0' name='wpsc_options[show_breadcrumbs]' id='show_breadcrumbs2' <?php echo $show_breadcrumbs2; ?> /> <label for='show_breadcrumbs2'><?php echo __('No', 'wpsc');?></label>
  427. </td>
  428. </tr>
  429. <tr>
  430. <th scope="row">
  431. <?php echo __('Product Groups/Products Display', 'wpsc');?>:
  432. </th>
  433. <td>
  434. <?php
  435. $display_pnp = get_option('catsprods_display_type');
  436. $catsprods_display_type1 = "";
  437. $catsprods_display_type2 = "";
  438. switch($display_pnp) {
  439. case 0:
  440. $catsprods_display_type1 = "checked ='checked'";
  441. break;
  442. case 1:
  443. $catsprods_display_type2 = "checked ='checked'";
  444. break;
  445. }
  446. ?>
  447. <input type='radio' value='0' name='wpsc_options[catsprods_display_type]' id='catsprods_display_type1' <?php echo $catsprods_display_type1; ?> /> <label for='catsprods_display_type1'><?php echo __('Product Groups Only (All products displayed)', 'wpsc');?></label> &nbsp;
  448. <input type='radio' value='1' name='wpsc_options[catsprods_display_type]' id='catsprods_display_type2' <?php echo $catsprods_display_type2; ?> /> <label for='catsprods_display_type2'><?php echo __('Sliding Product Groups (1 product per page)', 'wpsc');?></label>
  449. </td>
  450. </tr>
  451. <tr>
  452. <th scope="row">
  453. <?php echo __( 'Show Subcategory Products in Parent Category', 'wpsc' ); ?>:
  454. </th>
  455. <td>
  456. <?php
  457. $show_subcatsprods_in_cat = get_option( 'show_subcatsprods_in_cat' );
  458. $show_subcatsprods_in_cat_on = '';
  459. $show_subcatsprods_in_cat_off = '';
  460. switch ( $show_subcatsprods_in_cat ) {
  461. case 1:
  462. $show_subcatsprods_in_cat_on = 'checked="checked"';
  463. break;
  464. case 0:
  465. $show_subcatsprods_in_cat_off = 'checked="checked"';
  466. break;
  467. }
  468. ?>
  469. <input type="radio" value="1" name="wpsc_options[show_subcatsprods_in_cat]" id="show_subcatsprods_in_cat_on" <?php echo $show_subcatsprods_in_cat_on; ?> /> <label for="show_subcatsprods_in_cat_on"><?php echo __( 'Yes', 'wpsc' ); ?></label> &nbsp;
  470. <input type="radio" value="0" name="wpsc_options[show_subcatsprods_in_cat]" id="show_subcatsprods_in_cat_off" <?php echo $show_subcatsprods_in_cat_off; ?> /> <label for="show_subcatsprods_in_cat_off"><?php echo __( 'No', 'wpsc' ); ?></label>
  471. </td>
  472. </tr>
  473. <?php
  474. if(function_exists('gold_shpcrt_search_form')) {
  475. ?>
  476. <tr>
  477. <th scope="row"><?php echo __('Show Search', 'wpsc');?>:</th>
  478. <td>
  479. <?php
  480. $display_pnp = get_option('show_search');
  481. $show_search1 = "";
  482. $show_search2 = "";
  483. switch($display_pnp) {
  484. case 0:
  485. $show_search2 = "checked ='checked'";
  486. break;
  487. case 1:
  488. $show_search1 = "checked ='checked'";
  489. break;
  490. }
  491. $display_advanced_search = get_option('show_advanced_search');
  492. $show_advanced_search = "";
  493. if($display_advanced_search == 1) {
  494. $show_advanced_search = "checked ='checked'";
  495. }
  496. $display_live_search = get_option('show_live_search');
  497. if($display_live_search == 1) {
  498. $show_live_search = "checked ='checked'";
  499. }
  500. if ($show_search1 != "checked ='checked'") {
  501. $dis = "style='display:none;'";
  502. }
  503. ?>
  504. <input type='radio' onclick='jQuery("#wpsc_advanced_search").show()' value='1' name='wpsc_options[show_search]' id='show_search1' <?php echo $show_search1; ?> /> <label for='show_search1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  505. <input type='radio' onclick='jQuery("#wpsc_advanced_search").hide()' value='0' name='wpsc_options[show_search]' id='show_search2' <?php echo $show_search2; ?> /> <label for='show_search2'><?php echo __('No', 'wpsc');?></label>
  506. <div <?php echo $dis;?> id='wpsc_advanced_search'>
  507. <input type='hidden' name='wpsc_options[show_advanced_search]' value='0' />
  508. <input type='checkbox' name='wpsc_options[show_advanced_search]' id='show_advanced_search' <?php echo $show_advanced_search; ?> value='1' />
  509. <?php echo __('Show Advanced Search', 'wpsc');?><br />
  510. <input type='hidden' name='wpsc_options[show_live_search]' value='0' />
  511. <input type='checkbox' name='wpsc_options[show_live_search]' id='show_live_search' <?php echo $show_live_search; ?> value='1' />
  512. <?php echo __('Use Live Search', 'wpsc');?>
  513. </div>
  514. </td>
  515. </tr>
  516. <?php
  517. }
  518. ?>
  519. <tr>
  520. <th scope="row"><?php echo __('Replace Page Title With Product/Category Name', 'wpsc');?>:</th>
  521. <td>
  522. <?php
  523. $wpsc_replace_page_title = get_option('wpsc_replace_page_title');
  524. $wpsc_replace_page_title1 = "";
  525. $wpsc_replace_page_title2 = "";
  526. switch($wpsc_replace_page_title) {
  527. case 0:
  528. $wpsc_replace_page_title2 = "checked ='checked'";
  529. break;
  530. case 1:
  531. $wpsc_replace_page_title1 = "checked ='checked'";
  532. break;
  533. }
  534. ?>
  535. <input type='radio' value='1' name='wpsc_options[wpsc_replace_page_title]' id='wpsc_replace_page_title1' <?php echo $wpsc_replace_page_title1; ?> /> <label for='wpsc_replace_page_title1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  536. <input type='radio' value='0' name='wpsc_options[wpsc_replace_page_title]' id='wpsc_replace_page_title2' <?php echo $wpsc_replace_page_title2; ?> /> <label for='wpsc_replace_page_title2'><?php echo __('No', 'wpsc');?></label>
  537. </td>
  538. </tr>
  539. </table>
  540. <h3 class="form_group"><?php echo __('Shopping Cart Settings', 'wpsc');?></h3>
  541. <table class='wpsc_options form-table'>
  542. <tr>
  543. <th scope="row"><?php echo __('Cart Location', 'wpsc');?>:</th>
  544. <td>
  545. <?php
  546. $cart_location = get_option('cart_location');
  547. $cart1 = "";
  548. $cart2 = "";
  549. switch($cart_location) {
  550. case 1:
  551. $cart1 = "checked ='checked'";
  552. break;
  553. case 2:
  554. $cart2 = "checked ='checked'";
  555. break;
  556. case 3:
  557. $cart3 = "checked ='checked'";
  558. break;
  559. case 4:
  560. $cart4 = "checked ='checked'";
  561. break;
  562. case 5:
  563. $cart5 = "checked ='checked'";
  564. break;
  565. }
  566. if(function_exists('register_sidebar_widget')) {
  567. ?>
  568. <input type='radio' value='1' onclick='hideelement1("dropshop_option", this.value)' disabled='disabled' name='wpsc_options[cart_location]' id='cart1' <?php echo $cart1; ?> /> <label style='color: #666666;' for='cart1'><?php echo __('Sidebar', 'wpsc');?></label> &nbsp;
  569. <?php
  570. } else {
  571. ?>
  572. <input type='radio' value='1' name='wpsc_options[cart_location]' id='cart1' <?php echo $cart1; ?> /> <label for='cart1'><?php echo __('Sidebar', 'wpsc');?></label> &nbsp;
  573. <?php
  574. }
  575. ?>
  576. <input type='radio' onclick='hideelement1("dropshop_option", this.value)' value='2' name='wpsc_options[cart_location]' id='cart2' <?php echo $cart2; ?> /> <label for='cart2'><?php echo __('Page', 'wpsc');?></label> &nbsp;
  577. <?php
  578. if(function_exists('register_sidebar_widget')) {
  579. ?>
  580. <input type='radio' value='4' onclick='hideelement1("dropshop_option", this.value)' name='wpsc_options[cart_location]' id='cart4' <?php echo $cart4; ?> /> <label for='cart4'><?php echo __('Widget', 'wpsc');?></label> &nbsp;
  581. <?php
  582. } else {
  583. ?>
  584. <input type='radio' disabled='disabled' value='4' name='wpsc_options[cart_location]' id='cart4' alt='<?php echo __('You need to enable the widgets plugin to use this', 'wpsc');?>' title='<?php echo __('You need to enable the widgets plugin to use this', 'wpsc');?>' <?php echo $cart4; ?> /> <label style='color: #666666;' for='cart4' title='<?php echo __('You need to enable the widgets plugin to use this', 'wpsc');?>'><?php echo __('Widget', 'wpsc');?></label> &nbsp;
  585. <?php
  586. }
  587. if(function_exists('drag_and_drop_cart')) {
  588. ?>
  589. <input type='radio' onclick='hideelement1("dropshop_option", this.value)' value='5' name='wpsc_options[cart_location]' id='cart5' <?php echo $cart5; ?> /> <label for='cart5'><?php echo __('DropShop', 'wpsc');?></label> &nbsp;
  590. <?php
  591. } else {
  592. ?>
  593. <input type='radio' disabled='disabled' value='5' name='wpsc_options[cart_location]' id='cart5' alt='<?php echo __('You need to enable the widgets plugin to use this', 'wpsc');?>' title='<?php echo __('You need to install the Gold and DropShop extentions to use this', 'wpsc');?>' <?php echo $cart5; ?> /> <label style='color: #666666;' for='cart5' title='<?php echo __('You need to install the Gold and DropShop extentions to use this', 'wpsc');?>'><?php echo __('DropShop', 'wpsc');?></label> &nbsp;
  594. <?php
  595. }
  596. ?>
  597. <input type='radio' onclick='hideelement1("dropshop_option", this.value)' value='3' name='wpsc_options[cart_location]' id='cart3' <?php echo $cart3; ?> /> <label for='cart3'><?php echo __('Manual', 'wpsc');?> <span style='font-size: 7pt;'>(PHP code: &lt;?php echo nzshpcrt_shopping_basket(); ?&gt; )</span></label>
  598. <div style='display: <?php if (isset($cart5)) { echo "block"; } else { echo "none"; } ?>;' id='dropshop_option'>
  599. <p>
  600. <input type="radio" id="drop1" value="all" <?php if (get_option('dropshop_display') == 'all') { echo "checked='checked'"; } ?> name="wpsc_options[dropshop_display]" /><label for="drop1"><?php echo __('Show Dropshop on every page', 'wpsc');?></label>
  601. <input type="radio" id="drop2" value="product" <?php if (get_option('dropshop_display') == 'product') { echo "checked='checked'"; } ?> name="wpsc_options[dropshop_display]"/><label for="drop2"><?php echo __('Show Dropshop only on product page', 'wpsc');?></label>
  602. </p>
  603. <p>
  604. <input type="radio" id="wpsc_dropshop_theme1" value="light" <?php if (get_option('wpsc_dropshop_theme') != 'dark') { echo "checked='checked'"; } ?> name="wpsc_options[wpsc_dropshop_theme]" /><label for="wpsc_dropshop_theme1"><?php echo __('Use light Dropshop style', 'wpsc');?></label>
  605. <input type="radio" id="wpsc_dropshop_theme2" value="dark" <?php if (get_option('wpsc_dropshop_theme') == 'dark') { echo "checked='checked'"; } ?> name="wpsc_options[wpsc_dropshop_theme]"/><label for="wpsc_dropshop_theme2"><?php echo __('Use dark Dropshop style', 'wpsc');?></label>
  606. <input type="radio" id="wpsc_dropshop_theme3" value="craftyc" <?php if (get_option('wpsc_dropshop_theme') == 'craftyc') { echo "checked='checked'"; } ?> name="wpsc_options[wpsc_dropshop_theme]"/><label for="wpsc_dropshop_theme2"><?php echo __('Crafty', 'wpsc');?></label>
  607. </p>
  608. </div>
  609. </td>
  610. </tr>
  611. <tr>
  612. <th scope="row">
  613. <?php echo __('Use Sliding Cart', 'wpsc');?>:
  614. </th>
  615. <td>
  616. <?php
  617. $display_pnp = get_option('show_sliding_cart');
  618. $show_sliding_cart1 = "";
  619. $show_sliding_cart2 = "";
  620. switch($display_pnp) {
  621. case 0:
  622. $show_sliding_cart2 = "checked ='checked'";
  623. break;
  624. case 1:
  625. $show_sliding_cart1 = "checked ='checked'";
  626. break;
  627. }
  628. ?>
  629. <input type='radio' value='1' name='wpsc_options[show_sliding_cart]' id='show_sliding_cart1' <?php echo $show_sliding_cart1; ?> /> <label for='show_sliding_cart1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  630. <input type='radio' value='0' name='wpsc_options[show_sliding_cart]' id='show_sliding_cart2' <?php echo $show_sliding_cart2; ?> /> <label for='show_sliding_cart2'><?php echo __('No', 'wpsc');?></label>
  631. </td>
  632. </tr>
  633. <tr>
  634. <th scope="row">
  635. <?php echo __('Display "+ Postage & Tax"', 'wpsc');?>:
  636. </th>
  637. <td>
  638. <?php
  639. $add_plustax = get_option('add_plustax');
  640. $add_plustax1 = "";
  641. $add_plustax2 = "";
  642. switch($add_plustax) {
  643. case 0:
  644. $add_plustax2 = "checked ='checked'";
  645. break;
  646. case 1:
  647. $add_plustax1 = "checked ='checked'";
  648. break;
  649. }
  650. ?>
  651. <input type='radio' value='1' name='wpsc_options[add_plustax]' id='add_plustax1' <?php echo $add_plustax1; ?> /> <label for='add_plustax1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  652. <input type='radio' value='0' name='wpsc_options[add_plustax]' id='add_plustax2' <?php echo $add_plustax2; ?> /> <label for='add_plustax2'><?php echo __('No', 'wpsc');?></label>
  653. </td>
  654. </tr>
  655. </table>
  656. <h3 class="form_group"><?php echo __('Product Group Settings', 'wpsc');?></h3>
  657. <table class='wpsc_options form-table'>
  658. <tr>
  659. <th scope="row"><?php echo __('Show Product Group Description', 'wpsc');?>:</th>
  660. <td>
  661. <?php
  662. $wpsc_category_description = get_option('wpsc_category_description');
  663. $wpsc_category_description1 = "";
  664. $wpsc_category_description2 = "";
  665. switch($wpsc_category_description) {
  666. case '1':
  667. $wpsc_category_description1 = "checked ='checked'";
  668. break;
  669. case '0':
  670. default:
  671. $wpsc_category_description2 = "checked ='checked'";
  672. break;
  673. }
  674. ?>
  675. <input type='radio' value='1' name='wpsc_options[wpsc_category_description]' id='wpsc_category_description1' <?php echo $wpsc_category_description1; ?> /> <label for='wpsc_category_description1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  676. <input type='radio' value='0' name='wpsc_options[wpsc_category_description]' id='wpsc_category_description2' <?php echo $wpsc_category_description2; ?> /> <label for='wpsc_category_description2'><?php echo __('No', 'wpsc');?></label>
  677. </td>
  678. </tr>
  679. <tr>
  680. <th scope="row">
  681. <?php echo __('Show Product Group Thumbnails', 'wpsc');?>:
  682. </th>
  683. <td>
  684. <?php
  685. $show_category_thumbnails = get_option('show_category_thumbnails');
  686. $show_category_thumbnails1 = "";
  687. $show_category_thumbnails2 = "";
  688. switch($show_category_thumbnails) {
  689. case 0:
  690. $show_category_thumbnails2 = "checked ='checked'";
  691. break;
  692. case 1:
  693. $show_category_thumbnails1 = "checked ='checked'";
  694. break;
  695. }
  696. ?>
  697. <input type='radio' value='1' name='wpsc_options[show_category_thumbnails]' id='show_category_thumbnails1' <?php echo $show_category_thumbnails1; ?> /> <label for='show_category_thumbnails1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  698. <input type='radio' value='0' name='wpsc_options[show_category_thumbnails]' id='show_category_thumbnails2' <?php echo $show_category_thumbnails2; ?> /> <label for='show_category_thumbnails2'><?php echo __('No', 'wpsc');?></label>
  699. </td>
  700. </tr>
  701. <!-- // Adrian - options for displaying number of products per category -->
  702. <tr>
  703. <th scope="row">
  704. <?php echo __('Show Product Count per Product Group', 'wpsc');?>:
  705. </th>
  706. <td>
  707. <?php
  708. $display_pnp = get_option('show_category_count');
  709. $show_category_count1 = "";
  710. $show_category_count2 = "";
  711. switch($display_pnp) {
  712. case 0:
  713. $show_category_count2 = "checked ='checked'";
  714. break;
  715. case 1:
  716. $show_category_count1 = "checked ='checked'";
  717. break;
  718. }
  719. ?>
  720. <input type='radio' value='1' name='wpsc_options[show_category_count]' id='show_category_count1' <?php echo $show_category_count1; ?> /> <label for='show_category_count1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  721. <input type='radio' value='0' name='wpsc_options[show_category_count]' id='show_category_count2' <?php echo $show_category_count2; ?> /> <label for='show_category_count2'><?php echo __('No', 'wpsc');?></label>
  722. </td>
  723. </tr>
  724. <!-- // Adrian - options for displaying category display type -->
  725. <tr>
  726. <th scope="row"><?php _e("Use Category Grid View",'wpsc');?>:</th>
  727. <td>
  728. <?php
  729. $wpsc_category_grid_view = get_option('wpsc_category_grid_view');
  730. $wpsc_category_grid_view1 = "";
  731. $wpsc_category_grid_view2 = "";
  732. switch($wpsc_category_grid_view) {
  733. case '1':
  734. $wpsc_category_grid_view1 = "checked ='checked'";
  735. break;
  736. case '0':
  737. default:
  738. $wpsc_category_grid_view2 = "checked ='checked'";
  739. break;
  740. }
  741. ?>
  742. <input type='radio' value='1' name='wpsc_options[wpsc_category_grid_view]' id='wpsc_category_grid_view1' <?php echo $wpsc_category_grid_view1; ?> /> <label for='wpsc_category_grid_view1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  743. <input type='radio' value='0' name='wpsc_options[wpsc_category_grid_view]' id='wpsc_category_grid_view2' <?php echo $wpsc_category_grid_view2; ?> /> <label for='wpsc_category_grid_view2'><?php echo __('No', 'wpsc');?></label>
  744. </td>
  745. </tr>
  746. </table>
  747. <h3 class="form_group"><a name='thumb_settings'><?php echo __('Thumbnail Settings', 'wpsc');?></a></h3>
  748. <table class='wpsc_options form-table'>
  749. <?php
  750. if(function_exists("getimagesize")) {
  751. ?>
  752. <tr>
  753. <th scope="row"><?php echo __('Default Product Thumbnail Size', 'wpsc');?>:</th>
  754. <td>
  755. <?php echo __('Height', 'wpsc');?>:<input type='text' size='6' name='wpsc_options[product_image_height]' class='wpsc_prod_thumb_option' value='<?php echo get_option('product_image_height'); ?>' />
  756. <?php echo __('Width', 'wpsc');?>:<input type='text' size='6' name='wpsc_options[product_image_width]' class='wpsc_prod_thumb_option' value='<?php echo get_option('product_image_width'); ?>' />
  757. <a href="<?php echo wp_nonce_url("admin.php?wpsc_admin_action=mass_resize_thumbnails", 'mass_resize'); ?>" style='visibility:hidden;' class='wpsc_mass_resize' ><?php _e("Resize Existing Thumbnails",'wpsc'); ?></a>
  758. <br />
  759. </td>
  760. </tr>
  761. <tr>
  762. <th scope="row">
  763. <?php echo __('Default Product Group Thumbnail Size', 'wpsc');?>:
  764. </th>
  765. <td>
  766. <?php echo __('Height', 'wpsc');?>:<input type='text' size='6' name='wpsc_options[category_image_height]' value='<?php echo get_option('category_image_height'); ?>' /> <?php echo __('Width', 'wpsc');?>:<input type='text' size='6' name='wpsc_options[category_image_width]' value='<?php echo get_option('category_image_width'); ?>' />
  767. </td>
  768. </tr>
  769. <tr>
  770. <th scope="row">
  771. <?php echo __('Single Product Image Size', 'wpsc');?>:
  772. </th>
  773. <td>
  774. <?php echo __('Height', 'wpsc');?>:<input type='text' size='6' name='wpsc_options[single_view_image_height]' value='<?php echo get_option('single_view_image_height'); ?>' /> <?php echo __('Width', 'wpsc');?>:<input type='text' size='6' name='wpsc_options[single_view_image_width]' value='<?php echo get_option('single_view_image_width'); ?>' />
  775. </td>
  776. </tr>
  777. <?php
  778. }
  779. ?>
  780. <tr>
  781. <th scope="row"><?php echo __('Show Thumbnails', 'wpsc');?>:</th>
  782. <td>
  783. <?php
  784. $show_thumbnails = get_option('show_thumbnails');
  785. $show_thumbnails1 = "";
  786. $show_thumbnails2 = "";
  787. switch($show_thumbnails) {
  788. case 0:
  789. $show_thumbnails2 = "checked ='checked'";
  790. break;
  791. case 1:
  792. $show_thumbnails1 = "checked ='checked'";
  793. break;
  794. }
  795. ?>
  796. <input type='radio' value='1' name='wpsc_options[show_thumbnails]' id='show_thumbnails1' <?php echo $show_thumbnails1; ?> /> <label for='show_thumbnails1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  797. <input type='radio' value='0' name='wpsc_options[show_thumbnails]' id='show_thumbnails2' <?php echo $show_thumbnails2; ?> /> <label for='show_thumbnails2'><?php echo __('No', 'wpsc');?></label>
  798. </td>
  799. </tr>
  800. <?php
  801. if(function_exists('gold_shpcrt_display_gallery')) {
  802. ?>
  803. <tr>
  804. <th scope="row">
  805. <?php echo __('Show Thumbnail Gallery', 'wpsc');?>:
  806. </th>
  807. <td>
  808. <?php
  809. $display_pnp = get_option('show_gallery');
  810. $show_gallery1 = "";
  811. $show_gallery2 = "";
  812. switch($display_pnp) {
  813. case 0:
  814. $show_gallery2 = "checked ='checked'";
  815. break;
  816. case 1:
  817. $show_gallery1 = "checked ='checked'";
  818. break;
  819. }
  820. ?>
  821. <input type='radio' value='1' name='wpsc_options[show_gallery]' id='show_gallery1' <?php echo $show_gallery1; ?> /> <label for='show_gallery1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  822. <input type='radio' value='0' name='wpsc_options[show_gallery]' id='show_gallery2' <?php echo $show_gallery2; ?> /> <label for='show_gallery2'><?php echo __('No', 'wpsc');?></label>
  823. </td>
  824. </tr>
  825. <tr>
  826. <th scope="row">
  827. <?php _e("Gallery Thumbnail Image Size");?>:
  828. </th>
  829. <td>
  830. <?php echo __('Height', 'wpsc');?>:<input type='text' size='6' name='wpsc_options[wpsc_gallery_image_height]' value='<?php echo get_option('wpsc_gallery_image_height'); ?>' />
  831. <?php echo __('Width', 'wpsc');?>:<input type='text' size='6' name='wpsc_options[wpsc_gallery_image_width]' value='<?php echo get_option('wpsc_gallery_image_width'); ?>' /> <br />
  832. </td>
  833. </tr>
  834. <?php
  835. }
  836. ?>
  837. </table>
  838. <h3 class="form_group"><?php echo __('Pagination settings', 'wpsc');?></h3>
  839. <table class='wpsc_options form-table'>
  840. <tr>
  841. <th scope="row">
  842. <?php echo __('Use Pagination', 'wpsc');?>:
  843. </th>
  844. <td>
  845. <?php
  846. $use_pagination = get_option('use_pagination');
  847. $use_pagination1 = "";
  848. $use_pagination2 = "";
  849. switch($use_pagination) {
  850. case 0:
  851. $use_pagination2 = "checked ='checked'";
  852. $page_count_display_state = 'style=\'display: none;\'';
  853. break;
  854. case 1:
  855. $use_pagination1 = "checked ='checked'";
  856. $page_count_display_state = '';
  857. break;
  858. }
  859. ?>
  860. <input onclick='jQuery("#wpsc_products_per_page").show()' type='radio' value='1' name='wpsc_options[use_pagination]' id='use_pagination1' <?php echo $use_pagination1; ?> /> <label for='use_pagination1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  861. <input onclick='jQuery("#wpsc_products_per_page").hide()' type='radio' value='0' name='wpsc_options[use_pagination]' id='use_pagination2' <?php echo $use_pagination2; ?> /> <label for='use_pagination2'><?php echo __('No', 'wpsc');?></label><br />
  862. <div id='wpsc_products_per_page' <?php echo $page_count_display_state; ?> >
  863. <input type='text' size='6' name='wpsc_options[wpsc_products_per_page]' value='<?php echo get_option('wpsc_products_per_page'); ?>' /> <?php echo __('number of products to show per page', 'wpsc'); ?>
  864. </div>
  865. </td>
  866. </tr>
  867. <tr>
  868. <th scope="row">
  869. <?php echo __('Page Number position', 'wpsc');?>:
  870. </th>
  871. <td>
  872. <input type='radio' value='1' name='wpsc_options[wpsc_page_number_position]' id='wpsc_page_number_position1' <?php if (get_option('wpsc_page_number_position') == 1) { echo "checked='checked'"; } ?> /><label for='wpsc_page_number_position1'><?php echo __('Top', 'wpsc'); ?></label>&nbsp;
  873. <input type='radio' value='2' name='wpsc_options[wpsc_page_number_position]' id='wpsc_page_number_position2' <?php if (get_option('wpsc_page_number_position') == 2) { echo "checked='checked'"; } ?> /><label for='wpsc_page_number_position2'><?php echo __('Bottom', 'wpsc'); ?></label>&nbsp;
  874. <input type='radio' value='3' name='wpsc_options[wpsc_page_number_position]' id='wpsc_page_number_position3' <?php if (get_option('wpsc_page_number_position') == 3) { echo "checked='checked'"; } ?> /><label for='wpsc_page_number_position3'><?php echo __('Both', 'wpsc'); ?></label>
  875. <br />
  876. </td>
  877. </tr>
  878. </table>
  879. <h3 class="form_group"><?php echo __('Comment Settings', 'wpsc');?></h3>
  880. <table class='wpsc_options form-table'>
  881. <tr>
  882. <th scope="row">
  883. <?php echo __('Use IntenseDebate Comments', 'wpsc');?>:
  884. <a href="http://intensedebate.com/" title="IntenseDebate comments enhance and encourage conversation on your blog or website" target="_blank"><img src="<?php echo WPSC_URL; ?>/images/intensedebate-logo.png" alt="intensedebate-logo" title="IntenseDebate"/></a>
  885. </th>
  886. <td>
  887. <?php
  888. $enable_comments = get_option('wpsc_enable_comments');
  889. $enable_comments1 = "";
  890. $enable_comments2 = "";
  891. switch($enable_comments) {
  892. case 1:
  893. $enable_comments1 = "checked ='checked'";
  894. $intense_debate_account_id_display_state = '';
  895. break;
  896. default:
  897. case 0:
  898. $enable_comments2 = "checked ='checked'";
  899. $intense_debate_account_id_display_state = 'style=\'display: none;\'';
  900. break;
  901. }
  902. ?>
  903. <input onclick='jQuery("#wpsc_enable_comments,.wpsc_comments_details").show()' type='radio' value='1' name='wpsc_options[wpsc_enable_comments]' id='wpsc_enable_comments1' <?php echo $enable_comments1; ?> /> <label for='wpsc_enable_comments1'><?php echo __('Yes', 'wpsc');?></label> &nbsp;
  904. <input onclick='jQuery("#wpsc_enable_comments,.wpsc_comments_details").hide()' type='radio' value='0' name='wpsc_options[wpsc_enable_comments]' id='wpsc_enable_comments2' <?php echo $enable_comments2; ?> /> <label for='wpsc_enable_comments1'><?php echo __('No', 'wpsc');?></label><br />
  905. <div id='wpsc_enable_comments' <?php echo $intense_debate_account_id_display_state; ?> >
  906. <?php echo __('IntenseDebate Account ID', 'wpsc'); ?>:<br/>
  907. <input type='text' size='30' name='wpsc_options[wpsc_intense_debate_account_id]' value='<?php echo get_option('wpsc_intense_debate_account_id'); ?>' /><br/>
  908. <small><a href='http://intensedebate.com/sitekey/' title='Help finding the Account ID'><?php _e('Help on finding the Account ID'); ?></a></small>
  909. </div>
  910. </td>
  911. </tr>
  912. <tr>
  913. <th scope="row">
  914. <div class='wpsc_comments_details' <?php echo $intense_debate_account_id_display_state ?> >
  915. <?php echo __('By Default Display Comments on', 'wpsc');?>:
  916. </div>
  917. </th>
  918. <td>
  919. <div class='wpsc_comments_details' <?php echo $intense_debate_account_id_display_state ?> >
  920. <input type='radio' value='1' name='wpsc_options[wpsc_comments_which_products]' id='wpsc_comments_which_products1' <?php if (get_option('wpsc_comments_which_products') == 1 || !get_option('wpsc_comments_which_products')) { echo "checked='checked'"; } ?> /><label for='wpsc_comments_which_products1'>All Products</label>&nbsp;
  921. <input type='radio' value='2' name='wpsc_options[wpsc_comments_which_products]' id='wpsc_comments_which_products2' <?php if (get_option('wpsc_comments_which_products') == 2) { echo "checked='checked'"; } ?> /><label for='wpsc_comments_which_products2'>Per Product</label>&nbsp;
  922. <br />
  923. </div>
  924. </td>
  925. </tr>
  926. </table>
  927. <?php
  928. /* here end the presentation options */
  929. ?>
  930. <div class="submit">
  931. <input type='hidden' name='wpsc_admin_action' value='submit_options' />
  932. <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?>
  933. <input type="submit" value="<?php echo __('Update &raquo;', 'wpsc');?>" name="updateoption" />
  934. </div>
  935. </div>
  936. </form>
  937. <?php
  938. }
  939. ?>