/** * options marketing is the main function for displaying the WP-Admin : Settings > Marketing page * @access public * * @since 3.8 * @param null * @return null */ function wpsc_options_marketing() { /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <div class='metabox-holder'> <?php add_meta_box('wpsc_marketing_settings', __('Marketing Section', 'wpsc'), 'wpsc_marketing_meta_box', 'wpsc'); add_meta_box('wpsc_rss_address', __('RSS Address', 'wpsc'), 'wpsc_rss_address_meta_box', 'wpsc'); add_meta_box('wpsc_google_merch_center', __('Google Merchant Centre / Google Product Search', 'wpsc'), 'wpsc_google_merch_center_meta_box', 'wpsc'); do_meta_boxes('wpsc', 'advanced', null); ?> </div> <?php }
function wpsc_options_general() { global $wpdb; ?> <form name='cart_options' id='cart_options' method='post' action=''> <div id="options_general"> <h2><?php echo TXT_WPSC_OPTIONS_GENERAL_HEADER; ?> </h2> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo TXT_WPSC_BASE_COUNTRY; ?> : </th> <td> <select name='wpsc_options[base_country]' onchange='submit_change_country();'> <?php echo country_list(get_option('base_country')); ?> </select> <span id='options_country'> <?php $region_list = $wpdb->get_results("SELECT `" . WPSC_TABLE_REGION_TAX . "`.* FROM `" . WPSC_TABLE_REGION_TAX . "`, `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `" . WPSC_TABLE_CURRENCY_LIST . "`.`isocode` IN('" . get_option('base_country') . "') AND `" . WPSC_TABLE_CURRENCY_LIST . "`.`id` = `" . WPSC_TABLE_REGION_TAX . "`.`country_id`", ARRAY_A); if ($region_list != null) { ?> <select name='wpsc_options[base_region]'> <?php foreach ($region_list as $region) { if (get_option('base_region') == $region['id']) { $selected = "selected='selected'"; } else { $selected = ""; } ?> <option value='<?php echo $region['id']; ?> ' <?php echo $selected; ?> ><?php echo $region['name']; ?> </option> <?php } ?> </select> <?php } ?> </span> <br /><?php echo TXT_WPSC_SELECTYOURBUSINESSLOCATION; ?> </td> </tr> <tr> <th scope="row"><?php echo TXT_WPSC_TAX_SETTINGS; ?> :</th> <td> <span id='options_region'> <?php $country_data = $wpdb->get_row("SELECT * FROM `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `isocode`='" . get_option('base_country') . "' LIMIT 1", ARRAY_A); echo $country_data['country']; $region_count = $wpdb->get_var("SELECT COUNT(*) AS `count` FROM `" . WPSC_TABLE_REGION_TAX . "`, `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `" . WPSC_TABLE_CURRENCY_LIST . "`.`isocode` IN('" . get_option('base_country') . "') AND `" . WPSC_TABLE_CURRENCY_LIST . "`.`id` = `" . WPSC_TABLE_REGION_TAX . "`.`country_id`"); if ($country_data['has_regions'] == 1) { ?> <a href='<?php echo add_query_arg(array('page' => 'wpsc-settings', 'isocode' => get_option('base_country'))); ?> '><?php echo $region_count; ?> Regions</a> <?php } else { ?> <input type='hidden' name='country_id' value='<?php echo $country_data['id']; ?> ' /> <input type='text' name='country_tax' class='tax_forms' maxlength='5' size='5' value='<?php echo $country_data['tax']; ?> ' />% <?php } ?> </span> </td> </tr> <?php /* START OF TARGET MARKET SELECTION */ $countrylist = $wpdb->get_results("SELECT id,country,visible FROM `" . WPSC_TABLE_CURRENCY_LIST . "` ORDER BY country ASC ", ARRAY_A); ?> <tr> <th scope="row"> <?php echo TXT_WPSC_TM; ?> : </th> <td> <?php // check for the suhosin module if (@extension_loaded('suhosin') && @ini_get('suhosin.post.max_vars') > 0 && @ini_get('suhosin.post.max_vars') < 500) { echo "<em>" . __("The Target Markets feature has been disabled because you have the Suhosin PHP extension installed on this server. If you need to use the Target Markets feature then disable the suhosin extension, if you can not do this, you will need to contact your hosting provider.\n\t\t\t", 'wpsc') . "</em>"; } else { ?> <span>Select: <a href='<?php echo add_query_arg(array('selected_all' => 'all')); ?> ' class='wpsc_select_all'>All</a> <a href='<?php echo add_query_arg(array('selected_all' => 'none')); ?> ' class='wpsc_select_none'>None</a></span><br /> <div id='resizeable' class='ui-widget-content multiple-select'> <?php foreach ((array) $countrylist as $country) { $country['country'] = htmlspecialchars($country['country']); if ($country['visible'] == 1) { ?> <input type='checkbox' name='countrylist2[]' value='<?php echo $country['id']; ?> ' checked='checked' /><?php echo $country['country']; ?> <br /> <?php } else { ?> <input type='checkbox' name='countrylist2[]' value='<?php echo $country['id']; ?> ' /><?php echo $country['country']; ?> <br /> <?php } } ?> </div><br /> Select the markets you are selling products to. <?php } ?> </td> </tr> <tr> <th scope="row"><?php echo TXT_WPSC_LANGUAGE; ?> :</th> <td> <select name='wpsc_options[language_setting]'> <?php if (get_option('language_setting') != '') { $language_setting = get_option('language_setting'); } else { $language_setting = "EN_en.php"; } $languages_directory = WPSC_FILE_PATH . '/languages'; $language_files = wpsc_list_dir($languages_directory); foreach ($language_files as $language_file) { switch ($language_file) { case "EN_en.php": $language = "English"; break; case "DE_de.php": $language = "Deutsch"; break; case "NL_nl.php": $language = "Dutch"; break; case "FR_fr.php": $language = "Français"; break; case "IT_it.php": $language = "Italian"; break; case "BG_bg.php": $language = 'български'; break; case "JP_jp.php": $language = "日本語"; break; case "pt_BR.php": $language = "Brazilian Portuguese"; break; case "RU_ru.php": $language = "Russian"; break; case "SP_sp.php": $language = "Spanish"; break; case "HU_hu.php": $language = "Hungarian"; break; case "SV_sv.php": $language = "Swedish"; break; case "TR_tr.php": $language = "Türkçe"; break; case "EL_el.php": $language = "Ελληνικά"; break; case "KO_ko.php": $language = "Korean"; break; case "zh_CN.php": $language = "简体中文"; break; case "DK_da.php": $language = "Danish"; break; case "RO_ro.php": $language = "Romanian"; break; case "nn_NO.php": $language = "Norwegian"; break; case "CZ_cz.php": $language = "Czech"; break; default: continue 2; break; } if ($language_setting == $language_file) { ?> <option selected='selected' value='<?php echo $language_file; ?> '><?php echo $language; ?> </option> <?php } else { ?> <option value='<?php echo $language_file; ?> '><?php echo $language; ?> </option> <?php } } ?> </select> </td> </tr> </table> <h3 class="form_group"><?php echo TXT_WPSC_CURRENCYSETTINGS; ?> :</h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo TXT_WPSC_CURRENCYTYPE; ?> :</th> <td> <select name='wpsc_options[currency_type]' onchange='getcurrency(this.options[this.selectedIndex].value);'> <?php $currency_data = $wpdb->get_results("SELECT * FROM `" . WPSC_TABLE_CURRENCY_LIST . "` ORDER BY `country` ASC", ARRAY_A); foreach ($currency_data as $currency) { if (get_option('currency_type') == $currency['id']) { $selected = "selected='selected'"; } else { $selected = ""; } ?> <option value='<?php echo $currency['id']; ?> ' <?php echo $selected; ?> ><?php echo htmlspecialchars($currency['country']); ?> (<?php echo $currency['currency']; ?> )</option> <?php } $currency_data = $wpdb->get_row("SELECT `symbol`,`symbol_html`,`code` FROM `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `id`='" . get_option('currency_type') . "' LIMIT 1", ARRAY_A); if ($currency_data['symbol'] != '') { $currency_sign = $currency_data['symbol_html']; } else { $currency_sign = $currency_data['code']; } ?> </select> </td> </tr> <tr> <th scope="row"><?php echo TXT_WPSC_CURRENCYSIGNLOCATION; ?> :</th> <td> <?php $currency_sign_location = get_option('currency_sign_location'); $csl1 = ""; $csl2 = ""; $csl3 = ""; $csl4 = ""; switch ($currency_sign_location) { case 1: $csl1 = "checked ='checked'"; break; case 2: $csl2 = "checked ='checked'"; break; case 3: $csl3 = "checked ='checked'"; break; case 4: $csl4 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[currency_sign_location]' id='csl1' <?php echo $csl1; ?> /> <label for='csl1'>100<span id='cslchar1'><?php echo $currency_sign; ?> </span></label> <input type='radio' value='2' name='wpsc_options[currency_sign_location]' id='csl2' <?php echo $csl2; ?> /> <label for='csl2'>100 <span id='cslchar2'><?php echo $currency_sign; ?> </span></label> <input type='radio' value='3' name='wpsc_options[currency_sign_location]' id='csl3' <?php echo $csl3; ?> /> <label for='csl3'><span id='cslchar3'><?php echo $currency_sign; ?> </span>100</label> <input type='radio' value='4' name='wpsc_options[currency_sign_location]' id='csl4' <?php echo $csl4; ?> /> <label for='csl4'><span id='cslchar4'><?php echo $currency_sign; ?> </span> 100</label> </td> </tr> </table> <div class="submit"> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type="submit" value="<?php echo TXT_WPSC_UPDATE_BUTTON; ?> " name="updateoption"/> </div> </div> </form> <?php }
function wpsc_options_gateway() { global $wpdb; $curgateway = get_option('payment_gateway'); $payment_gateway_names = get_option('payment_gateway_names'); if (is_array($GLOBALS['nzshpcrt_gateways'])) { $selected_gateways = get_option('custom_gateway_options'); foreach ($GLOBALS['nzshpcrt_gateways'] as $gateway) { if ($gateway['internalname'] == $curgateway) { $selected = "selected='selected'"; $form = $gateway['form'](); $selected_gateway_data = $gateway; //exit($form); } else { $selected = ''; } if (isset($gateway['admin_name'])) { $gateway['name'] = $gateway['admin_name']; } $disabled = ''; if (!in_array($gateway['internalname'], (array) $selected_gateways)) { $disabled = "disabled='disabled'"; } $gatewaylist .= "<option {$disabled} value='" . $gateway['internalname'] . "' " . $selected . " >" . $gateway['name'] . "</option>"; } } $gatewaylist = "<option value='" . $nogw . "'>" . __('Please Select A Payment Gateway', 'wpsc') . "</option>" . $gatewaylist; ?> <script language='javascript' type='text/javascript'> function selectgateway() { document.forms.gateway_opt.submit(); } </script> <div class="wrap"> <div class='metabox-holder'> <form name='gatewayopt' method='post' id='gateway_opt' action='' > <input type='hidden' name='gateway_submits' value='true' /> <input type='hidden' name='wpsc_gateway_settings' value='gateway_settings' /> <?php if (get_option('custom_gateway') == 1) { $custom_gateway_hide = "style='display:block;'"; $custom_gateway1 = 'checked="checked"'; } else { $custom_gateway_hide = "style='display:none;'"; $custom_gateway2 = 'checked="checked"'; } ?> <h2><?php echo __('Gateway Options', 'wpsc'); ?> </h2> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <table id='gateway_options' > <tr> <td class='select_gateway'> <?php if (IS_WP27) { ?> <div class='postbox'> <h3 class='hndle'><?php _e('General Settings', 'wpsc'); ?> </h3> <div class='inside'> <?php } else { ?> <div class="categorisation_title"> <strong class="form_group"><?php echo __('Payment Gateways', 'wpsc'); ?> </strong> </div> <?php } ?> <p><?php echo __('Activate the payment gateways that you want to make available to your customers by selecting them below.', 'wpsc'); ?> </p> <br /> <?php $selected_gateways = get_option('custom_gateway_options'); //echo("<pre>".print_r($selected_gateways,true)."</pre>"); foreach ($GLOBALS['nzshpcrt_gateways'] as $gateway) { if (isset($gateway['admin_name'])) { $gateway['name'] = $gateway['admin_name']; } if (in_array($gateway['internalname'], (array) $selected_gateways)) { ?> <p><input name='wpsc_options[custom_gateway_options][]' checked='checked' type='checkbox' value='<?php echo $gateway['internalname']; ?> ' id='<?php echo $gateway['internalname']; ?> _id' /><label for='<?php echo $gateway['internalname']; ?> _id'><?php echo $gateway['name']; ?> </label></p> <?php } else { ?> <p><input name='wpsc_options[custom_gateway_options][]' type='checkbox' value='<?php echo $gateway['internalname']; ?> ' id='<?php echo $gateway['internalname']; ?> _id' /> <label for='<?php echo $gateway['internalname']; ?> _id'><?php echo $gateway['name']; ?> </label></p> <?php } } ?> <div class='submit gateway_settings'> <input type='hidden' value='true' name='update_gateways' /> <input type='submit' value='<?php echo __('Update »', 'wpsc'); ?> ' name='updateoption' /> </div> <?php if (IS_WP27) { ?> </div> </div> <?php } ?> <h4><?php echo __('We Recommend', 'wpsc'); ?> </h4> <a style="border-bottom:none;" href="https://www.paypal.com/nz/mrb/pal=LENKCHY6CU2VY" target="_blank"><img src="<?php echo WPSC_URL; ?> /images/paypal-referal.gif" border="0" alt="Sign up for PayPal and start accepting credit card payments instantly." /></a> <br /><br /> <a style="border-bottom:none;" href="http://checkout.google.com/sell/?promo=seinstinct" target="_blank"><img src="https://checkout.google.com/buyer/images/google_checkout.gif" border="0" alt="Sign up for Google Checkout" /></a> </td> <td class='gateway_settings' rowspan='2'> <?php if (IS_WP27) { ?> <div class='postbox'> <h3 class='hndle'><?php echo __(' Select a Payment Gateway below to configure it.', 'wpsc'); ?> </h3> <div class='inside'> <table class='form-table'> <?php } else { ?> <table class='form-table'> <tr class="firstrowth"> <td colspan='2' style='border-bottom: none;'> <strong class="form_group"><?php echo __(' Select a Payment Gateway below to configure it.', 'wpsc'); ?> </strong> </td> </tr> <?php } ?> <tr> <td class='wpsc_gateway_table'> <h4><?php echo __('Payment Gateway', 'wpsc'); ?> </h4> </td> <td style='border-top: none;'> <select name='payment_gw' onchange='selectgateway();'> <?php echo $gatewaylist; ?> </select> </td> </tr> <tr> <td style='border-top: none;'> <?php _e("Display Name"); ?> </td> <td style='border-top: none;'> <?php if ($payment_gateway_names[$selected_gateway_data['internalname']] != '') { $display_name = $payment_gateway_names[$selected_gateway_data['internalname']]; } else { switch ($selected_gateway_data['payment_type']) { case "paypal": $display_name = "PayPal"; break; case "manual_payment": $display_name = "Manual Payment"; break; case "google_checkout": $display_name = "Google Checkout"; break; case "credit_card": default: $display_name = "Credit Card"; break; } } ?> <input type='text' name='user_defined_name[<?php echo $selected_gateway_data['internalname']; ?> ]' value='<?php echo $display_name; ?> ' /><br /> <span class='small description'><?php __('The text that people see when making a purchase'); ?> </span> </td> </tr> <?php echo $form; ?> <tr class='update_gateway' > <td colspan='2'> <div class='submit'> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type='submit' value='<?php echo __('Update »', 'wpsc'); ?> ' name='updateoption' /> </div> </td> </tr> </table> <?php if (IS_WP27) { ?> </div> </div> <?php } ?> </td> </tr> </table> </form> </div> </div> <?php }
function wpsc_options_checkout() { global $wpdb; $form_types = get_option('wpsc_checkout_form_fields'); $unique_names = get_option('wpsc_checkout_unique_names'); do_action('wpsc_checkout_form_fields_page'); $columns = array('drag' => __('Drag', 'wpsc'), 'name' => __('Name', 'wpsc'), 'type' => __('Type', 'wpsc'), 'unique_names' => __('Unique Names', 'wpsc'), 'mandatory' => __('Mandatory', 'wpsc'), 'trash' => __('Trash', 'wpsc')); register_column_headers('display-checkout-list', $columns); ?> <form name='cart_options' id='cart_options' method='post' action='' class='wpsc_form_track'> <div class="wrap"> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <form method='post' action='' id='chekcout_options_tbl' class='wpsc_form_track'> <div class='metabox-holder' style='width:95%;'> <div class='postbox'> <input type='hidden' name='checkout_submits' value='true' /> <h3 class='hndle'><?php _e('Misc Checkout Options', 'wpsc'); ?> </h3> <div class='inside'> <table> <tr> <td><?php _e('Users must register before checking out', 'wpsc'); ?> :</td> <td> <?php $require_register = esc_attr(get_option('require_register')); $require_register1 = ""; $require_register2 = ""; switch ($require_register) { case 0: $require_register2 = "checked ='checked'"; break; case 1: $require_register1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[require_register]' id='require_register1' <?php echo $require_register1; ?> /> <label for='require_register1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[require_register]' id='require_register2' <?php echo $require_register2; ?> /> <label for='require_register2'><?php _e('No', 'wpsc'); ?> </label> </td> <td> <a title='<?php _e('If yes then you must also turn on the wordpress option "Any one can register"', 'wpsc'); ?> ' class='flag_email' href='#' ><img src='<?php echo WPSC_CORE_IMAGES_URL; ?> /help.png' alt='' /> </a> </td> </tr> <tr> <?php $shippingBilling = get_option('shippingsameasbilling'); $shippingBilling1 = $shippingBilling2 = ''; switch ($shippingBilling) { case 1: $shippingBilling1 = "checked ='checked'"; break; case 0: $shippingBilling2 = "checked ='checked'"; break; } ?> <td scope="row"><?php _e('Enable Shipping Same as Billing Option: ', 'wpsc'); ?> :</td> <td> <input type='radio' value='1' name='wpsc_options[shippingsameasbilling]' id='shippingsameasbilling1' <?php if (!empty($shippingBilling1)) { echo $shippingBilling1; } ?> /> <label for='shippingsameasbilling1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[shippingsameasbilling]' id='shippingsameasbilling2' <?php if (!empty($shippingBilling2)) { echo $shippingBilling2; } ?> /> <label for='shippingsameasbilling2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <td><?php _e('Force users to use SSL', 'wpsc'); ?> :</td> <td> <?php $wpsc_force_ssl = esc_attr(get_option('wpsc_force_ssl')); $wpsc_force_ssl1 = ""; $wpsc_force_ssl2 = ""; switch ($wpsc_force_ssl) { case 0: $wpsc_force_ssl2 = "checked ='checked'"; break; case 1: $wpsc_force_ssl1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[wpsc_force_ssl]' id='wpsc_force_ssl1' <?php echo $wpsc_force_ssl1; ?> /> <label for='wpsc_force_ssl1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[wpsc_force_ssl]' id='wpsc_force_ssl2' <?php echo $wpsc_force_ssl2; ?> /> <label for='wpsc_force_ssl2'><?php _e('No', 'wpsc'); ?> </label> </td> <td> <a title='<?php _e('This can cause warnings for your users if you do not have a properly configured SSL certificate', 'wpsc'); ?> ' class='flag_email' href='#' ><img src='<?php echo WPSC_CORE_IMAGES_URL; ?> /help.png' alt='' /> </a> </td> </tr> <?php do_action('wpsc_checkout_settings_page'); ?> </table> </div> </div> </div> <h3><?php _e('Form Fields', 'wpsc'); ?> </h3> <p><?php _e('Here you can customise the forms to be displayed in your checkout page. The checkout page is where you collect important user information that will show up in your purchase logs i.e. the buyers address, and name...', 'wpsc'); ?> </p> <p> <label for='wpsc_form_set'><?php _e('Select a Form Set', 'wpsc'); ?> :</label> <select id='wpsc_form_set' name='wpsc_form_set'> <?php $checkout_sets = get_option('wpsc_checkout_form_sets'); foreach ((array) $checkout_sets as $key => $value) { $selected_state = ""; if (isset($_GET['checkout-set']) && $_GET['checkout-set'] == $key) { $selected_state = "selected='selected'"; } echo "<option {$selected_state} value='{$key}'>" . esc_attr(stripslashes($value)) . "</option>"; } ?> </select> <input type='submit' value='Filter' name='wpsc_checkout_set_filter' class='button-secondary' /> <a href='#' class='add_new_form_set'><?php _e("+ Add New Form Set", 'wpsc'); ?> </a> </p> <p class='add_new_form_set_forms'> <label><?php _e("Add new Form Set", 'wpsc'); ?> : <input type="text" value="" name="new_form_set" /></label> <input type="submit" value="<?php _e('Add', 'wpsc'); ?> " class="button-secondary" id="formset-add-sumbit"/> </p> <?php if (!isset($_GET['checkout-set']) || $_GET['checkout-set'] == 0) { $form_sql = "SELECT * FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `active` = '1' AND `checkout_set` IN ('0', '') ORDER BY `checkout_order`;"; } else { $filter = $wpdb->escape($_GET['checkout-set']); $form_sql = "SELECT * FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `active` = '1' AND `checkout_set` IN ('" . $filter . "') ORDER BY `checkout_order`;"; } $email_form_field = $wpdb->get_row("SELECT `id` FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `type` IN ('email') AND `active` = '1' ORDER BY `checkout_order` ASC LIMIT 1", ARRAY_A); $form_data = $wpdb->get_results($form_sql, ARRAY_A); if (!isset($_GET['checkout-set'])) { $_GET['checkout-set'] = ''; } $selected_checkout_set = esc_attr($_GET['checkout-set']); echo "<input type='hidden' name='selected_form_set' value='" . $selected_checkout_set . "' />"; ?> <table id="wpsc_checkout_list" class="widefat page fixed" cellspacing="0"> <thead> <tr> <?php print_column_headers('display-checkout-list'); ?> </tr> </thead> <tfoot> <tr> <?php print_column_headers('display-checkout-list', false); ?> </tr> </tfoot> <tbody id='wpsc_checkout_list_body'> <?php foreach ((array) $form_data as $form_field) { echo "<tr id='checkout_" . $form_field['id'] . "' class='checkout_form_field'>\n\r"; echo '<td class="drag"><a href="" onclick="return false;" title="' . __('Click and Drag to Order Checkout Fields', 'wpsc') . '"><img src="' . WPSC_CORE_IMAGES_URL . '/roll-over-drag.jpg" alt="roll-over-drag" /></a></td>'; echo "<td class='namecol'><input type='text' name='form_name[" . $form_field['id'] . "]' value='" . esc_attr(htmlentities(stripslashes($form_field['name']), ENT_QUOTES, "UTF-8")) . "' /></td>"; echo " <td class='typecol'>"; echo "<select class='wpsc_checkout_selectboxes' name='form_type[" . $form_field['id'] . "]'>"; foreach ($form_types as $form_type_name => $form_type) { $selected = ''; if ($form_type === $form_field['type']) { $selected = "selected='selected'"; } echo "<option value='" . $form_type . "' " . $selected . ">" . $form_type_name . "</option>"; } echo "</select>"; if (in_array($form_field['type'], array('select', 'radio', 'checkbox'))) { echo "<a class='wpsc_edit_checkout_options' rel='form_options[" . $form_field['id'] . "]' href=''>" . __('more options', 'wpsc') . "</a>"; } echo "</td>"; $checked = ""; echo "<td><select name='unique_names[" . $form_field['id'] . "]'>"; echo "<option value='-1'>" . __('Select a Unique Name', 'wpsc') . "</option>"; foreach ($unique_names as $unique_name) { $selected = ""; if ($unique_name == $form_field['unique_name']) { $selected = "selected='selected'"; } echo "<option " . $selected . " value='" . $unique_name . "'>" . $unique_name . "</option>"; } echo "</select></td>"; if ($form_field['mandatory']) { $checked = "checked='checked'"; } echo " <td class='mandatorycol'><input {$checked} type='checkbox' name='form_mandatory[" . $form_field['id'] . "]' value='1' /></td>"; echo " <td><a class='image_link' href='#' onclick='return remove_form_field(\"checkout_" . $form_field['id'] . "\"," . $form_field['id'] . ");'><img src='" . WPSC_CORE_IMAGES_URL . "/trash.gif' alt='" . __('Delete', 'wpsc') . "' title='" . __('Delete', 'wpsc') . "' /></a>"; if ($email_form_field['id'] == $form_field['id']) { echo "<a title='" . __('This will be the Email address that the Purchase Reciept is sent to.', 'wpsc') . "' class='flag_email' href='#' ><img src='" . WPSC_CORE_IMAGES_URL . "/help.png' alt='' /> </a>"; } echo "</td>"; echo "\n\t\t\t </tr>"; } ?> </tbody> </table> <?php ?> <p> <input type='hidden' name='wpsc_admin_action' value='checkout_settings' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input class='button-primary' type='submit' name='submit' value='<?php _e('Save Changes', 'wpsc'); ?> ' /> <a href='#' onclick='return add_form_field();'><?php _e('Add New Form Field', 'wpsc'); ?> </a> </p> </form> </div> </form> <?php }
function wpsc_options_general() { global $wpdb; ?> <form name='cart_options' id='cart_options' method='post' action=''> <div id="options_general"> <h2><?php _e('General Settings', 'wpsc'); ?> </h2> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo __('Base Country/Region', 'wpsc'); ?> : </th> <td> <select name='wpsc_options[base_country]' onchange='submit_change_country();'> <?php echo country_list(get_option('base_country')); ?> </select> <span id='options_country'> <?php $region_list = $wpdb->get_results("SELECT `" . WPSC_TABLE_REGION_TAX . "`.* FROM `" . WPSC_TABLE_REGION_TAX . "`, `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `" . WPSC_TABLE_CURRENCY_LIST . "`.`isocode` IN('" . get_option('base_country') . "') AND `" . WPSC_TABLE_CURRENCY_LIST . "`.`id` = `" . WPSC_TABLE_REGION_TAX . "`.`country_id`", ARRAY_A); if ($region_list != null) { ?> <select name='wpsc_options[base_region]'> <?php foreach ($region_list as $region) { if (get_option('base_region') == $region['id']) { $selected = "selected='selected'"; } else { $selected = ""; } ?> <option value='<?php echo $region['id']; ?> ' <?php echo $selected; ?> ><?php echo $region['name']; ?> </option> <?php } ?> </select> <?php } ?> </span> <br /><?php echo __('Select your primary business location.', 'wpsc'); ?> </td> </tr> <tr> <th scope="row"><?php echo __('Tax Settings', 'wpsc'); ?> :</th> <td> <span id='options_region'> <?php $country_data = $wpdb->get_row("SELECT * FROM `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `isocode`='" . get_option('base_country') . "' LIMIT 1", ARRAY_A); echo $country_data['country']; $region_count = $wpdb->get_var("SELECT COUNT(*) AS `count` FROM `" . WPSC_TABLE_REGION_TAX . "`, `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `" . WPSC_TABLE_CURRENCY_LIST . "`.`isocode` IN('" . get_option('base_country') . "') AND `" . WPSC_TABLE_CURRENCY_LIST . "`.`id` = `" . WPSC_TABLE_REGION_TAX . "`.`country_id`"); if ($country_data['has_regions'] == 1) { ?> <a href='<?php echo add_query_arg(array('page' => 'wpsc-settings', 'isocode' => get_option('base_country'))); ?> '><?php echo $region_count; ?> Regions</a> <?php } else { ?> <input type='hidden' name='country_id' value='<?php echo $country_data['id']; ?> ' /> <input type='text' name='country_tax' class='tax_forms' maxlength='5' size='5' value='<?php echo $country_data['tax']; ?> ' />% <?php } ?> </span> </td> </tr> <tr> <th scope="row"><?php _e('Tax Included in prices', 'wpsc'); ?> :</th> <td> <?php $tax_inprice0 = ''; $tax_inprice1 = ''; if (wpsc_tax_isincluded()) { $tax_inprice1 = 'checked="checked"'; } else { $tax_inprice0 = 'checked="checked"'; } ?> <input <?php echo $tax_inprice1; ?> type='radio' name='wpsc_options[tax_inprice]' value='1' id='tax_inprice1' /> <label for='tax_inprice1'><?php echo __('Yes', 'wpsc'); ?> </label> <input <?php echo $tax_inprice0; ?> type='radio' name='wpsc_options[tax_inprice]' value='0' id='tax_inprice0' /> <label for='tax_inprice1'><?php echo __('No', 'wpsc'); ?> </label> </td> </tr> <?php /* START OF TARGET MARKET SELECTION */ $countrylist = $wpdb->get_results("SELECT id,country,visible FROM `" . WPSC_TABLE_CURRENCY_LIST . "` ORDER BY country ASC ", ARRAY_A); ?> <tr> <th scope="row"> <?php echo __('Target Markets', 'wpsc'); ?> : </th> <td> <?php // check for the suhosin module if (@extension_loaded('suhosin') && @ini_get('suhosin.post.max_vars') > 0 && @ini_get('suhosin.post.max_vars') < 500) { echo "<em>" . __("The Target Markets feature has been disabled because you have the Suhosin PHP extension installed on this server. If you need to use the Target Markets feature then disable the suhosin extension, if you can not do this, you will need to contact your hosting provider.\r\n\t\t\t", 'wpsc') . "</em>"; } else { ?> <span>Select: <a href='<?php echo add_query_arg(array('selected_all' => 'all')); ?> ' class='wpsc_select_all'>All</a> <a href='<?php echo add_query_arg(array('selected_all' => 'none')); ?> ' class='wpsc_select_none'>None</a></span><br /> <div id='resizeable' class='ui-widget-content multiple-select'> <?php foreach ((array) $countrylist as $country) { $country['country'] = htmlspecialchars($country['country']); if ($country['visible'] == 1) { ?> <input type='checkbox' name='countrylist2[]' value='<?php echo $country['id']; ?> ' checked='checked' /><?php echo $country['country']; ?> <br /> <?php } else { ?> <input type='checkbox' name='countrylist2[]' value='<?php echo $country['id']; ?> ' /><?php echo $country['country']; ?> <br /> <?php } } ?> </div><br /> Select the markets you are selling products to. <?php } ?> </td> </tr> </table> <h3 class="form_group"><?php echo __('Currency Settings', 'wpsc'); ?> :</h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo __('Currency type', 'wpsc'); ?> :</th> <td> <select name='wpsc_options[currency_type]' onchange='getcurrency(this.options[this.selectedIndex].value);'> <?php $currency_data = $wpdb->get_results("SELECT * FROM `" . WPSC_TABLE_CURRENCY_LIST . "` ORDER BY `country` ASC", ARRAY_A); foreach ($currency_data as $currency) { if (get_option('currency_type') == $currency['id']) { $selected = "selected='selected'"; } else { $selected = ""; } ?> <option value='<?php echo $currency['id']; ?> ' <?php echo $selected; ?> ><?php echo htmlspecialchars($currency['country']); ?> (<?php echo $currency['currency']; ?> )</option> <?php } $currency_data = $wpdb->get_row("SELECT `symbol`,`symbol_html`,`code` FROM `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `id`='" . get_option('currency_type') . "' LIMIT 1", ARRAY_A); if ($currency_data['symbol'] != '') { $currency_sign = $currency_data['symbol_html']; } else { $currency_sign = $currency_data['code']; } ?> </select> </td> </tr> <tr> <th scope="row"><?php echo __('Currency sign location', 'wpsc'); ?> :</th> <td> <?php $currency_sign_location = get_option('currency_sign_location'); $csl1 = ""; $csl2 = ""; $csl3 = ""; $csl4 = ""; switch ($currency_sign_location) { case 1: $csl1 = "checked ='checked'"; break; case 2: $csl2 = "checked ='checked'"; break; case 3: $csl3 = "checked ='checked'"; break; case 4: $csl4 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[currency_sign_location]' id='csl1' <?php echo $csl1; ?> /> <label for='csl1'>100<span id='cslchar1'><?php echo $currency_sign; ?> </span></label> <input type='radio' value='2' name='wpsc_options[currency_sign_location]' id='csl2' <?php echo $csl2; ?> /> <label for='csl2'>100 <span id='cslchar2'><?php echo $currency_sign; ?> </span></label> <input type='radio' value='3' name='wpsc_options[currency_sign_location]' id='csl3' <?php echo $csl3; ?> /> <label for='csl3'><span id='cslchar3'><?php echo $currency_sign; ?> </span>100</label> <input type='radio' value='4' name='wpsc_options[currency_sign_location]' id='csl4' <?php echo $csl4; ?> /> <label for='csl4'><span id='cslchar4'><?php echo $currency_sign; ?> </span> 100</label> </td> </tr> <tr> <?php $decimals = get_option('wpsc_hide_decimals'); switch ($decimals) { case '1': $decimal1 = 'checked="checked"'; break; case '0': default: $decimal2 = 'checked="checked"'; break; } ?> <th scope="row"><?php _e('Hide Decimals on Products Pages'); ?> </th> <td> <input type='radio' value='1' name='wpsc_options[wpsc_hide_decimals]' id='hide_decimals1' <?php echo $decimal1; ?> /> <label for='hide_decimals1'><?php _e('Yes'); ?> </label> <input type='radio' value='0' name='wpsc_options[wpsc_hide_decimals]' id='hide_decimals2' <?php echo $decimal2; ?> /> <label for='hide_decimals2'><?php _e('No'); ?> </label> </td> </tr> </table> <div class="submit"> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type="submit" value="<?php echo __('Update »', 'wpsc'); ?> " name="updateoption"/> </div> </div> </form> <?php }
public function display() { global $wpdb, $wpsc_shipping_modules, $external_shipping_modules, $internal_shipping_modules; // sort into external and internal arrays. foreach ($GLOBALS['wpsc_shipping_modules'] as $key => $module) { if (empty($module)) { continue; } if (isset($module->is_external) && $module->is_external == true) { $external_shipping_modules[$key] = $module; } else { $internal_shipping_modules[$key] = $module; } } $currency_data = $wpdb->get_row($wpdb->prepare("SELECT `symbol`,`symbol_html`,`code` FROM `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `id` = %d LIMIT 1", get_option('currency_type')), ARRAY_A); if ($currency_data['symbol'] != '') { $currency_sign = $currency_data['symbol_html']; } else { $currency_sign = $currency_data['code']; } //get shipping options that are selected $selected_shippings = get_option('custom_shipping_options'); ?> <div class="metabox-holder"> <input type='hidden' name='shipping_submits' value='true' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php if (get_option('custom_gateway') == 1) { $custom_gateway_hide = "style='display:block;'"; $custom_gateway1 = 'checked="checked"'; } else { $custom_gateway_hide = "style='display:none;'"; $custom_gateway2 = 'checked="checked"'; } /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <div class='postbox'> <h3 class='hndle'><?php _e('General Settings', 'wpsc'); ?> </h3> <div class='inside'> <table class='wpsc_options form-table'> <tr> <th scope="row"> <?php _e('Use Shipping', 'wpsc'); ?> : </th> <td> <?php $do_not_use_shipping = get_option('do_not_use_shipping'); $do_not_use_shipping1 = ""; $do_not_use_shipping2 = ""; if ($do_not_use_shipping) { $do_not_use_shipping1 = "checked ='checked'"; } else { $do_not_use_shipping2 = "checked ='checked'"; } ?> <input type='radio' value='0' name='wpsc_options[do_not_use_shipping]' id='do_not_use_shipping2' <?php echo $do_not_use_shipping2; ?> /> <label for='do_not_use_shipping2'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='1' name='wpsc_options[do_not_use_shipping]' id='do_not_use_shipping1' <?php echo $do_not_use_shipping1; ?> /> <label for='do_not_use_shipping1'><?php _e('No', 'wpsc'); ?> </label><br /> <?php _e('If you are only selling digital downloads, you should select no to disable the shipping on your site.', 'wpsc'); ?> </td> </tr> <tr> <th><?php _e('Base City:', 'wpsc'); ?> </th> <td> <input type='text' name='wpsc_options[base_city]' value='<?php esc_attr_e(get_option('base_city')); ?> ' /> <br /><?php _e('Please provide for more accurate rates', 'wpsc'); ?> </td> </tr> <tr> <th><?php _e('Base Zipcode/Postcode:', 'wpsc'); ?> </th> <td> <input type='text' name='wpsc_options[base_zipcode]' value='<?php esc_attr_e(get_option('base_zipcode')); ?> ' /> <br /><?php _e('If you are based in America then you need to set your own Zipcode for UPS and USPS to work. This should be the Zipcode for your Base of Operations.', 'wpsc'); ?> </td> </tr> <?php $shipwire1 = ""; $shipwire2 = ""; switch (get_option('shipwire')) { case 1: $shipwire_settings = 'style=\'display: block;\''; break; case 0: default: $shipwire_settings = ''; break; } ?> <tr> <th scope="row"> <?php _e('ShipWire Settings', 'wpsc'); ?> <span style='color: red;'></span> : </th> <td> <input type='radio' onclick='jQuery("#wpsc_shipwire_setting").show()' value='1' name='wpsc_options[shipwire]' id='shipwire1' <?php checked('1', get_option('shipwire')); ?> /> <label for='shipwire1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' onclick='jQuery("#wpsc_shipwire_setting").hide()' value='0' name='wpsc_options[shipwire]' id='shipwire2' <?php checked('0', get_option('shipwire')); ?> /> <label for='shipwire2'><?php _e('No', 'wpsc'); ?> </label> <div id='wpsc_shipwire_setting' <?php echo $shipwire_settings; ?> > <table> <tr><td><?php _e('ShipWire Email', 'wpsc'); ?> :</td><td> <input type="text" name='wpsc_options[shipwireemail]' value="<?php esc_attr_e(get_option('shipwireemail')); ?> " /></td></tr> <tr><td><?php _e('ShipWire Password', 'wpsc'); ?> :</td><td><input type="text" name='wpsc_options[shipwirepassword]' value="<?php esc_attr_e(get_option('shipwirepassword')); ?> " /></td></tr> <tr><td><a class="shipwire_sync">Sync product</a></td></tr> </table> </div> </td> </tr> <tr> <th scope="row"> <?php _e('Enable Free Shipping Discount', 'wpsc'); ?> </th> <td> <?php if (get_option('shipping_discount') == 1) { $selected2 = ''; $selected1 = 'checked="checked"'; $shipping_discount_settings = 'style=\'display: block;\''; } else { $selected2 = 'checked="checked"'; $selected1 = ''; $shipping_discount_settings = ''; } ?> <input type='radio' onclick='jQuery("#shipping_discount_value").show()' value='1' name='wpsc_options[shipping_discount]' id='shipping_discount1' <?php echo $selected1; ?> /> <label for='shipping_discount1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' onclick='jQuery("#shipping_discount_value").hide()' value='0' name='wpsc_options[shipping_discount]' id='shipping_discount2' <?php echo $selected2; ?> /> <label for='shipping_discount2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <td> </td> <td colspan="2"> <?php $value = esc_attr(get_option('shipping_discount_value')); ?> <div <?php echo $shipping_discount_settings; ?> id='shipping_discount_value'> <?php printf(__('Sales over or equal to: %1$s<input type="text" size="6" name="wpsc_options[shipping_discount_value]" value="%2$s" id="shipping_discount_value" /> will receive free shipping.', 'wpsc'), $currency_sign, $value); ?> </div> </td> </tr> </table> </div> </div> <table id='wpsc-shipping-module-options' class='wpsc-edit-module-options'> <tr> <td class='select_gateway'> <a name="gateway_options"></a> <div class='postbox'> <h3 class='hndle'><?php _e('Shipping Modules', 'wpsc'); ?> </h3> <div class='inside'> <p> <?php _e('To enable shipping in WP e-Commerce you must select which shipping methods you want to enable on your site.<br /> If you want to use fixed-price shipping options like "Pickup - $0, Overnight - $10, Same day - $20, etc." you can download a WordPress plugin from plugins directory for <a href="http://wordpress.org/extend/plugins/wp-e-commerce-fixed-rate-shipping/">Simple shipping</a>. It will appear in the list as "Fixed rate".', 'wpsc'); ?> </p> <br /> <p> <strong><?php _e('Internal Shipping Calculators', 'wpsc'); ?> </strong> </p> <?php foreach ($internal_shipping_modules as $shipping) { $shipping->checked = ''; if (is_object($shipping) && in_array($shipping->getInternalName(), (array) $selected_shippings)) { $shipping->checked = ' checked = "checked" '; } ?> <div class='wpsc_shipping_options'> <div class='wpsc-shipping-actions'> <span class="edit"> <a class='edit-shipping-module' data-module-id="<?php echo $shipping->internal_name; ?> " title="Edit this Shipping Module" href='<?php echo esc_attr($this->get_shipping_module_url($shipping)); ?> ' style="cursor:pointer;"><?php _e('Edit', 'wpsc'); ?> </a> <img src="<?php echo esc_url(admin_url('images/wpspin_light.gif')); ?> " class="ajax-feedback" title="" alt="" /> </span> </div> <p><input name='custom_shipping_options[]' <?php echo $shipping->checked; ?> type='checkbox' value='<?php echo $shipping->internal_name; ?> ' id='<?php echo $shipping->internal_name; ?> _id' /><label for='<?php echo $shipping->internal_name; ?> _id'> <?php echo $shipping->name; ?> </label></p> </div> <?php } ?> <br /> <p> <strong><?php _e('External Shipping Calculators', 'wpsc'); ?> </strong> <?php if (!function_exists('curl_init')) { ?> <br /><span style='color: red; font-size:8pt; line-height:10pt;'><?php _e('The following shipping modules all need cURL which is not installed on this server, you may need to contact your web hosting provider to get it set up. ', 'wpsc'); ?> </span> <?php } ?> </p> <?php // print the internal shipping methods foreach ($external_shipping_modules as $shipping) { $disabled = ''; if (isset($shipping->requires_curl) && $shipping->requires_curl == true && !function_exists('curl_init')) { $disabled = "disabled='disabled'"; } $shipping->checked = ''; if (in_array($shipping->getInternalName(), (array) $selected_shippings)) { $shipping->checked = " checked='checked' "; } ?> <div class='wpsc_shipping_options'> <div class="wpsc-shipping-actions"> <span class="edit"> <a class='edit-shipping-module' data-module-id="<?php echo $shipping->internal_name; ?> " title="Edit this Shipping Module" href='<?php echo esc_attr($this->get_shipping_module_url($shipping)); ?> ' style="cursor:pointer;"><?php _e('Edit', 'wpsc'); ?> </a> <img src="<?php echo esc_url(admin_url('images/wpspin_light.gif')); ?> " class="ajax-feedback" title="" alt="" /> </span> </div> <p><input <?php echo $disabled; ?> name='custom_shipping_options[]' <?php echo $shipping->checked; ?> type='checkbox' value='<?php echo $shipping->internal_name; ?> ' id='<?php echo $shipping->internal_name; ?> _id' /><label for='<?php echo $shipping->internal_name; ?> _id'> <?php esc_attr_e($shipping->name); ?> </label></p> </div> <?php } ?> <p class="submit"> <input type='hidden' value='true' name='update_gateways' /> <input type="submit" value="<?php _e('Update »', 'wpsc'); ?> " /> </p> </div> </div> </td> <?php $this->display_shipping_module_settings_form(); ?> </tr> </table> </div> <?php }
function wpsc_options_checkout() { global $wpdb; $form_types = array("Text" => "text", "Email Address" => "email", "Street Address" => "address", "City" => "city", "Country" => "country", "Delivery Address" => "delivery_address", "Delivery City" => "delivery_city", "Delivery Country" => "delivery_country", "Text Area" => "textarea", "Heading" => "heading", "Select" => "select", "Radio Button" => "radio", "Checkbox" => "checkbox"); $unique_names = get_option('wpsc_unique_names'); if (empty($unique_names)) { $unique_names = array('billingfirstname', 'billinglastname', 'billingaddress', 'billingcity', 'billingcountry', 'billingemail', 'billingphone', 'billingpostcode', 'delivertoafriend', 'shippingfirstname', 'shippinglastname', 'shippingaddress', 'shippingcity', 'shippingstate', 'shippingcountry', 'shippingpostcode'); update_option('wpsc_unique_names', $unique_names); } $unique_names = apply_filters('wpsc_unique_names', $unique_names); update_option('wpsc_checkout_form_fields', $form_types); if (get_option('wpsc_checkout_form_fields') == '') { update_option('wpsc_checkout_form_fields', $form_types); } do_action('wpsc_checkout_form_fields_page'); $columns = array('drag' => 'Drag', 'name' => 'Name', 'type' => 'Type', 'unique_names' => 'Unique Names', 'mandatory' => 'Mandatory', 'trash' => 'Trash'); register_column_headers('display-checkout-list', $columns); $form_types = get_option('wpsc_checkout_form_fields'); ?> <form name='cart_options' id='cart_options' method='post' action=''> <div class="wrap"> <h2><?php echo __('Checkout Options', 'wpsc'); ?> </h2> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <form method='post' action='' id='chekcout_options_tbl'> <div class='metabox-holder' style='width:95%;'> <div class='postbox'> <input type='hidden' name='checkout_submits' value='true' /> <h3 class='hndle'>Misc Checkout Options</h3> <div class='inside'> <table> <tr> <td><?php echo __('Users must register before checking out', 'wpsc'); ?> :</td> <td> <?php $require_register = get_option('require_register'); $require_register1 = ""; $require_register2 = ""; switch ($require_register) { case 0: $require_register2 = "checked ='checked'"; break; case 1: $require_register1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[require_register]' id='require_register1' <?php echo $require_register1; ?> /> <label for='require_register1'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[require_register]' id='require_register2' <?php echo $require_register2; ?> /> <label for='require_register2'><?php echo __('No', 'wpsc'); ?> </label> </td> <td> <a title='<?php echo __('If yes then you must also turn on the wordpress option "Any one can register"', 'wpsc'); ?> ' class='flag_email' href='#' ><img src='<?php echo WPSC_URL; ?> /images/help.png' alt='' /> </a> </td> </tr> <tr> <?php $lock_tax = get_option('lock_tax'); switch ($lock_tax) { case 1: $lock_tax1 = "checked ='checked'"; break; case 0: $lock_tax2 = "checked ='checked'"; break; } ?> <td scope="row"><?php echo __('Lock Tax to Billing Country', 'wpsc'); ?> :</td> <td> <input type='radio' value='1' name='wpsc_options[lock_tax]' id='lock_tax1' <?php echo $lock_tax1; ?> /> <label for='lock_tax1'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[lock_tax]' id='lock_tax2' <?php echo $lock_tax2; ?> /> <label for='lock_tax2'><?php echo __('No', 'wpsc'); ?> </label> </td> </tr> <tr> <!-- Disregard Billing State for Tax Calculations --> <?php $lock_tax_to_shipping = get_option('lock_tax_to_shipping'); switch ($lock_tax_to_shipping) { case 1: $lock_tax_to_shipping1 = "checked ='checked'"; break; case 0: $lock_tax_to_shipping2 = "checked ='checked'"; break; } ?> <td scope="row"><?php echo __(' Disregard Billing State for Tax Calculations', 'wpsc'); ?> :</td> <td> <input type='radio' value='1' name='wpsc_options[lock_tax_to_shipping]' id='lock_tax1' <?php echo $lock_tax_to_shipping1; ?> /> <label for='lock_tax_to_shipping1'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[lock_tax_to_shipping]' id='lock_tax2' <?php echo $lock_tax_to_shipping2; ?> /> <label for='lock_tax_to_shipping2'><?php echo __('No', 'wpsc'); ?> </label> </td> </tr> <tr> <?php $shippingBilling = get_option('shippingsameasbilling'); switch ($shippingBilling) { case 1: $shippingBilling1 = "checked ='checked'"; break; case 0: $shippingBilling2 = "checked ='checked'"; break; } ?> <td scope="row"><?php echo __('Enable Shipping Same as Billing Option: ', 'wpsc'); ?> :</td> <td> <input type='radio' value='1' name='wpsc_options[shippingsameasbilling]' id='shippingsameasbilling1' <?php echo $shippingBilling1; ?> /> <label for='shippingsameasbilling1'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[shippingsameasbilling]' id='shippingsameasbilling2' <?php echo $shippingBilling2; ?> /> <label for='shippingsameasbilling2'><?php echo __('No', 'wpsc'); ?> </label> </td> </tr> <tr> <?php $billing_unless_shipping_setting = get_option('use_billing_unless_is_shipping'); switch ($billing_unless_shipping_setting) { case 1: $billing_unless_shipping['on'] = "checked ='checked'"; break; case 0: $billing_unless_shipping['off'] = "checked ='checked'"; break; } ?> <td scope="row"><?php echo __('Use The Billing country for Shipping unless a shipping form is present: ', 'wpsc'); ?> :</td> <td> <input type='radio' value='1' name='wpsc_options[use_billing_unless_is_shipping]' id='use_billing_unless_is_shipping1' <?php echo $billing_unless_shipping['on']; ?> /> <label for='use_billing_unless_is_shipping1'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[use_billing_unless_is_shipping]' id='use_billing_unless_is_shipping2' <?php echo $billing_unless_shipping['off']; ?> /> <label for='use_billing_unless_is_shipping2'><?php echo __('No', 'wpsc'); ?> </label> </td> </tr> </table> </div> </div> </div> <h3>Form Fields</h3> <p><?php echo __('Here you can customise the forms to be displayed in your checkout page. The checkout page is where you collect important user information that will show up in your purchase logs i.e. the buyers address, and name...', 'wpsc'); ?> </p> <p> <label for='wpsc_form_set'>Select a Form Set:</label> <select id='wpsc_form_set' name='wpsc_form_set'> <?php $checkout_sets = get_option('wpsc_checkout_form_sets'); foreach ((array) $checkout_sets as $key => $value) { $selected_state = ""; if ($_GET['checkout-set'] == $key) { $selected_state = "selected='selected'"; } echo "<option {$selected_state} value='{$key}'>" . stripslashes($value) . "</option>"; } ?> </select> <input type='submit' value='Filter' name='wpsc_checkout_set_filter' class='button-secondary' /> <a href='#' class='add_new_form_set'><?php _e("+ Add New Form Set", 'wpsc'); ?> </a> </p> <p class='add_new_form_set_forms'> <label><?php _e("Add new Form Set", 'wpsc'); ?> : <input type="text" value="" name="new_form_set" /></label> <input type="submit" value="<?php _e('Add'); ?> " class="button-secondary" id="formset-add-sumbit"/> </p> <?php if (!isset($_GET['checkout-set'])) { $filter = 0; $form_sql = "SELECT * FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `active` = '1' AND `checkout_set` IN ('" . $filter . "') ORDER BY `order`;"; } else { $filter = $wpdb->escape($_GET['checkout-set']); $form_sql = "SELECT * FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `active` = '1' AND `checkout_set` IN ('" . $filter . "') ORDER BY `order`;"; } $email_form_field = $wpdb->get_row("SELECT `id` FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `type` IN ('email') AND `active` = '1' ORDER BY `order` ASC LIMIT 1", ARRAY_A); $form_data = $wpdb->get_results($form_sql, ARRAY_A); $selected_checkout_set = $_GET['checkout-set']; echo "<input type='hidden' name='selected_form_set' value='" . $selected_checkout_set . "' />"; ?> <table id="wpsc_checkout_list" class="widefat page fixed" cellspacing="0"> <thead> <tr> <?php print_column_headers('display-checkout-list'); ?> </tr> </thead> <tfoot> <tr> <?php print_column_headers('display-checkout-list', false); ?> </tr> </tfoot> <tbody id='wpsc_checkout_list_body'> <?php foreach ((array) $form_data as $form_field) { echo "<tr id='checkout_" . $form_field['id'] . "' class='checkout_form_field'>\n\r"; echo '<td class="drag"><a href="" onclick="return false;" title="Click and Drag to Order Checkout Fields"><img src="' . WPSC_URL . '/images/roll-over-drag.jpg" alt="roll-over-drag" /></a></td>'; echo "<td class='namecol'><input type='text' name='form_name[" . $form_field['id'] . "]' value='" . htmlentities(stripslashes($form_field['name']), ENT_QUOTES, "UTF-8") . "' /></td>"; echo " <td class='typecol'>"; echo "<select class='wpsc_checkout_selectboxes' name='form_type[" . $form_field['id'] . "]'>"; foreach ($form_types as $form_type_name => $form_type) { $selected = ''; if ($form_type === $form_field['type']) { $selected = "selected='selected'"; } // define('__('Textarea', 'wpsc')', 'Textarea'); echo "<option value='" . $form_type . "' " . $selected . ">" . __($form_type_name, 'wpsc') . "</option>"; } echo "</select>"; if (in_array($form_field['type'], array('select', 'radio', 'checkbox'))) { echo "<a class='wpsc_edit_checkout_options' rel='form_options[" . $form_field['id'] . "]' href=''>more options</a>"; } echo "</td>"; $checked = ""; echo "<td><select name='unique_names[" . $form_field['id'] . "]'>"; echo "<option value='-1'>Select a Unique Name</option>"; foreach ($unique_names as $unique_name) { $selected = ""; if ($unique_name == $form_field['unique_name']) { $selected = "selected='selected'"; } echo "<option " . $selected . " value='" . $unique_name . "'>" . $unique_name . "</option>"; } echo "</select></td>"; if ($form_field['mandatory']) { $checked = "checked='checked'"; } echo " <td class='mandatorycol'><input {$checked} type='checkbox' name='form_mandatory[" . $form_field['id'] . "]' value='1' /></td>"; echo " <td><a class='image_link' href='#' onclick='return remove_form_field(\"checkout_" . $form_field['id'] . "\"," . $form_field['id'] . ");'><img src='" . WPSC_URL . "/images/trash.gif' alt='" . __('Delete', 'wpsc') . "' title='" . __('Delete', 'wpsc') . "' /></a>"; if ($email_form_field['id'] == $form_field['id']) { echo "<a title='" . __('This will be the Email address that the Purchase Reciept is sent to.', 'wpsc') . "' class='flag_email' href='#' ><img src='" . WPSC_URL . "/images/help.png' alt='' /> </a>"; } echo "</td>"; echo "\n\t\t\t </tr>"; } ?> </tbody> </table> <?php ?> <p> <input type='hidden' name='wpsc_admin_action' value='checkout_settings' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input class='button-primary' type='submit' name='submit' value='<?php echo __('Save Changes', 'wpsc'); ?> ' /> <a href='#' onclick='return add_form_field();'><?php echo __('Add New Form Field', 'wpsc'); ?> </a> </p> </form> </div> </form> <?php }
function wpsc_options_gateway() { global $wpdb, $nzshpcrt_gateways; $curgateway = get_option('payment_gateway'); $payment_gateway_names = get_option('payment_gateway_names'); if (empty($nzshpcrt_gateways)) { $nzshpcrt_gateways = nzshpcrt_get_gateways(); } if (is_array($nzshpcrt_gateways)) { $selected_gateways = get_option('custom_gateway_options'); foreach ($nzshpcrt_gateways as $gateway) { if ($gateway['internalname'] == $curgateway) { $selected = "selected='selected'"; $form = $gateway['form'](); $selected_gateway_data = $gateway; } else { $selected = ''; } if (isset($gateway['admin_name'])) { $gateway['name'] = $gateway['admin_name']; } $disabled = ''; if (!in_array($gateway['internalname'], (array) $selected_gateways)) { $disabled = "disabled='disabled'"; } if (!isset($gateway['internalname'])) { $gateway['internalname'] = ''; } $gatewaylist = ''; $gatewaylist .= "<option {$disabled} value='" . esc_attr($gateway['internalname']) . "' " . $selected . " >" . esc_attr($gateway['name']) . "</option>"; } } $nogw = ''; $gatewaylist = "<option value='" . $nogw . "'>" . __('Please Select A Payment Gateway', 'wpsc') . "</option>" . $gatewaylist; ?> <script language='javascript' type='text/javascript'> function selectgateway() { document.forms.gateway_opt.submit(); } </script> <div class="wrap"> <div class='metabox-holder'> <form name='gatewayopt' method='post' id='gateway_opt' action='' class='wpsc_form_track'> <input type='hidden' name='gateway_submits' value='true' /> <input type='hidden' name='wpsc_gateway_settings' value='gateway_settings' /> <?php if (get_option('custom_gateway') == 1) { $custom_gateway_hide = "style='display:block;'"; $custom_gateway1 = 'checked="checked"'; } else { $custom_gateway_hide = "style='display:none;'"; $custom_gateway2 = 'checked="checked"'; } /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <table id='gateway_options' > <tr> <td class='select_gateway'> <div class='postbox'> <h3 class='hndle'><?php _e('General Settings', 'wpsc'); ?> </h3> <div class='inside'> <p><?php _e('Activate the payment gateways that you want to make available to your customers by selecting them below.', 'wpsc'); ?> </p> <br /> <?php $selected_gateways = get_option('custom_gateway_options'); foreach ($nzshpcrt_gateways as $gateway) { if (isset($gateway['admin_name'])) { $gateway['name'] = $gateway['admin_name']; } if (in_array($gateway['internalname'], (array) $selected_gateways)) { ?> <div class="wpsc_shipping_options"> <div class='wpsc-shipping-actions wpsc-payment-actions'> | <span class="edit"> <a class='edit-payment-module' rel="<?php echo $gateway['internalname']; ?> " onclick="event.preventDefault();" title="Edit this Payment Module" href='<?php echo htmlspecialchars(add_query_arg('payment_module', $gateway['internalname'])); ?> ' style="cursor:pointer;">Edit</a> </span> | </div> <p><input name='wpsc_options[custom_gateway_options][]' checked='checked' type='checkbox' value='<?php esc_attr_e($gateway['internalname']); ?> ' id='<?php esc_attr_e($gateway['internalname']); ?> _id' /> <label for='<?php esc_attr_e($gateway['internalname']); ?> _id'><?php esc_attr_e($gateway['name']); ?> </label></p> </div> <?php } else { ?> <div class="wpsc_shipping_options"> <div class='wpsc-shipping-actions wpsc-payment-actions'> | <span class="edit"> <a class='edit-payment-module' rel="<?php echo $gateway['internalname']; ?> " onclick="event.preventDefault();" title="Edit this Payment Module" href='<?php echo htmlspecialchars(add_query_arg('payment_module', $gateway['internalname'])); ?> ' style="cursor:pointer;"><?php _e('Edit', 'wpsc'); ?> </a> </span> | </div> <p><input name='wpsc_options[custom_gateway_options][]' type='checkbox' value='<?php echo $gateway['internalname']; ?> ' id='<?php echo $gateway['internalname']; ?> _id' /> <label for='<?php echo $gateway['internalname']; ?> _id'><?php echo $gateway['name']; ?> </label></p></div> <?php } } ?> <div class='submit gateway_settings'> <input type='hidden' value='true' name='update_gateways' /> <input type='submit' value='<?php _e('Update »', 'wpsc'); ?> ' name='updateoption' /> </div> </div> </div> <h4><?php _e('We Recommend', 'wpsc'); ?> </h4> <a style="border-bottom:none;" href="https://www.paypal.com/nz/mrb/pal=LENKCHY6CU2VY" target="_blank"><img src="<?php echo WPSC_CORE_IMAGES_URL; ?> /paypal-referal.gif" border="0" alt="Sign up for PayPal and start accepting credit card payments instantly." /></a> <br /><br /> <a style="border-bottom:none;" href="http://checkout.google.com/sell/?promo=seinstinct" target="_blank"><img src="https://checkout.google.com/buyer/images/google_checkout.gif" border="0" alt="Sign up for Google Checkout" /></a> </td> <td class='gateway_settings' rowspan='2'> <div class='postbox'> <?php if (!isset($_SESSION['previous_payment_name'])) { $_SESSION['previous_payment_name'] = ""; } if (!isset($selected_gateway_data)) { $selected_gateway_data = ""; } $payment_data = wpsc_get_payment_form($_SESSION['previous_payment_name'], $selected_gateway_data); ?> <h3 class='hndle'><?php echo $payment_data['name']; ?> </h3> <div class='inside'> <table class='form-table'> <?php echo $payment_data['form_fields']; ?> </table> <?php if ($payment_data['has_submit_button'] == 0) { $update_button_css = 'style= "display: none;"'; } else { $update_button_css = ''; } ?> <div class='submit' <?php echo $update_button_css; ?> > <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type='submit' value='<?php _e('Update »', 'wpsc'); ?> ' name='updateoption' /> </div> </div> </td> </tr> </table> </form> </div> </div> <?php }
function wpsc_options_checkout() { global $wpdb; $form_types = array("text", "email", "address", "city", "country", "delivery_address", "delivery_city", "delivery_country", "textarea", "heading", "coupon"); ?> <form name='cart_options' id='cart_options' method='post' action=''> <div class="wrap"> <h2><?php echo TXT_WPSC_FORM_FIELDS; ?> </h2> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <form method='post' action='' id='chekcout_options_tbl'> <input type='hidden' name='checkout_submits' value='true' /> <table> <tr> <td><?php echo TXT_WPSC_REQUIRE_REGISTRATION; ?> :</td> <td> <?php $require_register = get_option('require_register'); $require_register1 = ""; $require_register2 = ""; switch ($require_register) { case 0: $require_register2 = "checked ='checked'"; break; case 1: $require_register1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[require_register]' id='require_register1' <?php echo $require_register1; ?> /> <label for='require_register1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[require_register]' id='require_register2' <?php echo $require_register2; ?> /> <label for='require_register2'><?php echo TXT_WPSC_NO; ?> </label> </td> <td> <a title='<?php echo TXT_WPSC_ANYONEREGISTER; ?> ' class='flag_email' href='#' ><img src='<?php echo WPSC_URL; ?> /images/help.png' alt='' /> </a> </td> </tr> <tr> <?php $lock_tax = get_option('lock_tax'); switch ($lock_tax) { case 1: $lock_tax1 = "checked ='checked'"; break; case 0: $lock_tax2 = "checked ='checked'"; break; } ?> <td scope="row"><?php echo TXT_WPSC_LOCK_TAX; ?> :</td> <td> <input type='radio' value='1' name='wpsc_options[lock_tax]' id='lock_tax1' <?php echo $lock_tax1; ?> /> <label for='lock_tax1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[lock_tax]' id='lock_tax2' <?php echo $lock_tax2; ?> /> <label for='lock_tax2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> <tr> <?php $shippingBilling = get_option('shippingsameasbilling'); switch ($shippingBilling) { case 1: $shippingBilling1 = "checked ='checked'"; break; case 0: $shippingBilling2 = "checked ='checked'"; break; } ?> <td scope="row"><?php echo TXT_WPSC_SHIPPING_SAME_AS_BILLING; ?> :</td> <td> <input type='radio' value='1' name='wpsc_options[shippingsameasbilling]' id='shippingsameasbilling1' <?php echo $shippingBilling1; ?> /> <label for='shippingsameasbilling1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[shippingsameasbilling]' id='shippingsameasbilling2' <?php echo $shippingBilling2; ?> /> <label for='shippingsameasbilling2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> </table> <p><?php echo TXT_WPSC_CHECKOUT_FORM_FIELDS_DESCRIPTION; ?> </p> <table id='form_field_table' style='border-collapse: collapse;'> <tr> <th class='namecol'> <?php echo TXT_WPSC_NAME; ?> </th> <th class='typecol'> <?php echo TXT_WPSC_TYPE; ?> </th> <th class='mandatorycol'> <?php echo TXT_WPSC_MANDATORY; ?> </th> <th class='logdisplaycol'> <?php echo TXT_WPSC_DISPLAY_IN_LOG; ?> </th> <th class='ordercol'> <?php echo TXT_WPSC_ORDER; ?> </th> </tr> <tr> <td colspan='6' style='padding: 0px;'> <div id='form_field_form_container'> <?php $email_form_field = $wpdb->get_results("SELECT `id` FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `type` IN ('email') AND `active` = '1' ORDER BY `order` ASC LIMIT 1", ARRAY_A); $email_form_field = $email_form_field[0]; $form_sql = "SELECT * FROM `" . WPSC_TABLE_CHECKOUT_FORMS . "` WHERE `active` = '1' ORDER BY `order`;"; $form_data = $wpdb->get_results($form_sql, ARRAY_A); //exit("<pre>".print_r($form_data,true)."</pre>"); foreach ((array) $form_data as $form_field) { echo "\n\t\t\t <div id='form_id_" . $form_field['id'] . "'>\n\t\t\t <table>\n\t\t\t <tr>\n\r"; echo "<td class='namecol'><input type='text' name='form_name[" . $form_field['id'] . "]' value='" . $form_field['name'] . "' /></td>"; echo " <td class='typecol'><select name='form_type[" . $form_field['id'] . "]'>"; foreach ($form_types as $form_type) { $selected = ''; if ($form_type === $form_field['type']) { $selected = "selected='selected'"; } // define('TXT_WPSC_TEXTAREA', 'Textarea'); echo "<option value='" . $form_type . "' " . $selected . ">" . constant("TXT_WPSC_" . strtoupper($form_type)) . "</option>"; } echo "</select></td>"; $checked = ""; if ($form_field['mandatory']) { $checked = "checked='checked'"; } echo " <td class='mandatorycol' style='text-align: center;'><input {$checked} type='checkbox' name='form_mandatory[" . $form_field['id'] . "]' value='1' /></td>"; $checked = ""; if ($form_field['display_log']) { $checked = "checked='checked'"; } echo " <td class='logdisplaycol' style='text-align: center;'><input {$checked} type='checkbox' name='form_display_log[" . $form_field['id'] . "]' value='1' /></td>"; echo " <td class='ordercol'><input type='text' size='3' name='form_order[" . $form_field['id'] . "]' value='" . $form_field['order'] . "' /></td>"; echo " <td style='text-align: center; width: 12px;'><a class='image_link' href='#' onclick='return remove_form_field(\"form_id_" . $form_field['id'] . "\"," . $form_field['id'] . ");'><img src='" . WPSC_URL . "/images/trash.gif' alt='" . TXT_WPSC_DELETE . "' title='" . TXT_WPSC_DELETE . "' /></a>"; echo "</td>"; if ($email_form_field['id'] == $form_field['id']) { echo "<td>"; echo "<a title='" . TXT_WPSC_RECIEPT_EMAIL_ADDRESS . "' class='flag_email' href='#' ><img src='" . WPSC_URL . "/images/help.png' alt='' /> </a>"; } else { echo "<td style='width:16px'>"; echo " "; } echo "</td>"; echo "\n\t\t\t </tr>\n\t\t\t </table>\n\t\t\t </div>"; } ?> </div> </td> </tr> <tr> <td colspan='6' style='padding: 2px;'> <input type='hidden' name='wpsc_admin_action' value='checkout_settings' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input class='button-secondary' type='submit' name='submit' value='<?php echo TXT_WPSC_SAVE_CHANGES; ?> ' /> <a href='#' onclick='return add_form_field();'><?php echo TXT_WPSC_ADD_NEW_FORM; ?> </a> </td> </tr> </table> </form> </div> </form> <?php }
function wpsc_options_admin() { global $wpdb; ?> <form name='cart_options' id='cart_options' method='post' action='' class='wpsc_form_track'> <div id="options_admin"> <h3><?php _e('Admin Settings', 'wpsc'); ?> </h3> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php _e('Max downloads per file', 'wpsc'); ?> : </th> <td> <input type='text' size='10' value='<?php esc_attr_e(get_option('max_downloads')); ?> ' name='wpsc_options[max_downloads]' /> </td> </tr> <?php $wpsc_ip_lock_downloads1 = ""; $wpsc_ip_lock_downloads2 = ""; switch (esc_attr(get_option('wpsc_ip_lock_downloads'))) { case 1: $wpsc_ip_lock_downloads1 = "checked ='checked'"; break; case 0: default: $wpsc_ip_lock_downloads2 = "checked ='checked'"; break; } ?> <tr> <th scope="row"> <?php _e('Lock downloads to IP address', 'wpsc'); ?> : </th> <td> <input type='radio' value='1' name='wpsc_options[wpsc_ip_lock_downloads]' id='wpsc_ip_lock_downloads2' <?php echo $wpsc_ip_lock_downloads1; ?> /> <label for='wpsc_ip_lock_downloads2'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[wpsc_ip_lock_downloads]' id='wpsc_ip_lock_downloads1' <?php echo $wpsc_ip_lock_downloads2; ?> /> <label for='wpsc_ip_lock_downloads1'><?php _e('No', 'wpsc'); ?> </label><br /> </td> </tr> <?php $wpsc_check_mime_types1 = ""; $wpsc_check_mime_types2 = ""; switch (esc_attr(get_option('wpsc_check_mime_types'))) { case 1: $wpsc_check_mime_types2 = "checked ='checked'"; break; case 0: default: $wpsc_check_mime_types1 = "checked ='checked'"; break; } ?> <tr> <th scope="row"> <?php _e('Check MIME types on file uploads', 'wpsc'); ?> : </th> <td> <input type='radio' value='0' name='wpsc_options[wpsc_check_mime_types]' id='wpsc_check_mime_types2' <?php echo $wpsc_check_mime_types1; ?> /> <label for='wpsc_check_mime_types2'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='1' name='wpsc_options[wpsc_check_mime_types]' id='wpsc_check_mime_types1' <?php echo $wpsc_check_mime_types2; ?> /> <label for='wpsc_check_mime_types1'><?php _e('No', 'wpsc'); ?> </label><br /> <span class="wpscsmall description"> <?php _e('Warning: Disabling this exposes your site to greater possibility of malicious files being uploaded, we reccomend installing the Fileinfo extention for PHP rather than disabling this.', 'wpsc'); ?> </span> </td> </tr> <tr> <th scope="row"> <?php _e('Purchase Log Email', 'wpsc'); ?> : </th> <td> <input class='text' name='wpsc_options[purch_log_email]' type='text' size='40' value='<?php esc_attr_e(get_option('purch_log_email')); ?> ' /> </td> </tr> <tr> <th scope="row"> <?php _e('Purchase Receipt - Reply Address', 'wpsc'); ?> : </th> <td> <input class='text' name='wpsc_options[return_email]' type='text' size='40' value='<?php esc_attr_e(get_option('return_email')); ?> ' /> </td> </tr> <tr> <th scope="row"> <?php _e('Purchase Receipt - Reply Name', 'wpsc'); ?> : </th> <td> <input class='text' name='wpsc_options[return_name]' type='text' size='40' value='<?php esc_attr_e(get_option('return_name')); ?> ' /> </td> </tr> <tr> <th scope="row"> <?php _e('Terms and Conditions', 'wpsc'); ?> : </th> <td> <textarea name='wpsc_options[terms_and_conditions]' cols='' rows='' style='width: 300px; height: 200px;'><?php esc_attr_e(stripslashes(get_option('terms_and_conditions'))); ?> </textarea> </td> </tr> </table> <h3 class="form_group"><?php _e('Custom Messages', 'wpsc'); ?> :</h3> <table class='wpsc_options form-table'> <tr> <th colspan="2"><?php _e('Tags can be used', 'wpsc'); ?> : %purchase_id%, %shop_name%,<!-- %order_status%,--> %product_list%, %total_price%, %total_shipping%, %find_us%, %total_tax%</th> </tr> <tr> <td class='wpsc_td_note' colspan='2'> <span class="wpscsmall description"> <?php _e('Note: The purchase receipt is the message e-mailed to users after purchasing products from your shop.', 'wpsc'); ?> </span> </td> </tr> <tr> <th><strong><?php _e('Purchase Receipt', 'wpsc'); ?> </strong></th> <td><textarea name="wpsc_options[wpsc_email_receipt]" cols='' rows='' style='width: 300px; height: 200px;'><?php esc_attr_e(stripslashes(get_option('wpsc_email_receipt'))); ?> </textarea></td> </tr> <tr> <td class='wpsc_td_note' colspan='2'> <span class="wpscsmall description"> <?php _e('Note: The Admin Report is the email sent to the e-mail address set above as soon as someone successfully buys a product.', 'wpsc'); ?> </span> </td> </tr> <tr> <th><strong><?php _e('Admin Report', 'wpsc'); ?> </strong></th> <td><textarea name="wpsc_options[wpsc_email_admin]" cols='' rows='' style='width: 300px; height: 200px;'><?php esc_attr_e(stripslashes(get_option('wpsc_email_admin'))); ?> </textarea></td> </tr> </table> <h3 class="form_group"><?php _e("Track and Trace settings", 'wpsc'); ?> :</h3> <table class='wpsc_options form-table'> <tr> <td class='wpsc_td_note' colspan='2'> <span class="wpscsmall description"> <?php _e('Note: The Tracking Subject, is the subject for The Tracking Message email. The Tracking Message is the message e-mailed to users when you click \'Email buyer\' on the sales log. This option is only available for purchases with the status of \'Job Dispatched\'. Tags you can use in the email message section are %trackid% and %shop_name%', 'wpsc'); ?> </span> </td> </tr> <tr> <th><strong><?php _e('Tracking Email Subject', 'wpsc'); ?> </strong></th> <td><input name="wpsc_options[wpsc_trackingid_subject]" type='text' value='<?php esc_attr_e(stripslashes(get_option('wpsc_trackingid_subject'))); ?> ' /></td> </tr> <tr> <th><strong><?php _e('Tracking Email Message', 'wpsc'); ?> </strong></th> <td><textarea name="wpsc_options[wpsc_trackingid_message]" cols='' rows='' style='width: 300px; height: 200px;'><?php esc_attr_e(stripslashes(get_option('wpsc_trackingid_message'))); ?> </textarea></td> </tr> </table> <?php /* here end the admin options */ ?> <?php do_action('wpsc_admin_settings_page'); ?> <div class="submit"> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type="submit" value="<?php _e('Update »', 'wpsc'); ?> " name="updateoption"/> </div> </div> </form> <?php }
function wpec_options_taxes() { $wpec_taxes_controller = new wpec_taxes_controller(); $wpec_taxes_options = $wpec_taxes_controller->wpec_taxes->wpec_taxes_get_options(); //include standard shopping cart notifications wpsc_settings_page_update_notification(); ?> <form name='wpec_taxes_options' id='wpec_taxes_options' method='post' action='' class='wpsc_form_track'> <div class="wrap"> <h3><?php _e('Tax Settings', 'wpsc'); ?> </h3> <p> <label for='wpec_taxes_enabled'> <input <?php if ($wpec_taxes_options['wpec_taxes_enabled']) { echo 'checked="checked"'; } ?> type="checkbox" id='wpec_taxes_enabled' name='wpsc_options[wpec_taxes_enabled]' /> <?php _e('Turn tax on', 'wpsc'); ?> </label> </p> <p> <label for='wpec_taxes_inprice1'> <input <?php if ($wpec_taxes_options['wpec_taxes_inprice'] == 'exclusive') { echo 'checked="checked"'; } ?> type="radio" value='exclusive' id='wpec_taxes_inprice1' name='wpsc_options[wpec_taxes_inprice]' /> <?php _e('Product prices are tax exclusive - add tax to the price during checkout', 'wpsc'); ?> </label> </p> <p> <label for='wpec_taxes_inprice2'> <input <?php if ($wpec_taxes_options['wpec_taxes_inprice'] == 'inclusive') { echo 'checked="checked"'; } ?> type="radio" value='inclusive' id='wpec_taxes_inprice2' name='wpsc_options[wpec_taxes_inprice]' /> <?php _e("Product prices are tax inclusive - during checkout the total price doesn't increase but tax is shown as a line item", 'wpsc'); ?> </label> </p> <h4><?php _e('Product Specific Tax', 'wpsc'); ?> </h4> <p> <label for='wpec_taxes_product_1'> <input <?php if ($wpec_taxes_options['wpec_taxes_product'] == 'add') { echo 'checked="checked"'; } ?> type="radio" value='add' id='wpec_taxes_product_1' name='wpsc_options[wpec_taxes_product]' /> <?php _e('Add per product tax to tax percentage if product has a specific tax rate', 'wpsc'); ?> </label> </p> <p> <label for='wpec_taxes_product_2'> <input <?php if ($wpec_taxes_options['wpec_taxes_product'] == 'replace') { echo 'checked="checked"'; } ?> type="radio" value='replace' id='wpec_taxes_product_2' name='wpsc_options[wpec_taxes_product]' /> <?php _e('Replace tax percentage with product specific tax rate', 'wpsc'); ?> </label> </p> <h4><?php _e('Tax Logic', 'wpsc'); ?> </h4> <p> <label for='wpec_taxes_logic_1'> <input <?php if ($wpec_taxes_options['wpec_taxes_logic'] == 'billing_shipping') { echo 'checked="checked"'; } ?> type="radio" value='billing_shipping' id='wpec_taxes_logic_1' name='wpsc_options[wpec_taxes_logic]' /> <?php _e('Apply tax when Billing and Shipping Country is the same as Tax Rate', 'wpsc'); ?> </label> <div id='billing_shipping_preference_container' style='margin-left: 20px;'> <p> <label for='wpec_billing_preference'> <input <?php if ($wpec_taxes_options['wpec_taxes_logic'] == 'billing_shipping' && $wpec_taxes_options['wpec_billing_shipping_preference'] == 'billing_address') { echo 'checked="checked"'; } ?> type="radio" value='billing_address' id='wpec_billing_preference' name='wpsc_options[wpec_billing_shipping_preference]' /> <?php _e('Apply tax to Billing Address', 'wpsc'); ?> </label> </p> <p> <label for='wpec_shipping_preference'> <input <?php if ($wpec_taxes_options['wpec_taxes_logic'] == 'billing_shipping' && $wpec_taxes_options['wpec_billing_shipping_preference'] == 'shipping_address') { echo 'checked="checked"'; } ?> type="radio" value='shipping_address' id='wpec_shipping_preference' name='wpsc_options[wpec_billing_shipping_preference]' /> <?php _e('Apply tax to Shipping Address', 'wpsc'); ?> </label> </p> </div> </p> <p> <label for='wpec_taxes_logic_2'> <input <?php if ($wpec_taxes_options['wpec_taxes_logic'] == 'billing') { echo 'checked="checked"'; } ?> type="radio" value='billing' id='wpec_taxes_logic_2' name='wpsc_options[wpec_taxes_logic]' /> <?php _e('Apply tax when Billing Country is the same as Tax Rate', 'wpsc'); ?> </label> </p> <p> <label for='wpec_taxes_logic_3'> <input <?php if ($wpec_taxes_options['wpec_taxes_logic'] == 'shipping') { echo 'checked="checked"'; } ?> type="radio" value='shipping' id='wpec_taxes_logic_3' name='wpsc_options[wpec_taxes_logic]' /> <?php _e('Apply tax when Shipping Country is the same as Tax Rate', 'wpsc'); ?> </label> </p> <div id='metabox-holder' class="metabox-holder"> <div id='wpec-taxes-rates-container' class='postbox'> <h3 class='hndle' style='cursor: default'><?php _e('Tax Rates', 'wpsc'); ?> </h3> <div id='wpec-taxes-rates' class='inside'> <!--Start Taxes Output--> <?php /** * Add New Tax Rate - should add another paragraph with the another key specified for the input array * Delete - Should remove the given paragraph from the page and either ajax delete it from the DB or mark it for deletion and process it after the changes are made. * Selecting a Country - should automatically populate the regions select box. Selecting a different country should remove the region select box. If the user selects a different country with regions it shouldn't matter because the code should automatically add the region select in. * - Allow users to define tax for entire country even if regions exist. * Shipping Tax - needs to be per region or per tax rate. Remove the setting from the main Tax Settings area. * Constraints - 1. Should not allow a user to add more than one tax rate for the same area. 2. If a country tax rate is specified and then a region tax rate, the region tax rate takes precedence. * */ /** * Removed Shipping Restriction on Included tax - 01-20-2011 //if tax is included warn about shipping if ( $wpec_taxes_controller->wpec_taxes_isincluded() ) { echo '<p>' . __( 'Note: Tax is not applied to shipping when product prices are tax inclusive.' ) . '</p>'; }// if **/ //get current tax rates $tax_rates = $wpec_taxes_controller->wpec_taxes->wpec_taxes_get_rates(); $tax_rate_count = 0; if (!empty($tax_rates)) { foreach ($tax_rates as $tax_rate) { echo $wpec_taxes_controller->wpec_taxes_build_form($tax_rate_count, $tax_rate); $tax_rate_count++; } // foreach } // if ?> <!--End Taxes Output--> <p> <a id="add_taxes_rate" href="#"><?php _e('Add New Tax Rate', 'wpsc'); ?> </a> </p> </div> </div> <div id='wpec-taxes-bands-container' class='postbox'> <h3 class='hndle' style='cursor: default'><?php _e('Tax Bands', 'wpsc'); ?> </h3> <div id='wpec-taxes-bands' class='inside'> <?php echo '<p>' . __('Note: Tax Bands are special tax rules you can create and apply on a per-product basis. <br /> Please visit the product page to apply your Tax Band.', 'wpsc') . '</p>'; //echo message regarding inclusive tax if (!$wpec_taxes_controller->wpec_taxes_isincluded()) { echo '<p>' . __('Note: Tax Bands do not take affect when product prices are tax exclusive.', 'wpsc') . '</p>'; } // if $tax_bands = $wpec_taxes_controller->wpec_taxes->wpec_taxes_get_bands(); $tax_band_count = 0; if (!empty($tax_bands)) { foreach ($tax_bands as $tax_band) { echo $wpec_taxes_controller->wpec_taxes_build_form($tax_band_count, $tax_band, 'bands'); $tax_band_count++; } // foreach } // if ?> <p> <a id="add_taxes_band" href="#"><?php _e('Add New Tax Band', 'wpsc'); ?> </a> </p> </div> </div><!--wpec-taxes-bands-container--> </div><!--metabox-holder--> <?php do_action('wpsc_taxes_settings_page'); ?> <div class="submit"> <input type='hidden' name='wpec_admin_action' value='submit_taxes_options' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type="submit" class='button-primary' value="Save Changes" name="submit_taxes" /> </div> </div> </form> <?php }
function wpsc_options_admin() { global $wpdb; ?> <form name='cart_options' id='cart_options' method='post' action=''> <div id="options_admin"> <h2><?php echo TXT_WPSC_OPTIONS_ADMIN_HEADER; ?> </h2> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo TXT_WPSC_MAXDOWNLOADSPERFILE; ?> : </th> <td> <input type='text' size='10' value='<?php echo get_option('max_downloads'); ?> ' name='wpsc_options[max_downloads]' /> </td> </tr> <?php $wpsc_ip_lock_downloads1 = ""; $wpsc_ip_lock_downloads2 = ""; switch (get_option('wpsc_ip_lock_downloads')) { case 1: $wpsc_ip_lock_downloads1 = "checked ='checked'"; break; case 0: default: $wpsc_ip_lock_downloads2 = "checked ='checked'"; break; } ?> <tr> <th scope="row"> <?php echo TXT_WPSC_LOCK_DOWNLOADS_TO_IP; ?> : </th> <td> <input type='radio' value='1' name='wpsc_options[wpsc_ip_lock_downloads]' id='wpsc_ip_lock_downloads2' <?php echo $wpsc_ip_lock_downloads1; ?> /> <label for='wpsc_ip_lock_downloads2'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[wpsc_ip_lock_downloads]' id='wpsc_ip_lock_downloads1' <?php echo $wpsc_ip_lock_downloads2; ?> /> <label for='wpsc_ip_lock_downloads1'><?php echo TXT_WPSC_NO; ?> </label><br /> </td> </tr> <?php $wpsc_check_mime_types1 = ""; $wpsc_check_mime_types2 = ""; switch (get_option('wpsc_check_mime_types')) { case 1: $wpsc_check_mime_types2 = "checked ='checked'"; break; case 0: default: $wpsc_check_mime_types1 = "checked ='checked'"; break; } ?> <tr> <th scope="row"> <?php echo TXT_WPSC_CHECK_MIME_TYPES; ?> : </th> <td> <input type='radio' value='0' name='wpsc_options[wpsc_check_mime_types]' id='wpsc_check_mime_types2' <?php echo $wpsc_check_mime_types1; ?> /> <label for='wpsc_check_mime_types2'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='1' name='wpsc_options[wpsc_check_mime_types]' id='wpsc_check_mime_types1' <?php echo $wpsc_check_mime_types2; ?> /> <label for='wpsc_check_mime_types1'><?php echo TXT_WPSC_NO; ?> </label><br /> <span class="wpscsmall description"> <?php echo TXT_WPSC_CHECK_MIME_TYPES_WARNING; ?> </span> </td> </tr> <tr> <th scope="row"> <?php echo TXT_WPSC_PURCHASELOGEMAIL; ?> : </th> <td> <input class='text' name='wpsc_options[purch_log_email]' type='text' size='40' value='<?php echo get_option('purch_log_email'); ?> ' /> </td> </tr> <tr> <th scope="row"> <?php _e('Purchase Receipt - Reply Address'); ?> : </th> <td> <input class='text' name='wpsc_options[return_email]' type='text' size='40' value='<?php echo get_option('return_email'); ?> ' /> </td> </tr> <tr> <th scope="row"> <?php _e('Purchase Receipt - Reply Name'); ?> : </th> <td> <input class='text' name='wpsc_options[return_name]' type='text' size='40' value='<?php echo get_option('return_name'); ?> ' /> </td> </tr> <tr> <th scope="row"> <?php echo TXT_WPSC_TERMS2; ?> : </th> <td> <textarea name='wpsc_options[terms_and_conditions]' cols='' rows='' style='width: 300px; height: 200px;'><?php echo stripslashes(get_option('terms_and_conditions')); ?> </textarea> </td> </tr> </table> <h3 class="form_group"><?php echo TXT_WPSC_EMAIL_SETTINGS; ?> :</h3> <table class='wpsc_options form-table'> <tr> <th colspan="2"><?php echo TXT_WPSC_TAGS_CAN_BE_USED; ?> : %shop_name%,<!-- %order_status%,--> %product_list%, %total_price%, %total_shipping%</th> </tr> <tr> <td class='wpsc_td_note' colspan='2'> <span class="wpscsmall description"> Note: The purchase receipt is the message e-mailed to users after purchasing products from your shop. </span> </td> </tr> <tr> <th><strong><?php echo TXT_WPSC_PURCHASERECEIPT; ?> </strong></th> <td><textarea name="wpsc_options[wpsc_email_receipt]" cols='' rows='' style='width: 300px; height: 200px;'><?php echo stripslashes(get_option('wpsc_email_receipt')); ?> </textarea></td> </tr> <tr> <td class='wpsc_td_note' colspan='2'> <span class="wpscsmall description"> Note: The Admin Report is the email sent to the e-mail address set above as soon as someone successfully buys a product. </span> </td> </tr> <tr> <th><strong><?php echo TXT_WPSC_ADMIN_REPORT; ?> </strong></th> <td><textarea name="wpsc_options[wpsc_email_admin]" cols='' rows='' style='width: 300px; height: 200px;'><?php echo stripslashes(get_option('wpsc_email_admin')); ?> </textarea></td> </tr> <tr> <td class='wpsc_td_note' colspan='2'> <span class="wpscsmall description"> Note: The Tracking Subject, is the subject for The Tracking Message email. The Tracking Message is the message e-mailed to users when you click 'Email buyer' on the sales log. This option is only available for purchases with the status of 'Job Dispatched'. Tags you can use in the email message section are %trackid% and %shop_name% </span> </td> </tr> <tr> <th><strong><?php echo TXT_WPSC_TRACKINGEMAILSUBJECT; ?> </strong></th> <td><input name="wpsc_options[wpsc_trackingid_subject]" type='text' value='<?php echo stripslashes(get_option('wpsc_trackingid_subject')); ?> ' /></td> </tr> <tr> <th><strong><?php echo TXT_WPSC_TRACKINGEMAIL; ?> </strong></th> <td><textarea name="wpsc_options[wpsc_trackingid_message]" cols='' rows='' style='width: 300px; height: 200px;'><?php echo stripslashes(get_option('wpsc_trackingid_message')); ?> </textarea></td> </tr> </table> <h3 class="form_group"><?php echo TXT_WPSC_URLSETTINGS; ?> :</h3> <table class='wpsc_options form-table'> <tr class='merged'> <th scope="row"> <?php echo TXT_WPSC_PRODUCTLISTURL; ?> : </th> <td> <input class='text' type='text' size='50' value='<?php echo get_option('product_list_url'); ?> ' name='wpsc_options[product_list_url]' /> </td> </tr> <tr class='merged'> <th scope="row"> <?php echo TXT_WPSC_SHOPPINGCARTURL; ?> : </th> <td> <input class='text' type='text' size='50' value='<?php echo get_option('shopping_cart_url'); ?> ' name='wpsc_options[shopping_cart_url]' /> </td> </tr> <?php /* <tr class='merged'> <th scope="row"> <?php echo TXT_WPSC_CHECKOUTURL;?>: </th> <td> <input class='text' type='text' size='50' value='<?php echo get_option('checkout_url'); ?>' name='checkout_url' /> </td> </tr>*/ ?> <tr class='merged'> <th scope="row"> <?php echo TXT_WPSC_TRANSACTIONDETAILSURL; ?> : </th> <td> <input class='text' type='text' size='50' value='<?php echo get_option('transact_url'); ?> ' name='wpsc_options[transact_url]' /> </td> </tr> <?php if (function_exists("nzshpcrt_user_log")) { ?> <tr class='merged'> <th scope="row"> <?php echo TXT_WPSC_USERACCOUNTURL; ?> : </th> <td> <input class='text' type='text' size='50' value='<?php echo get_option('user_account_url'); ?> ' name='wpsc_options[user_account_url]' /> </td> </tr> <?php } ?> <tr class='merged'> <td colspan="2"><a href='<?php echo wp_nonce_url("page.php?wpsc_admin_action=update_page_urls"); ?> ' ><?php echo TXT_WPSC_UPDATE_PAGE_URLS; ?> </a> | <a href='<?php echo wp_nonce_url("page.php?wpsc_admin_action=clean_categories"); ?> '><?php echo TXT_WPSC_FIX_CATEGORY_PERMALINKS; ?> </a> </td> </tr> </table> <?php /* here end the admin options */ ?> <div class="submit"> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type="submit" value="<?php echo TXT_WPSC_UPDATE_BUTTON; ?> " name="updateoption"/> </div> </div> </form> <?php }
function wpsc_options_presentation() { global $wpdb; ?> <form name='cart_options' id='cart_options' method='post' action=''> <div id="options_presentation"> <h2><?php echo TXT_WPSC_OPTIONS_PRESENTATION_HEADER; ?> </h2> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <div class='product_and_button_settings'> <h3 class="form_group"><?php echo TXT_WPSC_BUTTON_SETTINGS; ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo TXT_WPSC_BUTTONTYPE; ?> :</th> <td> <?php $addtocart_or_buynow = get_option('addtocart_or_buynow'); $addtocart_or_buynow1 = ""; $addtocart_or_buynow2 = ""; switch ($addtocart_or_buynow) { case 0: $addtocart_or_buynow1 = "checked ='checked'"; break; case 1: $addtocart_or_buynow2 = "checked ='checked'"; break; } ?> <input type='radio' value='0' name='wpsc_options[addtocart_or_buynow]' id='addtocart_or_buynow1' <?php echo $addtocart_or_buynow1; ?> /> <label for='addtocart_or_buynow1'><?php echo TXT_WPSC_ADDTOCART; ?> </label> <br /> <input type='radio' value='1' name='wpsc_options[addtocart_or_buynow]' id='addtocart_or_buynow2' <?php echo $addtocart_or_buynow2; ?> /> <label for='addtocart_or_buynow2'><?php echo TXT_WPSC_BUYNOW; ?> </label> </td> </tr> <tr> <th scope="row"><?php echo TXT_WPSC_HIDEADDTOCARTBUTTON; ?> : </th> <td> <?php $hide_addtocart_button = get_option('hide_addtocart_button'); $hide_addtocart_button1 = ""; $hide_addtocart_button2 = ""; switch ($hide_addtocart_button) { case 0: $hide_addtocart_button2 = "checked ='checked'"; break; case 1: $hide_addtocart_button1 = "checked ='checked'"; break; } ?> <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 TXT_WPSC_YES; ?> </label> <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 TXT_WPSC_NO; ?> </label> </td> </tr> </table> <h3 class="form_group"><?php echo TXT_WPSC_PRODUCT_DISPLAY_SETTINGS; ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo TXT_WPSC_SHOWPRODUCTRATINGS; ?> :</th> <td> <?php $display_pnp = get_option('product_ratings'); $product_ratings1 = ""; $product_ratings2 = ""; switch ($display_pnp) { case 0: $product_ratings2 = "checked ='checked'"; break; case 1: $product_ratings1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[product_ratings]' id='product_ratings1' <?php echo $product_ratings1; ?> /> <label for='product_ratings1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[product_ratings]' id='product_ratings2' <?php echo $product_ratings2; ?> /> <label for='product_ratings2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> <tr> <th scope="row"> <?php echo TXT_WPSC_DISPLAY_FANCY_NOTIFICATIONS; ?> : </th> <td> <?php $fancy_notifications = get_option('fancy_notifications'); $fancy_notifications1 = ""; $fancy_notifications2 = ""; switch ($fancy_notifications) { case 0: $fancy_notifications2 = "checked ='checked'"; break; case 1: $fancy_notifications1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[fancy_notifications]' id='fancy_notifications1' <?php echo $fancy_notifications1; ?> /> <label for='fancy_notifications1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[fancy_notifications]' id='fancy_notifications2' <?php echo $fancy_notifications2; ?> /> <label for='fancy_notifications2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> <tr> <th scope="row"><?php echo TXT_WPSC_SHOWPOSTAGEANDPACKAGING; ?> :</th> <td> <?php $display_pnp = get_option('display_pnp'); $display_pnp1 = ""; $display_pnp2 = ""; switch ($display_pnp) { case 0: $display_pnp2 = "checked ='checked'"; break; case 1: $display_pnp1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[display_pnp]' id='display_pnp1' <?php echo $display_pnp1; ?> /> <label for='display_pnp1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[display_pnp]' id='display_pnp2' <?php echo $display_pnp2; ?> /> <label for='display_pnp2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> <tr> <th scope="row"><?php echo TXT_WPSC_HIDEADDNAMELINK; ?> : </th> <td> <?php $hide_name_link = get_option('hide_name_link'); $hide_name_link1 = ""; $hide_name_link2 = ""; switch ($hide_name_link) { case 0: $hide_name_link2 = "checked ='checked'"; break; case 1: $hide_name_link1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[hide_name_link]' id='hide_name_link1' <?php echo $hide_name_link1; ?> /> <label for='hide_name_link1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[hide_name_link]' id='hide_name_link2' <?php echo $hide_name_link2; ?> /> <label for='hide_name_link2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> <tr> <th scope="row"><?php echo TXT_WPSC_MULTIPLE_ADDING_PRODUCTS; ?> :</th> <td> <?php $multi_adding = get_option('multi_add'); switch ($multi_adding) { case 1: $multi_adding1 = "checked ='checked'"; break; case 0: $multi_adding2 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[multi_add]' id='multi_adding1' <?php echo $multi_adding1; ?> /> <label for='multi_adding1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[multi_add]' id='multi_adding2' <?php echo $multi_adding2; ?> /> <label for='multi_adding2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> </table> </div> <div class='themes_and_appearance'> <h4><?php _e("Theme Customisation", 'wpsc'); ?> </h4> <?php if ($_SESSION['wpsc_themes_copied'] == true) { ?> <div class="updated fade below-h2" id="message" style="background-color: rgb(255, 251, 204);"> <p><?php _e("Thanks, the themes have been copied."); ?> </p> </div> <?php $_SESSION['wpsc_themes_copied'] = false; } ?> <?php if (wpsc_count_themes_in_uploads_directory() > 0) { ?> <p><?php _e("Theming your stores appearance is easy."); ?> </p> <p> <?php _e("You just need to edit the appropriate files in the following location.", 'wpsc'); ?> <br /><br /> <span class='display-path'><strong><?php _e("Path:", 'wpsc'); ?> </strong> <?php echo str_replace(ABSPATH, "", WPSC_THEMES_PATH) . WPSC_THEME_DIR . "/"; ?> </span> </p> <p><strong><?php _e("To create a new theme:", 'wpsc'); ?> </strong></p> <ol> <li><?php _e("Copy the default directory and rename it 'newTheme'"); ?> </li> <li><?php _e("Rename the default.css file inside the 'newTheme' directory to 'newTheme.css'"); ?> </li> </ol> <?php } else { if (!is_writable(WPSC_THEMES_PATH)) { ?> <p><?php _e("The permissions on your themes directory are incorrect.", 'wpsc'); ?> </p> <p><?php _e("Please set the permissions to 775 on the following directory.", 'wpsc'); ?> <br /><br /> <span class='display-path'><strong><?php _e("Path:", 'wpsc'); ?> </strong> <?php echo str_replace(ABSPATH, "", WPSC_THEMES_PATH) . WPSC_THEME_DIR . "/"; ?> </span></p> <?php } else { ?> <p><?php _e("Your theme files have not been moved. Until your theme files have been moved, we have disabled automatic upgrades.", 'wpsc'); ?> <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> <?php } } ?> <p><a href='http://www.instinct.co.nz/e-commerce/docs/'><?php _e("Read Tutorials", 'wpsc'); ?> </a></p> </div> <div style='clear:both;'></div> <h3 class="form_group"><?php echo TXT_WPSC_PRODUCTS_PAGE_SETTINGS; ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo TXT_WPSC_PRODUCT_DISPLAY; ?> :</th> <td> <?php $display_pnp = get_option('product_view'); $product_view1 = null; $product_view2 = null; $product_view3 = null; switch ($display_pnp) { case "grid": if (function_exists('product_display_grid')) { $product_view3 = "selected ='selected'"; break; } case "list": if (function_exists('product_display_list')) { $product_view2 = "selected ='selected'"; break; } default: $product_view1 = "selected ='selected'"; break; } if (get_option('list_view_quantity') == 1) { $list_view_quantity_value = "checked='checked'"; } else { $list_view_quantity_value = ''; } if (get_option('show_images_only') == 1) { $show_images_only_value = "checked='checked'"; } else { $show_images_only_value = ''; } if (get_option('display_variations') == 1) { $display_variations = "checked='checked'"; } else { $display_variations = ''; } if (get_option('display_description') == 1) { $display_description = "checked='checked'"; } else { $display_description = ''; } if (get_option('display_addtocart') == 1) { $display_addtocart = "checked='checked'"; } else { $display_addtocart = ''; } if (get_option('display_moredetails') == 1) { $display_moredetails = "checked='checked'"; } else { $display_moredetails = ''; } ?> <select name='wpsc_options[product_view]' onchange="toggle_display_options(this.options[this.selectedIndex].value)"> <option value='default' <?php echo $product_view1; ?> ><?php echo TXT_WPSC_DEFAULT; ?> </option> <?php if (function_exists('product_display_list')) { ?> <option value='list' <?php echo $product_view2; ?> ><?php echo TXT_WPSC_LIST; ?> </option> <?php } else { ?> <option value='list' disabled='disabled' <?php echo $product_view2; ?> ><?php echo TXT_WPSC_LIST; ?> </option> <?php } if (function_exists('product_display_grid')) { ?> <option value='grid' <?php echo $product_view3; ?> ><?php echo TXT_WPSC_GRID; ?> </option> <?php } else { ?> <option value='grid' disabled='disabled' <?php echo $product_view3; ?> ><?php echo TXT_WPSC_GRID; ?> </option> <?php } ?> </select> <?php if (!function_exists('product_display_grid')) { ?> <a href='http://www.instinct.co.nz/e-commerce/shop/'><?php echo TXT_WPSC_PURCHASE_UNAVAILABLE; ?> </a> <?php } ?> <div id='list_view_options' <?php if (is_null($product_view2)) { echo "style='display:none;'"; } ?> > <input type='checkbox' value='1' name='wpsc_options[list_view_quantity]' id='list_view_quantity' <?php echo $list_view_quantity_value; ?> /> <label for='list_view_options'><?php echo TXT_WPSC_ADJUSTABLE_QUANTITY; ?> </label> </div> <div id='grid_view_options' <?php echo $list_view_quantity_style; ?> <?php if (is_null($product_view3)) { echo "style='display:none;'"; } ?> > <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'); ?> ' /> <label for='grid_number_per_row'><?php echo TXT_SHOW_GRID_PER_ROW; ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[show_images_only]' /> <input type='checkbox' value='1' name='wpsc_options[show_images_only]' id='show_images_only' <?php echo $show_images_only_value; ?> /> <label for='show_images_only'><?php echo TXT_SHOW_IMAGES_ONLY; ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_variations]' /> <input type='checkbox' value='1' name='wpsc_options[display_variations]' id='display_variations' <?php echo $display_variations; ?> /> <label for='display_variations'><?php echo TXT_DISPLAY_VARIATIONS; ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_description]' /> <input type='checkbox' value='1' name='wpsc_options[display_description]' id='display_description' <?php echo $display_description; ?> /> <label for='display_description'><?php echo TXT_DISPLAY_DESCRIPTION; ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_addtocart]' /> <input type='checkbox' value='1' name='wpsc_options[display_addtocart]' id='display_addtocart' <?php echo $display_addtocart; ?> /> <label for='display_addtocart'><?php echo TXT_DISPLAY_ADDTOCART; ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_moredetails]' /> <input type='checkbox' value='1' name='wpsc_options[display_moredetails]' id='display_moredetails' <?php echo $display_moredetails; ?> /> <label for='display_moredetails'><?php echo TXT_DISPLAY_MOREDETAILS; ?> </label> </div> </td> </tr> <?php // } ?> <tr> <th scope="row"><?php echo TXT_WPSC_SELECT_THEME; ?> :</th> <td> <?php echo wpsc_list_product_themes(); ?> </td> </tr> <tr> <th scope="row"><?php echo TXT_WPSC_DEFAULTCATEGORY; ?> :</th> <td> <?php echo options_categorylist(); ?> </td> </tr> <?php $wpsc_sort_by = get_option('wpsc_sort_by'); switch ($wpsc_sort_by) { case 'name': $wpsc_sort_by1 = "selected ='selected'"; break; case 'price': $wpsc_sort_by2 = "selected ='selected'"; break; case 'id': default: $wpsc_sort_by3 = "selected ='selected'"; break; } ?> <tr> <th scope="row"> <?php echo TXT_WPSC_SORT_PRODUCT_BY; ?> : </th> <td> <select name='wpsc_options[wpsc_sort_by]'> <option <?php echo $wpsc_sort_by1; ?> value='name'><?php echo TXT_WPSC_NAME; ?> </option> <option <?php echo $wpsc_sort_by2; ?> value='price'><?php echo TXT_WPSC_PRICE; ?> </option> <option <?php echo $wpsc_sort_by3; ?> value='id'><?php echo TXT_WPSC_TIME_UPLOADED; ?> </option> </select> </td> </tr> <tr> <th scope="row"><?php echo TXT_WPSC_SHOW_BREADCRUMBS; ?> :</th> <td> <?php $show_breadcrumbs = get_option('show_breadcrumbs'); $show_breadcrumbs1 = ""; $show_breadcrumbs2 = ""; switch ($show_breadcrumbs) { case 0: $show_breadcrumbs2 = "checked ='checked'"; break; case 1: $show_breadcrumbs1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[show_breadcrumbs]' id='show_breadcrumbs1' <?php echo $show_breadcrumbs1; ?> /> <label for='show_breadcrumbs1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[show_breadcrumbs]' id='show_breadcrumbs2' <?php echo $show_breadcrumbs2; ?> /> <label for='show_breadcrumbs2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> <tr> <th scope="row"> <?php echo TXT_WPSC_CATSPRODS_DISPLAY_TYPE; ?> : </th> <td> <?php $display_pnp = get_option('catsprods_display_type'); $catsprods_display_type1 = ""; $catsprods_display_type2 = ""; switch ($display_pnp) { case 0: $catsprods_display_type1 = "checked ='checked'"; break; case 1: $catsprods_display_type2 = "checked ='checked'"; break; } ?> <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 TXT_WPSC_CATSPRODS_TYPE_CATONLY; ?> </label> <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 TXT_WPSC_CATSPRODS_TYPE_SLIDEPRODS; ?> </label> </td> </tr> <?php if (function_exists('gold_shpcrt_search_form')) { ?> <tr> <th scope="row"><?php echo TXT_WPSC_SHOW_SEARCH; ?> :</th> <td> <?php $display_pnp = get_option('show_search'); $show_search1 = ""; $show_search2 = ""; switch ($display_pnp) { case 0: $show_search2 = "checked ='checked'"; break; case 1: $show_search1 = "checked ='checked'"; break; } $display_advanced_search = get_option('show_advanced_search'); $show_advanced_search = ""; if ($display_advanced_search == 1) { $show_advanced_search = "checked ='checked'"; } $display_live_search = get_option('show_live_search'); if ($display_live_search == 1) { $show_live_search = "checked ='checked'"; } if ($show_search1 != "checked ='checked'") { $dis = "style='display:none;'"; } ?> <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 TXT_WPSC_YES; ?> </label> <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 TXT_WPSC_NO; ?> </label> <div <?php echo $dis; ?> id='wpsc_advanced_search'> <input type='hidden' name='wpsc_options[show_advanced_search]' value='0' /> <input type='checkbox' name='wpsc_options[show_advanced_search]' id='show_advanced_search' <?php echo $show_advanced_search; ?> value='1' /> <?php echo TXT_WPSC_SHOWADVANCEDSEARCH; ?> <br /> <input type='hidden' name='wpsc_options[show_live_search]' value='0' /> <input type='checkbox' name='wpsc_options[show_live_search]' id='show_live_search' <?php echo $show_live_search; ?> value='1' /> <?php echo TXT_WPSC_SHOWLIVESEARCH; ?> </div> </td> </tr> <?php } ?> <tr> <th scope="row"><?php echo TXT_WPSC_REPLACE_PAGE_TITLE; ?> :</th> <td> <?php $wpsc_replace_page_title = get_option('wpsc_replace_page_title'); $wpsc_replace_page_title1 = ""; $wpsc_replace_page_title2 = ""; switch ($wpsc_replace_page_title) { case 0: $wpsc_replace_page_title2 = "checked ='checked'"; break; case 1: $wpsc_replace_page_title1 = "checked ='checked'"; break; } ?> <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 TXT_WPSC_YES; ?> </label> <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 TXT_WPSC_NO; ?> </label> </td> </tr> </table> <h3 class="form_group"><?php echo TXT_WPSC_CARTSETTINGS; ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo TXT_WPSC_CARTLOCATION; ?> :</th> <td> <?php $cart_location = get_option('cart_location'); $cart1 = ""; $cart2 = ""; switch ($cart_location) { case 1: $cart1 = "checked ='checked'"; break; case 2: $cart2 = "checked ='checked'"; break; case 3: $cart3 = "checked ='checked'"; break; case 4: $cart4 = "checked ='checked'"; break; case 5: $cart5 = "checked ='checked'"; break; } if (function_exists('register_sidebar_widget')) { ?> <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 TXT_WPSC_SIDEBAR; ?> </label> <?php } else { ?> <input type='radio' value='1' name='wpsc_options[cart_location]' id='cart1' <?php echo $cart1; ?> /> <label for='cart1'><?php echo TXT_WPSC_SIDEBAR; ?> </label> <?php } ?> <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 TXT_WPSC_PAGE; ?> </label> <?php if (function_exists('register_sidebar_widget')) { ?> <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 TXT_WPSC_WIDGET; ?> </label> <?php } else { ?> <input type='radio' disabled='disabled' value='4' name='wpsc_options[cart_location]' id='cart4' alt='<?php echo TXT_WPSC_NEEDTOENABLEWIDGET; ?> ' title='<?php echo TXT_WPSC_NEEDTOENABLEWIDGET; ?> ' <?php echo $cart4; ?> /> <label style='color: #666666;' for='cart4' title='<?php echo TXT_WPSC_NEEDTOENABLEWIDGET; ?> '><?php echo TXT_WPSC_WIDGET; ?> </label> <?php } if (function_exists('drag_and_drop_cart')) { ?> <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 TXT_WPSC_GOLD_DROPSHOP; ?> </label> <?php } else { ?> <input type='radio' disabled='disabled' value='5' name='wpsc_options[cart_location]' id='cart5' alt='<?php echo TXT_WPSC_NEEDTOENABLEWIDGET; ?> ' title='<?php echo TXT_WPSC_NEEDTOENABLEDROPSHOP; ?> ' <?php echo $cart5; ?> /> <label style='color: #666666;' for='cart5' title='<?php echo TXT_WPSC_NEEDTOENABLEDROPSHOP; ?> '><?php echo TXT_WPSC_GOLD_DROPSHOP; ?> </label> <?php } ?> <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 TXT_WPSC_MANUAL; ?> <span style='font-size: 7pt;'>(PHP code: <?php echo nzshpcrt_shopping_basket(); ?> )</span></label> <div style='display: <?php if (isset($cart5)) { echo "block"; } else { echo "none"; } ?> ;' id='dropshop_option'> <p> <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 TXT_WPSC_SHOW_DROPSHOP_ALL; ?> </label> <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 TXT_WPSC_SHOW_DROPSHOP_PRODUCT; ?> </label> </p> <p> <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 TXT_WPSC_DROPSHOP_LIGHT; ?> </label> <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 TXT_WPSC_DROPSHOP_DARK; ?> </label> <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 TXT_WPSC_DROPSHOP_CRAFTYC; ?> </label> </p> </div> </td> </tr> <tr> <th scope="row"> <?php echo TXT_WPSC_SHOW_SLIDING_CART; ?> : </th> <td> <?php $display_pnp = get_option('show_sliding_cart'); $show_sliding_cart1 = ""; $show_sliding_cart2 = ""; switch ($display_pnp) { case 0: $show_sliding_cart2 = "checked ='checked'"; break; case 1: $show_sliding_cart1 = "checked ='checked'"; break; } ?> <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 TXT_WPSC_YES; ?> </label> <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 TXT_WPSC_NO; ?> </label> </td> </tr> <tr> <th scope="row"> <?php echo TXT_WPSC_DISPLAY_PLUSTAX; ?> : </th> <td> <?php $add_plustax = get_option('add_plustax'); $add_plustax1 = ""; $add_plustax2 = ""; switch ($add_plustax) { case 0: $add_plustax2 = "checked ='checked'"; break; case 1: $add_plustax1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[add_plustax]' id='add_plustax1' <?php echo $add_plustax1; ?> /> <label for='add_plustax1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[add_plustax]' id='add_plustax2' <?php echo $add_plustax2; ?> /> <label for='add_plustax2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> </table> <h3 class="form_group"><?php echo TXT_WPSC_GROUP_SETTINGS; ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo TXT_WPSC_SHOW_CATEGORY_DESCRIPTION; ?> :</th> <td> <?php $wpsc_category_description = get_option('wpsc_category_description'); $wpsc_category_description1 = ""; $wpsc_category_description2 = ""; switch ($wpsc_category_description) { case '1': $wpsc_category_description1 = "checked ='checked'"; break; case '0': default: $wpsc_category_description2 = "checked ='checked'"; break; } ?> <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 TXT_WPSC_YES; ?> </label> <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 TXT_WPSC_NO; ?> </label> </td> </tr> <tr> <th scope="row"> <?php echo TXT_WPSC_SHOWCATEGORYTHUMBNAILS; ?> : </th> <td> <?php $show_category_thumbnails = get_option('show_category_thumbnails'); $show_category_thumbnails1 = ""; $show_category_thumbnails2 = ""; switch ($show_category_thumbnails) { case 0: $show_category_thumbnails2 = "checked ='checked'"; break; case 1: $show_category_thumbnails1 = "checked ='checked'"; break; } ?> <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 TXT_WPSC_YES; ?> </label> <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 TXT_WPSC_NO; ?> </label> </td> </tr> <!-- // Adrian - options for displaying number of products per category --> <tr> <th scope="row"> <?php echo TXT_WPSC_SHOW_CATEGORY_COUNT; ?> : </th> <td> <?php $display_pnp = get_option('show_category_count'); $show_category_count1 = ""; $show_category_count2 = ""; switch ($display_pnp) { case 0: $show_category_count2 = "checked ='checked'"; break; case 1: $show_category_count1 = "checked ='checked'"; break; } ?> <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 TXT_WPSC_YES; ?> </label> <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 TXT_WPSC_NO; ?> </label> </td> </tr> <!-- // Adrian - options for displaying category display type --> <tr> <th scope="row"><?php _e("Use Category Grid View", 'wpsc'); ?> :</th> <td> <?php $wpsc_category_grid_view = get_option('wpsc_category_grid_view'); $wpsc_category_grid_view1 = ""; $wpsc_category_grid_view2 = ""; switch ($wpsc_category_grid_view) { case '1': $wpsc_category_grid_view1 = "checked ='checked'"; break; case '0': default: $wpsc_category_grid_view2 = "checked ='checked'"; break; } ?> <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 TXT_WPSC_YES; ?> </label> <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 TXT_WPSC_NO; ?> </label> </td> </tr> </table> <h3 class="form_group"><a name='thumb_settings'><?php echo TXT_WPSC_THUMBNAILSETTINGS; ?> </a></h3> <table class='wpsc_options form-table'> <?php if (function_exists("getimagesize")) { ?> <tr> <th scope="row"><?php echo TXT_WPSC_PRODUCTTHUMBNAILSIZE; ?> :</th> <td> <?php echo TXT_WPSC_HEIGHT; ?> :<input type='text' size='6' name='wpsc_options[product_image_height]' class='wpsc_prod_thumb_option' value='<?php echo get_option('product_image_height'); ?> ' /> <?php echo TXT_WPSC_WIDTH; ?> :<input type='text' size='6' name='wpsc_options[product_image_width]' class='wpsc_prod_thumb_option' value='<?php echo get_option('product_image_width'); ?> ' /> <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> <br /> </td> </tr> <tr> <th scope="row"> <?php echo TXT_WPSC_CATEGORYTHUMBNAILSIZE; ?> : </th> <td> <?php echo TXT_WPSC_HEIGHT; ?> :<input type='text' size='6' name='wpsc_options[category_image_height]' value='<?php echo get_option('category_image_height'); ?> ' /> <?php echo TXT_WPSC_WIDTH; ?> :<input type='text' size='6' name='wpsc_options[category_image_width]' value='<?php echo get_option('category_image_width'); ?> ' /> </td> </tr> <tr> <th scope="row"> <?php echo TXT_WPSC_SINGLE_PRODUCTTHUMBNAILSIZE; ?> : </th> <td> <?php echo TXT_WPSC_HEIGHT; ?> :<input type='text' size='6' name='wpsc_options[single_view_image_height]' value='<?php echo get_option('single_view_image_height'); ?> ' /> <?php echo TXT_WPSC_WIDTH; ?> :<input type='text' size='6' name='wpsc_options[single_view_image_width]' value='<?php echo get_option('single_view_image_width'); ?> ' /> </td> </tr> <?php } ?> <tr> <th scope="row"><?php echo TXT_WPSC_SHOWTHUMBNAILS; ?> :</th> <td> <?php $show_thumbnails = get_option('show_thumbnails'); $show_thumbnails1 = ""; $show_thumbnails2 = ""; switch ($show_thumbnails) { case 0: $show_thumbnails2 = "checked ='checked'"; break; case 1: $show_thumbnails1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[show_thumbnails]' id='show_thumbnails1' <?php echo $show_thumbnails1; ?> /> <label for='show_thumbnails1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[show_thumbnails]' id='show_thumbnails2' <?php echo $show_thumbnails2; ?> /> <label for='show_thumbnails2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> <?php if (function_exists('gold_shpcrt_display_gallery')) { ?> <tr> <th scope="row"> <?php echo TXT_WPSC_SHOW_GALLERY; ?> : </th> <td> <?php $display_pnp = get_option('show_gallery'); $show_gallery1 = ""; $show_gallery2 = ""; switch ($display_pnp) { case 0: $show_gallery2 = "checked ='checked'"; break; case 1: $show_gallery1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[show_gallery]' id='show_gallery1' <?php echo $show_gallery1; ?> /> <label for='show_gallery1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='0' name='wpsc_options[show_gallery]' id='show_gallery2' <?php echo $show_gallery2; ?> /> <label for='show_gallery2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> <tr> <th scope="row"> <?php _e("Gallery Thumbnail Image Size"); ?> : </th> <td> <?php echo TXT_WPSC_HEIGHT; ?> :<input type='text' size='6' name='wpsc_options[wpsc_gallery_image_height]' value='<?php echo get_option('wpsc_gallery_image_height'); ?> ' /> <?php echo TXT_WPSC_WIDTH; ?> :<input type='text' size='6' name='wpsc_options[wpsc_gallery_image_width]' value='<?php echo get_option('wpsc_gallery_image_width'); ?> ' /> <br /> </td> </tr> <?php } ?> </table> <h3 class="form_group"><?php echo TXT_WPSC_PAGESETTINGS; ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"> <?php echo TXT_WPSC_USE_PAGINATION; ?> : </th> <td> <?php $use_pagination = get_option('use_pagination'); $use_pagination1 = ""; $use_pagination2 = ""; switch ($use_pagination) { case 0: $use_pagination2 = "checked ='checked'"; $page_count_display_state = 'style=\'display: none;\''; break; case 1: $use_pagination1 = "checked ='checked'"; $page_count_display_state = ''; break; } ?> <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 TXT_WPSC_YES; ?> </label> <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 TXT_WPSC_NO; ?> </label><br /> <div id='wpsc_products_per_page' <?php echo $page_count_display_state; ?> > <input type='text' size='6' name='wpsc_options[wpsc_products_per_page]' value='<?php echo get_option('wpsc_products_per_page'); ?> ' /> <?php echo TXT_WPSC_OPTION_PRODUCTS_PER_PAGE; ?> </div> </td> </tr> <tr> <th scope="row"> <?php echo TXT_WPSC_PAGE_NUMBER_POSITION; ?> : </th> <td> <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 TXT_WPSC_PAGENUMBER_POSITION_TOP; ?> </label> <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 TXT_WPSC_PAGENUMBER_POSITION_BOTTOM; ?> </label> <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 TXT_WPSC_PAGENUMBER_POSITION_BOTH; ?> </label> <br /> </td> </tr> </table> <h3 class="form_group"><?php echo TXT_WPSC_COMMENTSETTINGS; ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"> <?php echo TXT_WPSC_ENABLE_COMMENTS; ?> : <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> </th> <td> <?php $enable_comments = get_option('wpsc_enable_comments'); $enable_comments1 = ""; $enable_comments2 = ""; switch ($enable_comments) { case 1: $enable_comments1 = "checked ='checked'"; $intense_debate_account_id_display_state = ''; break; default: case 0: $enable_comments2 = "checked ='checked'"; $intense_debate_account_id_display_state = 'style=\'display: none;\''; break; } ?> <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 TXT_WPSC_YES; ?> </label> <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 TXT_WPSC_NO; ?> </label><br /> <div id='wpsc_enable_comments' <?php echo $intense_debate_account_id_display_state; ?> > <?php echo TXT_WPSC_INTENSE_DEBATE_ACCOUNT_ID; ?> :<br/> <input type='text' size='30' name='wpsc_options[wpsc_intense_debate_account_id]' value='<?php echo get_option('wpsc_intense_debate_account_id'); ?> ' /><br/> <small><a href='http://intensedebate.com/sitekey/' title='Help finding the Account ID'><?php _e('Help on finding the Account ID'); ?> </a></small> </div> </td> </tr> <tr> <th scope="row"> <div class='wpsc_comments_details' <?php echo $intense_debate_account_id_display_state; ?> > <?php echo TXT_WPSC_COMMENTS_WHICH_PRODUCTS; ?> : </div> </th> <td> <div class='wpsc_comments_details' <?php echo $intense_debate_account_id_display_state; ?> > <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> <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> <br /> </div> </td> </tr> </table> <?php /* here end the presentation options */ ?> <div class="submit"> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type="submit" value="<?php echo TXT_WPSC_UPDATE_BUTTON; ?> " name="updateoption" /> </div> </div> </form> <?php }
function wpsc_options_presentation() { global $wpdb; ?> <form name='cart_options' id='cart_options' method='post' action=''> <div id="options_presentation"> <h2><?php echo __('Presentation Settings', 'wpsc'); ?> </h2> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <div class='product_and_button_settings'> <h3 class="form_group"><?php echo __('Button Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo __('Button Type', 'wpsc'); ?> :</th> <td> <?php $addtocart_or_buynow = get_option('addtocart_or_buynow'); $addtocart_or_buynow1 = ""; $addtocart_or_buynow2 = ""; switch ($addtocart_or_buynow) { case 0: $addtocart_or_buynow1 = "checked ='checked'"; break; case 1: $addtocart_or_buynow2 = "checked ='checked'"; break; } ?> <input type='radio' value='0' name='wpsc_options[addtocart_or_buynow]' id='addtocart_or_buynow1' <?php echo $addtocart_or_buynow1; ?> /> <label for='addtocart_or_buynow1'><?php echo __('Add To Cart', 'wpsc'); ?> </label> <br /> <input type='radio' value='1' name='wpsc_options[addtocart_or_buynow]' id='addtocart_or_buynow2' <?php echo $addtocart_or_buynow2; ?> /> <label for='addtocart_or_buynow2'><?php echo __('Buy Now', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"><?php echo __('Hide "Add to cart" button', 'wpsc'); ?> : </th> <td> <?php $hide_addtocart_button = get_option('hide_addtocart_button'); $hide_addtocart_button1 = ""; $hide_addtocart_button2 = ""; switch ($hide_addtocart_button) { case 0: $hide_addtocart_button2 = "checked ='checked'"; break; case 1: $hide_addtocart_button1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> </table> <h3 class="form_group"><?php echo __('Product Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo __('Show Product Ratings', 'wpsc'); ?> :</th> <td> <?php $display_pnp = get_option('product_ratings'); $product_ratings1 = ""; $product_ratings2 = ""; switch ($display_pnp) { case 0: $product_ratings2 = "checked ='checked'"; break; case 1: $product_ratings1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> <tr> <th scope="row"> <?php echo __('Display Fancy Purchase Notifications', 'wpsc'); ?> : </th> <td> <?php $fancy_notifications = get_option('fancy_notifications'); $fancy_notifications1 = ""; $fancy_notifications2 = ""; switch ($fancy_notifications) { case 0: $fancy_notifications2 = "checked ='checked'"; break; case 1: $fancy_notifications1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> <tr> <th scope="row"><?php echo __('Show Postage and Packaging', 'wpsc'); ?> :</th> <td> <?php $display_pnp = get_option('display_pnp'); $display_pnp1 = ""; $display_pnp2 = ""; switch ($display_pnp) { case 0: $display_pnp2 = "checked ='checked'"; break; case 1: $display_pnp1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> <tr> <th scope="row"><?php echo __('Disable link in Title', 'wpsc'); ?> : </th> <td> <?php $hide_name_link = get_option('hide_name_link'); $hide_name_link1 = ""; $hide_name_link2 = ""; switch ($hide_name_link) { case 0: $hide_name_link2 = "checked ='checked'"; break; case 1: $hide_name_link1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[hide_name_link]' id='hide_name_link1' <?php echo $hide_name_link1; ?> /> <label for='hide_name_link1'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[hide_name_link]' id='hide_name_link2' <?php echo $hide_name_link2; ?> /> <label for='hide_name_link2'><?php echo __('No', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"><?php echo __('Add quantity field to each product description', 'wpsc'); ?> :</th> <td> <?php $multi_adding = get_option('multi_add'); switch ($multi_adding) { case 1: $multi_adding1 = "checked ='checked'"; break; case 0: $multi_adding2 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[multi_add]' id='multi_adding1' <?php echo $multi_adding1; ?> /> <label for='multi_adding1'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[multi_add]' id='multi_adding2' <?php echo $multi_adding2; ?> /> <label for='multi_adding2'><?php echo __('No', 'wpsc'); ?> </label> </td> </tr> </table> </div> <div class='themes_and_appearance'> <h4><?php _e("Theme Customisation", 'wpsc'); ?> </h4> <?php if ($_SESSION['wpsc_themes_copied'] == true) { ?> <div class="updated fade below-h2" id="message" style="background-color: rgb(255, 251, 204);"> <p><?php _e("Thanks, the themes have been copied."); ?> </p> </div> <?php $_SESSION['wpsc_themes_copied'] = false; } ?> <?php if (wpsc_count_themes_in_uploads_directory() > 0) { ?> <p><?php _e("Theming your stores appearance is easy."); ?> </p> <p> <?php _e("You just need to edit the appropriate files in the following location.", 'wpsc'); ?> <br /><br /> <span class='display-path'><strong><?php _e("Path:", 'wpsc'); ?> </strong> <?php echo str_replace(ABSPATH, "", WPSC_THEMES_PATH) . WPSC_THEME_DIR . "/"; ?> </span> </p> <p><strong><?php _e("To create a new theme:", 'wpsc'); ?> </strong></p> <ol> <li><?php _e("Copy the default directory and rename it 'newTheme'"); ?> </li> <li><?php _e("Rename the default.css file inside the 'newTheme' directory to 'newTheme.css'"); ?> </li> </ol> <?php } else { if (!is_writable(WPSC_THEMES_PATH)) { ?> <p><?php _e("The permissions on your themes directory are incorrect.", 'wpsc'); ?> </p> <p><?php _e("Please set the permissions to 775 on the following directory.", 'wpsc'); ?> <br /><br /> <span class='display-path'><strong><?php _e("Path:", 'wpsc'); ?> </strong> <?php echo str_replace(ABSPATH, "", WPSC_THEMES_PATH) . WPSC_THEME_DIR . "/"; ?> </span></p> <?php } else { ?> <p><?php _e("Your theme files have not been moved. Until your theme files have been moved, we have disabled automatic upgrades.", 'wpsc'); ?> <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> <?php } } ?> <p><a href='http://www.instinct.co.nz/e-commerce/docs/'><?php _e("Read Tutorials", 'wpsc'); ?> </a></p> </div> <div style='clear:both;'></div> <h3 class="form_group"><?php echo __('Product Page Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo __('Catalog View', 'wpsc'); ?> :</th> <td> <?php $display_pnp = get_option('product_view'); $product_view1 = null; $product_view2 = null; $product_view3 = null; switch ($display_pnp) { case "grid": if (function_exists('product_display_grid')) { $product_view3 = "selected ='selected'"; break; } case "list": if (function_exists('product_display_list')) { $product_view2 = "selected ='selected'"; break; } default: $product_view1 = "selected ='selected'"; break; } if (get_option('list_view_quantity') == 1) { $list_view_quantity_value = "checked='checked'"; } else { $list_view_quantity_value = ''; } if (get_option('show_images_only') == 1) { $show_images_only_value = "checked='checked'"; } else { $show_images_only_value = ''; } if (get_option('display_variations') == 1) { $display_variations = "checked='checked'"; } else { $display_variations = ''; } if (get_option('display_description') == 1) { $display_description = "checked='checked'"; } else { $display_description = ''; } if (get_option('display_addtocart') == 1) { $display_addtocart = "checked='checked'"; } else { $display_addtocart = ''; } if (get_option('display_moredetails') == 1) { $display_moredetails = "checked='checked'"; } else { $display_moredetails = ''; } ?> <select name='wpsc_options[product_view]' onchange="toggle_display_options(this.options[this.selectedIndex].value)"> <option value='default' <?php echo $product_view1; ?> ><?php echo __('Default View', 'wpsc'); ?> </option> <?php if (function_exists('product_display_list')) { ?> <option value='list' <?php echo $product_view2; ?> ><?php echo __('List View', 'wpsc'); ?> </option> <?php } else { ?> <option value='list' disabled='disabled' <?php echo $product_view2; ?> ><?php echo __('List View', 'wpsc'); ?> </option> <?php } if (function_exists('product_display_grid')) { ?> <option value='grid' <?php echo $product_view3; ?> ><?php echo __('Grid View', 'wpsc'); ?> </option> <?php } else { ?> <option value='grid' disabled='disabled' <?php echo $product_view3; ?> ><?php echo __('Grid View', 'wpsc'); ?> </option> <?php } ?> </select> <?php if (!function_exists('product_display_grid')) { ?> <a href='http://getshopped.org/extend/premium-upgrades/'><?php echo __('Purchase unavailable options', 'wpsc'); ?> </a> <?php } ?> <div id='list_view_options' <?php if (is_null($product_view2)) { echo "style='display:none;'"; } ?> > <input type='checkbox' value='1' name='wpsc_options[list_view_quantity]' id='list_view_quantity' <?php echo $list_view_quantity_value; ?> /> <label for='list_view_options'><?php echo __('Show quantity form in list view', 'wpsc'); ?> </label> </div> <div id='grid_view_options' <?php echo $list_view_quantity_style; ?> <?php if (is_null($product_view3)) { echo "style='display:none;'"; } ?> > <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'); ?> ' /> <label for='grid_number_per_row'><?php echo __('Products Per Row', 'wpsc'); ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[show_images_only]' /> <input type='checkbox' value='1' name='wpsc_options[show_images_only]' id='show_images_only' <?php echo $show_images_only_value; ?> /> <label for='show_images_only'><?php echo __('Show images only', 'wpsc'); ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_variations]' /> <input type='checkbox' value='1' name='wpsc_options[display_variations]' id='display_variations' <?php echo $display_variations; ?> /> <label for='display_variations'><?php echo __('Display Variations', 'wpsc'); ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_description]' /> <input type='checkbox' value='1' name='wpsc_options[display_description]' id='display_description' <?php echo $display_description; ?> /> <label for='display_description'><?php echo __('Display Description', 'wpsc'); ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_addtocart]' /> <input type='checkbox' value='1' name='wpsc_options[display_addtocart]' id='display_addtocart' <?php echo $display_addtocart; ?> /> <label for='display_addtocart'><?php echo __('Display "Add To Cart" Button', 'wpsc'); ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_moredetails]' /> <input type='checkbox' value='1' name='wpsc_options[display_moredetails]' id='display_moredetails' <?php echo $display_moredetails; ?> /> <label for='display_moredetails'><?php echo __('Display "More Details" Button', 'wpsc'); ?> </label> </div> </td> </tr> <?php // } ?> <tr> <th scope="row"><?php echo __('Theme', 'wpsc'); ?> :</th> <td> <?php echo wpsc_list_product_themes(); ?> </td> </tr> <tr> <th scope="row"><?php echo __('Product page displays', 'wpsc'); ?> :</th> <td> <?php echo options_categorylist(); ?> </td> </tr> <?php $wpsc_sort_by = get_option('wpsc_sort_by'); switch ($wpsc_sort_by) { case 'name': $wpsc_sort_by1 = "selected ='selected'"; break; case 'price': $wpsc_sort_by2 = "selected ='selected'"; break; case 'dragndrop': $wpsc_sort_by4 = "selected='selected'"; break; case 'id': default: $wpsc_sort_by3 = "selected ='selected'"; break; } ?> <tr> <th scope="row"> <?php echo __('Sort Products By', 'wpsc'); ?> : </th> <td> <select name='wpsc_options[wpsc_sort_by]'> <option <?php echo $wpsc_sort_by1; ?> value='name'><?php echo __('Name', 'wpsc'); ?> </option> <option <?php echo $wpsc_sort_by2; ?> value='price'><?php echo __('Price', 'wpsc'); ?> </option> <option <?php echo $wpsc_sort_by4; ?> value='dragndrop'><?php echo __('Drag & Drop', 'wpsc'); ?> </option> <option <?php echo $wpsc_sort_by3; ?> value='id'><?php echo __('Time Uploaded', 'wpsc'); ?> </option> </select><br /> <?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 & Drop option.', 'wpsc'); ?> </td> </tr> <tr> <th scope="row"><?php echo __('Show Breadcrumbs', 'wpsc'); ?> :</th> <td> <?php $show_breadcrumbs = get_option('show_breadcrumbs'); $show_breadcrumbs1 = ""; $show_breadcrumbs2 = ""; switch ($show_breadcrumbs) { case 0: $show_breadcrumbs2 = "checked ='checked'"; break; case 1: $show_breadcrumbs1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> <tr> <th scope="row"> <?php echo __('Product Groups/Products Display', 'wpsc'); ?> : </th> <td> <?php $display_pnp = get_option('catsprods_display_type'); $catsprods_display_type1 = ""; $catsprods_display_type2 = ""; switch ($display_pnp) { case 0: $catsprods_display_type1 = "checked ='checked'"; break; case 1: $catsprods_display_type2 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> <tr> <th scope="row"> <?php echo __('Show Subcategory Products in Parent Category', 'wpsc'); ?> : </th> <td> <?php $show_subcatsprods_in_cat = get_option('show_subcatsprods_in_cat'); $show_subcatsprods_in_cat_on = ''; $show_subcatsprods_in_cat_off = ''; switch ($show_subcatsprods_in_cat) { case 1: $show_subcatsprods_in_cat_on = 'checked="checked"'; break; case 0: $show_subcatsprods_in_cat_off = 'checked="checked"'; break; } ?> <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> <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> </td> </tr> <?php if (function_exists('gold_shpcrt_search_form')) { ?> <tr> <th scope="row"><?php echo __('Show Search', 'wpsc'); ?> :</th> <td> <?php $display_pnp = get_option('show_search'); $show_search1 = ""; $show_search2 = ""; switch ($display_pnp) { case 0: $show_search2 = "checked ='checked'"; break; case 1: $show_search1 = "checked ='checked'"; break; } $display_advanced_search = get_option('show_advanced_search'); $show_advanced_search = ""; if ($display_advanced_search == 1) { $show_advanced_search = "checked ='checked'"; } $display_live_search = get_option('show_live_search'); if ($display_live_search == 1) { $show_live_search = "checked ='checked'"; } if ($show_search1 != "checked ='checked'") { $dis = "style='display:none;'"; } ?> <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> <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> <div <?php echo $dis; ?> id='wpsc_advanced_search'> <input type='hidden' name='wpsc_options[show_advanced_search]' value='0' /> <input type='checkbox' name='wpsc_options[show_advanced_search]' id='show_advanced_search' <?php echo $show_advanced_search; ?> value='1' /> <?php echo __('Show Advanced Search', 'wpsc'); ?> <br /> <input type='hidden' name='wpsc_options[show_live_search]' value='0' /> <input type='checkbox' name='wpsc_options[show_live_search]' id='show_live_search' <?php echo $show_live_search; ?> value='1' /> <?php echo __('Use Live Search', 'wpsc'); ?> </div> </td> </tr> <?php } ?> <tr> <th scope="row"><?php echo __('Replace Page Title With Product/Category Name', 'wpsc'); ?> :</th> <td> <?php $wpsc_replace_page_title = get_option('wpsc_replace_page_title'); $wpsc_replace_page_title1 = ""; $wpsc_replace_page_title2 = ""; switch ($wpsc_replace_page_title) { case 0: $wpsc_replace_page_title2 = "checked ='checked'"; break; case 1: $wpsc_replace_page_title1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> </table> <h3 class="form_group"><?php echo __('Shopping Cart Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo __('Cart Location', 'wpsc'); ?> :</th> <td> <?php $cart_location = get_option('cart_location'); $cart1 = ""; $cart2 = ""; switch ($cart_location) { case 1: $cart1 = "checked ='checked'"; break; case 2: $cart2 = "checked ='checked'"; break; case 3: $cart3 = "checked ='checked'"; break; case 4: $cart4 = "checked ='checked'"; break; case 5: $cart5 = "checked ='checked'"; break; } if (function_exists('register_sidebar_widget')) { ?> <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> <?php } else { ?> <input type='radio' value='1' name='wpsc_options[cart_location]' id='cart1' <?php echo $cart1; ?> /> <label for='cart1'><?php echo __('Sidebar', 'wpsc'); ?> </label> <?php } ?> <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> <?php if (function_exists('register_sidebar_widget')) { ?> <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> <?php } else { ?> <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> <?php } if (function_exists('drag_and_drop_cart')) { ?> <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> <?php } else { ?> <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> <?php } ?> <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: <?php echo nzshpcrt_shopping_basket(); ?> )</span></label> <div style='display: <?php if (isset($cart5)) { echo "block"; } else { echo "none"; } ?> ;' id='dropshop_option'> <p> <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> <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> </p> <p> <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> <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> <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> </p> </div> </td> </tr> <tr> <th scope="row"> <?php echo __('Use Sliding Cart', 'wpsc'); ?> : </th> <td> <?php $display_pnp = get_option('show_sliding_cart'); $show_sliding_cart1 = ""; $show_sliding_cart2 = ""; switch ($display_pnp) { case 0: $show_sliding_cart2 = "checked ='checked'"; break; case 1: $show_sliding_cart1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> <tr> <th scope="row"> <?php echo __('Display "+ Postage & Tax"', 'wpsc'); ?> : </th> <td> <?php $add_plustax = get_option('add_plustax'); $add_plustax1 = ""; $add_plustax2 = ""; switch ($add_plustax) { case 0: $add_plustax2 = "checked ='checked'"; break; case 1: $add_plustax1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> </table> <h3 class="form_group"><?php echo __('Product Group Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo __('Show Product Group Description', 'wpsc'); ?> :</th> <td> <?php $wpsc_category_description = get_option('wpsc_category_description'); $wpsc_category_description1 = ""; $wpsc_category_description2 = ""; switch ($wpsc_category_description) { case '1': $wpsc_category_description1 = "checked ='checked'"; break; case '0': default: $wpsc_category_description2 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> <tr> <th scope="row"> <?php echo __('Show Product Group Thumbnails', 'wpsc'); ?> : </th> <td> <?php $show_category_thumbnails = get_option('show_category_thumbnails'); $show_category_thumbnails1 = ""; $show_category_thumbnails2 = ""; switch ($show_category_thumbnails) { case 0: $show_category_thumbnails2 = "checked ='checked'"; break; case 1: $show_category_thumbnails1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> <!-- // Adrian - options for displaying number of products per category --> <tr> <th scope="row"> <?php echo __('Show Product Count per Product Group', 'wpsc'); ?> : </th> <td> <?php $display_pnp = get_option('show_category_count'); $show_category_count1 = ""; $show_category_count2 = ""; switch ($display_pnp) { case 0: $show_category_count2 = "checked ='checked'"; break; case 1: $show_category_count1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> <!-- // Adrian - options for displaying category display type --> <tr> <th scope="row"><?php _e("Use Category Grid View", 'wpsc'); ?> :</th> <td> <?php $wpsc_category_grid_view = get_option('wpsc_category_grid_view'); $wpsc_category_grid_view1 = ""; $wpsc_category_grid_view2 = ""; switch ($wpsc_category_grid_view) { case '1': $wpsc_category_grid_view1 = "checked ='checked'"; break; case '0': default: $wpsc_category_grid_view2 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> </table> <h3 class="form_group"><a name='thumb_settings'><?php echo __('Thumbnail Settings', 'wpsc'); ?> </a></h3> <table class='wpsc_options form-table'> <?php if (function_exists("getimagesize")) { ?> <tr> <th scope="row"><?php echo __('Default Product Thumbnail Size', 'wpsc'); ?> :</th> <td> <?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'); ?> ' /> <?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'); ?> ' /> <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> <br /> </td> </tr> <tr> <th scope="row"> <?php echo __('Default Product Group Thumbnail Size', 'wpsc'); ?> : </th> <td> <?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'); ?> ' /> </td> </tr> <tr> <th scope="row"> <?php echo __('Single Product Image Size', 'wpsc'); ?> : </th> <td> <?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'); ?> ' /> </td> </tr> <?php } ?> <tr> <th scope="row"><?php echo __('Show Thumbnails', 'wpsc'); ?> :</th> <td> <?php $show_thumbnails = get_option('show_thumbnails'); $show_thumbnails1 = ""; $show_thumbnails2 = ""; switch ($show_thumbnails) { case 0: $show_thumbnails2 = "checked ='checked'"; break; case 1: $show_thumbnails1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> <?php if (function_exists('gold_shpcrt_display_gallery')) { ?> <tr> <th scope="row"> <?php echo __('Show Thumbnail Gallery', 'wpsc'); ?> : </th> <td> <?php $display_pnp = get_option('show_gallery'); $show_gallery1 = ""; $show_gallery2 = ""; switch ($display_pnp) { case 0: $show_gallery2 = "checked ='checked'"; break; case 1: $show_gallery1 = "checked ='checked'"; break; } ?> <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> <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> </td> </tr> <tr> <th scope="row"> <?php _e("Gallery Thumbnail Image Size"); ?> : </th> <td> <?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'); ?> ' /> <?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 /> </td> </tr> <?php } ?> </table> <h3 class="form_group"><?php echo __('Pagination settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"> <?php echo __('Use Pagination', 'wpsc'); ?> : </th> <td> <?php $use_pagination = get_option('use_pagination'); $use_pagination1 = ""; $use_pagination2 = ""; switch ($use_pagination) { case 0: $use_pagination2 = "checked ='checked'"; $page_count_display_state = 'style=\'display: none;\''; break; case 1: $use_pagination1 = "checked ='checked'"; $page_count_display_state = ''; break; } ?> <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> <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 /> <div id='wpsc_products_per_page' <?php echo $page_count_display_state; ?> > <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'); ?> </div> </td> </tr> <tr> <th scope="row"> <?php echo __('Page Number position', 'wpsc'); ?> : </th> <td> <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> <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> <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> <br /> </td> </tr> </table> <h3 class="form_group"><?php echo __('Comment Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"> <?php echo __('Use IntenseDebate Comments', 'wpsc'); ?> : <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> </th> <td> <?php $enable_comments = get_option('wpsc_enable_comments'); $enable_comments1 = ""; $enable_comments2 = ""; switch ($enable_comments) { case 1: $enable_comments1 = "checked ='checked'"; $intense_debate_account_id_display_state = ''; break; default: case 0: $enable_comments2 = "checked ='checked'"; $intense_debate_account_id_display_state = 'style=\'display: none;\''; break; } ?> <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> <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 /> <div id='wpsc_enable_comments' <?php echo $intense_debate_account_id_display_state; ?> > <?php echo __('IntenseDebate Account ID', 'wpsc'); ?> :<br/> <input type='text' size='30' name='wpsc_options[wpsc_intense_debate_account_id]' value='<?php echo get_option('wpsc_intense_debate_account_id'); ?> ' /><br/> <small><a href='http://intensedebate.com/sitekey/' title='Help finding the Account ID'><?php _e('Help on finding the Account ID'); ?> </a></small> </div> </td> </tr> <tr> <th scope="row"> <div class='wpsc_comments_details' <?php echo $intense_debate_account_id_display_state; ?> > <?php echo __('By Default Display Comments on', 'wpsc'); ?> : </div> </th> <td> <div class='wpsc_comments_details' <?php echo $intense_debate_account_id_display_state; ?> > <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> <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> <br /> </div> </td> </tr> </table> <?php /* here end the presentation options */ ?> <div class="submit"> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type="submit" value="<?php echo __('Update »', 'wpsc'); ?> " name="updateoption" /> </div> </div> </form> <?php }
/** * options presentation is the main function for displaying the WP-Admin : Settings > Presentation page * @access public * * @since 3.7 * @param null * @return null */ function wpsc_options_presentation() { global $wpdb; ?> <form name='cart_options' id='cart_options' method='post' action='' class='wpsc_form_track'> <div id="options_presentation"> <?php wpsc_settings_page_update_notification(); ?> <div class='product_and_button_settings'> <h3 class="form_group"><?php _e('Button Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php _e('Button Type', 'wpsc'); ?> :</th> <td> <?php $addtocart_or_buynow = get_option('addtocart_or_buynow'); $addtocart_or_buynow1 = ""; $addtocart_or_buynow2 = ""; switch ($addtocart_or_buynow) { case 0: $addtocart_or_buynow1 = "checked ='checked'"; break; case 1: $addtocart_or_buynow2 = "checked ='checked'"; break; } ?> <input type='radio' value='0' name='wpsc_options[addtocart_or_buynow]' id='addtocart_or_buynow1' <?php echo $addtocart_or_buynow1; ?> /> <label for='addtocart_or_buynow1'><?php _e('Add To Cart', 'wpsc'); ?> </label> <br /> <?php $selected_gateways = get_option('custom_gateway_options'); $disable_buy_now = ''; $message = ''; if (!in_array('wpsc_merchant_paypal_standard', (array) $selected_gateways)) { $disable_buy_now = 'disabled="disabled"'; $message = __('Buy Now Button only works for Paypal Standard, please activate Paypal Standard to enable this option.', 'wpsc'); } ?> <input <?php echo $disable_buy_now; ?> type='radio' value='1' name='wpsc_options[addtocart_or_buynow]' id='addtocart_or_buynow2' <?php echo $addtocart_or_buynow2; ?> /> <label for='addtocart_or_buynow2'><?php _e('Buy Now', 'wpsc'); ?> </label><br /> <?php echo $message; ?> </td> </tr> <tr> <th scope="row"><?php _e('Hide "Add to cart" button', 'wpsc'); ?> : </th> <td> <?php $hide_addtocart_button = get_option('hide_addtocart_button'); $hide_addtocart_button1 = ""; $hide_addtocart_button2 = ""; switch ($hide_addtocart_button) { case 0: $hide_addtocart_button2 = "checked ='checked'"; break; case 1: $hide_addtocart_button1 = "checked ='checked'"; break; } ?> <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 _e('Yes', 'wpsc'); ?> </label> <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 _e('No', 'wpsc'); ?> </label> </td> </tr> </table> <h3 class="form_group"><?php _e('Product Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php _e('Show Product Ratings', 'wpsc'); ?> :</th> <td> <?php $display_pnp = get_option('product_ratings'); $product_ratings1 = ""; $product_ratings2 = ""; switch ($display_pnp) { case 0: $product_ratings2 = "checked ='checked'"; break; case 1: $product_ratings1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[product_ratings]' id='product_ratings1' <?php echo $product_ratings1; ?> /> <label for='product_ratings1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[product_ratings]' id='product_ratings2' <?php echo $product_ratings2; ?> /> <label for='product_ratings2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <?php $list_view_quantity_value1 = ''; $list_view_quantity_value2 = ''; if (get_option('list_view_quantity') == 1) { $list_view_quantity_value1 = 'checked="checked"'; } else { $list_view_quantity_value2 = 'checked="checked"'; } ?> <th score="row"> <?php _e('Show Stock Availability', 'wpsc'); ?> </th> <td> <input type='radio' value='1' name='wpsc_options[list_view_quantity]' id='list_view_quantity1' <?php echo $list_view_quantity_value1; ?> /> <label for='list_view_quantity1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[list_view_quantity]' id='list_view_quantity2' <?php echo $list_view_quantity_value2; ?> /> <label for='list_view_quantity2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"> <?php _e('Display Fancy Purchase Notifications', 'wpsc'); ?> : </th> <td> <?php $fancy_notifications = get_option('fancy_notifications'); $fancy_notifications1 = ""; $fancy_notifications2 = ""; switch ($fancy_notifications) { case 0: $fancy_notifications2 = "checked ='checked'"; break; case 1: $fancy_notifications1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[fancy_notifications]' id='fancy_notifications1' <?php echo $fancy_notifications1; ?> /> <label for='fancy_notifications1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[fancy_notifications]' id='fancy_notifications2' <?php echo $fancy_notifications2; ?> /> <label for='fancy_notifications2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"><?php _e('Display per item shipping', 'wpsc'); ?> :</th> <td> <?php $display_pnp = get_option('display_pnp'); $display_pnp1 = ""; $display_pnp2 = ""; switch ($display_pnp) { case 0: $display_pnp2 = "checked ='checked'"; break; case 1: $display_pnp1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[display_pnp]' id='display_pnp1' <?php echo $display_pnp1; ?> /> <label for='display_pnp1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[display_pnp]' id='display_pnp2' <?php echo $display_pnp2; ?> /> <label for='display_pnp2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"><?php _e('Disable link in Title', 'wpsc'); ?> : </th> <td> <?php $hide_name_link = get_option('hide_name_link'); $hide_name_link1 = ""; $hide_name_link2 = ""; switch ($hide_name_link) { case 0: $hide_name_link2 = "checked ='checked'"; break; case 1: $hide_name_link1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[hide_name_link]' id='hide_name_link1' <?php echo $hide_name_link1; ?> /> <label for='hide_name_link1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[hide_name_link]' id='hide_name_link2' <?php echo $hide_name_link2; ?> /> <label for='hide_name_link2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"><?php _e('Add quantity field to each product description', 'wpsc'); ?> :</th> <td> <?php $multi_adding = get_option('multi_add'); switch ($multi_adding) { case 1: $multi_adding1 = "checked ='checked'"; break; case 0: $multi_adding2 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[multi_add]' id='multi_adding1' <?php if (isset($multi_adding1)) { echo $multi_adding1; } ?> /> <label for='multi_adding1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[multi_add]' id='multi_adding2' <?php if (isset($multi_adding2)) { echo $multi_adding2; } ?> /> <label for='multi_adding2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> </table> </div> <?php wpsc_theme_presentation_page_metabox(); ?> <div style='clear:both;'></div> <h3 class="form_group"><?php _e('Product Page Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php _e('Product Display', 'wpsc'); ?> :</th> <td> <?php $display_pnp = get_option('product_view'); $product_view1 = null; $product_view2 = null; $product_view3 = null; switch ($display_pnp) { case "grid": if (function_exists('product_display_grid')) { $product_view3 = "selected ='selected'"; break; } case "list": if (function_exists('product_display_list')) { $product_view2 = "selected ='selected'"; break; } default: $product_view1 = "selected ='selected'"; break; } if (get_option('show_images_only') == 1) { $show_images_only_value = "checked='checked'"; } else { $show_images_only_value = ''; } if (get_option('display_variations') == 1) { $display_variations = "checked='checked'"; } else { $display_variations = ''; } if (get_option('display_description') == 1) { $display_description = "checked='checked'"; } else { $display_description = ''; } if (get_option('display_addtocart') == 1) { $display_addtocart = "checked='checked'"; } else { $display_addtocart = ''; } if (get_option('display_moredetails') == 1) { $display_moredetails = "checked='checked'"; } else { $display_moredetails = ''; } ?> <select name='wpsc_options[product_view]' onchange="toggle_display_options(this.options[this.selectedIndex].value)"> <option value='default' <?php echo $product_view1; ?> ><?php _e('Default View', 'wpsc'); ?> </option> <?php if (function_exists('product_display_list')) { ?> <option value='list' <?php echo $product_view2; ?> ><?php _e('List View', 'wpsc'); ?> </option> <?php } else { ?> <option value='list' disabled='disabled' <?php echo $product_view2; ?> ><?php _e('List View', 'wpsc'); ?> </option> <?php } if (function_exists('product_display_grid')) { ?> <option value='grid' <?php echo $product_view3; ?> ><?php _e('Grid View', 'wpsc'); ?> </option> <?php } else { ?> <option value='grid' disabled='disabled' <?php echo $product_view3; ?> ><?php _e('Grid View', 'wpsc'); ?> </option> <?php } ?> </select> <?php if (!function_exists('product_display_grid')) { ?> <a href='http://getshopped.org/extend/premium-upgrades'><?php _e('Purchase unavailable options', 'wpsc'); ?> </a> <?php } ?> <div id='grid_view_options' <?php if (isset($list_view_quantity_style)) { echo $list_view_quantity_style; } ?> <?php if (is_null($product_view3)) { echo "style='display:none;'"; } ?> > <input type='text' name='wpsc_options[grid_number_per_row]' id='grid_number_per_row' size='1' value='<?php esc_attr_e(get_option('grid_number_per_row')); ?> ' /> <label for='grid_number_per_row'><?php _e('Products Per Row', 'wpsc'); ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[show_images_only]' /> <input type='checkbox' value='1' name='wpsc_options[show_images_only]' id='show_images_only' <?php echo $show_images_only_value; ?> /> <label for='show_images_only'><?php _e('Show images only', 'wpsc'); ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_variations]' /> <input type='checkbox' value='1' name='wpsc_options[display_variations]' id='display_variations' <?php echo $display_variations; ?> /> <label for='display_variations'><?php _e('Display Variations', 'wpsc'); ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_description]' /> <input type='checkbox' value='1' name='wpsc_options[display_description]' id='display_description' <?php echo $display_description; ?> /> <label for='display_description'><?php _e('Display Description', 'wpsc'); ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_addtocart]' /> <input type='checkbox' value='1' name='wpsc_options[display_addtocart]' id='display_addtocart' <?php echo $display_addtocart; ?> /> <label for='display_addtocart'><?php _e('Display "Add To Cart" Button', 'wpsc'); ?> </label><br /> <input type='hidden' value='0' name='wpsc_options[display_moredetails]' /> <input type='checkbox' value='1' name='wpsc_options[display_moredetails]' id='display_moredetails' <?php echo $display_moredetails; ?> /> <label for='display_moredetails'><?php _e('Display "More Details" Button', 'wpsc'); ?> </label> </div> </td> </tr> <?php $selected1 = $selected2 = ''; if (get_option('wpsc_display_categories')) { $selected1 = 'checked="checked"'; } else { $selected2 = 'checked="checked"'; } ?> <tr> <th scope="row"><?php _e('Show list of categories', 'wpsc'); ?> </th> <td> <input type='radio' value='1' name='wpsc_options[wpsc_display_categories]' id='display_categories2' <?php echo $selected1; ?> /> <label for='display_addtocart'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[wpsc_display_categories]' id='display_categories1' <?php echo $selected2; ?> /> <label for='display_addtocart'><?php _e('No', 'wpsc'); ?> </label><br /> </td> </tr> <tr> <th scope="row"><?php _e('Select what product category you want to display on the products page', 'wpsc'); ?> :</th> <td> <?php echo options_categorylist(); ?> </td> </tr> <?php $wpsc_sort_by = get_option('wpsc_sort_by'); switch ($wpsc_sort_by) { case 'name': $wpsc_sort_by1 = "selected ='selected'"; break; case 'price': $wpsc_sort_by2 = "selected ='selected'"; break; case 'dragndrop': $wpsc_sort_by4 = "selected='selected'"; break; case 'id': default: $wpsc_sort_by3 = "selected ='selected'"; break; } ?> <tr> <th scope="row"> <?php _e('Sort Product By', 'wpsc'); ?> : </th> <td> <select name='wpsc_options[wpsc_sort_by]'> <option <?php if (isset($wpsc_sort_by1)) { echo $wpsc_sort_by1; } ?> value='name'><?php _e('Name', 'wpsc'); ?> </option> <option <?php if (isset($wpsc_sort_by2)) { echo $wpsc_sort_by2; } ?> value='price'><?php _e('Price', 'wpsc'); ?> </option> <option <?php if (isset($wpsc_sort_by4)) { echo $wpsc_sort_by4; } ?> value='dragndrop'><?php _e('Drag & Drop', 'wpsc'); ?> </option> <option <?php if (isset($wpsc_sort_by3)) { echo $wpsc_sort_by3; } ?> value='id'><?php _e('Time Uploaded', 'wpsc'); ?> </option> </select> </td> </tr> <tr> <th scope="row"><?php _e('Show Breadcrumbs', 'wpsc'); ?> :</th> <td> <?php $show_breadcrumbs = get_option('show_breadcrumbs'); $show_breadcrumbs1 = ""; $show_breadcrumbs2 = ""; switch ($show_breadcrumbs) { case 0: $show_breadcrumbs2 = "checked ='checked'"; break; case 1: $show_breadcrumbs1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[show_breadcrumbs]' id='show_breadcrumbs1' <?php echo $show_breadcrumbs1; ?> /> <label for='show_breadcrumbs1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[show_breadcrumbs]' id='show_breadcrumbs2' <?php echo $show_breadcrumbs2; ?> /> <label for='show_breadcrumbs2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"> <?php _e('Product Groups/Products Display', 'wpsc'); ?> : </th> <td> <?php $display_pnp = get_option('catsprods_display_type'); $catsprods_display_type1 = ""; $catsprods_display_type2 = ""; switch ($display_pnp) { case 0: $catsprods_display_type1 = "checked ='checked'"; break; case 1: $catsprods_display_type2 = "checked ='checked'"; break; } ?> <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 _e('Product Groups Only (All products displayed)', 'wpsc'); ?> </label> <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 _e('Sliding Product Groups (1 product per page)', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"> <?php echo __('Show Subcategory Products in Parent Category', 'wpsc'); ?> : </th> <td> <?php $show_subcatsprods_in_cat = get_option('show_subcatsprods_in_cat'); $show_subcatsprods_in_cat_on = ''; $show_subcatsprods_in_cat_off = ''; switch ($show_subcatsprods_in_cat) { case 1: $show_subcatsprods_in_cat_on = 'checked="checked"'; break; case 0: $show_subcatsprods_in_cat_off = 'checked="checked"'; break; } ?> <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> <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> </td> </tr> <?php if (function_exists('gold_shpcrt_search_form')) { ?> <tr> <th scope="row"><?php _e('Show Search', 'wpsc'); ?> :</th> <td> <?php $display_pnp = get_option('show_search'); $show_search1 = ""; $show_search2 = ""; switch ($display_pnp) { case 0: $show_search2 = "checked ='checked'"; break; case 1: $show_search1 = "checked ='checked'"; break; } $display_advanced_search = get_option('show_advanced_search'); $show_advanced_search = ""; if ($display_advanced_search == 1) { $show_advanced_search = "checked ='checked'"; } $display_live_search = get_option('show_live_search'); if ($display_live_search == 1) { $show_live_search = "checked ='checked'"; } else { $show_live_search = ""; } if ($show_search1 != "checked ='checked'") { $dis = "style='display:none;'"; } else { $dis = ""; } ?> <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 _e('Yes', 'wpsc'); ?> </label> <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 _e('No', 'wpsc'); ?> </label> <div <?php echo $dis; ?> id='wpsc_advanced_search'> <input type='hidden' name='wpsc_options[show_advanced_search]' value='0' /> <input type='checkbox' name='wpsc_options[show_advanced_search]' id='show_advanced_search' <?php echo $show_advanced_search; ?> value='1' /> <?php _e('Show Advanced Search', 'wpsc'); ?> <br /> <input type='hidden' name='wpsc_options[show_live_search]' value='0' /> <input type='checkbox' name='wpsc_options[show_live_search]' id='show_live_search' <?php echo $show_live_search; ?> value='1' /> <?php _e('Use Live Search', 'wpsc'); ?> </div> </td> </tr> <?php } ?> <tr> <th scope="row"><?php _e('Replace Page Title With Product/Category Name', 'wpsc'); ?> :</th> <td> <?php $wpsc_replace_page_title = get_option('wpsc_replace_page_title'); $wpsc_replace_page_title1 = ""; $wpsc_replace_page_title2 = ""; switch ($wpsc_replace_page_title) { case 0: $wpsc_replace_page_title2 = "checked ='checked'"; break; case 1: $wpsc_replace_page_title1 = "checked ='checked'"; break; } ?> <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 _e('Yes', 'wpsc'); ?> </label> <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 _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"><?php _e('Display Featured Product above Product Pages', 'wpsc'); ?> :</th> <td> <?php $wpsc_hide_featured_products = get_option('wpsc_hide_featured_products'); $wpsc_hide_featured_products1 = ""; $wpsc_hide_featured_products2 = ""; switch ($wpsc_hide_featured_products) { case 0: $wpsc_hide_featured_products2 = "checked ='checked'"; break; case 1: default: $wpsc_hide_featured_products1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[wpsc_hide_featured_products]' id='wpsc_hide_featured_products1' <?php echo $wpsc_hide_featured_products1; ?> /> <label for='wpsc_hide_featured_products1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[wpsc_hide_featured_products]' id='wpsc_hide_featured_products2' <?php echo $wpsc_hide_featured_products2; ?> /> <label for='wpsc_hide_featured_products2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> </table> <h3 class="form_group"><?php _e('Shopping Cart Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php _e('Cart Location', 'wpsc'); ?> :</th> <td> <?php $cart_location = get_option('cart_location'); $cart2 = ""; $cart3 = ""; $cart4 = ""; $cart5 = ""; switch ($cart_location) { case 2: $cart2 = "checked ='checked'"; break; case 3: $cart3 = "checked ='checked'"; break; case 4: $cart4 = "checked ='checked'"; break; case 5: $cart5 = "checked ='checked'"; break; } ?> <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 _e('Page', 'wpsc'); ?> </label> <?php if (function_exists('wp_register_sidebar_widget')) { ?> <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 _e('Widget', 'wpsc'); ?> </label> <?php } else { ?> <input type='radio' disabled='disabled' value='4' name='wpsc_options[cart_location]' id='cart4' alt='<?php _e('You need to enable the widgets plugin to use this', 'wpsc'); ?> ' title='<?php _e('You need to enable the widgets plugin to use this', 'wpsc'); ?> ' <?php echo $cart4; ?> /> <label style='color: #666666;' for='cart4' title='<?php _e('You need to enable the widgets plugin to use this', 'wpsc'); ?> '><?php _e('Widget', 'wpsc'); ?> </label> <?php } if (function_exists('drag_and_drop_cart_ajax')) { ?> <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 _e('DropShop', 'wpsc'); ?> </label> <?php } else { ?> <input type='radio' disabled='disabled' value='5' name='wpsc_options[cart_location]' id='cart5' alt='<?php _e('You need to enable the widgets plugin to use this', 'wpsc'); ?> ' title='<?php _e('You need to install the Gold and DropShop extentions to use this', 'wpsc'); ?> ' <?php if (isset($cart5)) { echo $cart5; } ?> /> <label style='color: #666666;' for='cart5' title='<?php _e('You need to install the Gold and DropShop extentions to use this', 'wpsc'); ?> '><?php _e('DropShop', 'wpsc'); ?> </label> <?php } ?> <input type='radio' onclick='hideelement1("dropshop_option", this.value)' value='3' name='wpsc_options[cart_location]' id='cart3' <?php if (isset($cart3)) { echo $cart3; } ?> /> <label for='cart3'><?php _e('Manual', 'wpsc'); ?> <span style='font-size: 7pt;'>(PHP code: <?php echo wpsc_shopping_cart(); ?> )</span></label> <div style='display: <?php if (!empty($cart5)) { echo "block"; } else { echo "none"; } ?> ;' id='dropshop_option'> <p> <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 _e('Show Dropshop on every page', 'wpsc'); ?> </label> <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 _e('Show Dropshop only on product page', 'wpsc'); ?> </label> </p> <p> <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 _e('Use light Dropshop style', 'wpsc'); ?> </label> <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 _e('Use dark Dropshop style', 'wpsc'); ?> </label> <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 _e('Crafty', 'wpsc'); ?> </label> </p> </div> </td> </tr> <tr> <th scope="row"> <?php _e('Display "+ Postage & Tax"', 'wpsc'); ?> : </th> <td> <?php $add_plustax = get_option('add_plustax'); $add_plustax1 = ""; $add_plustax2 = ""; switch ($add_plustax) { case 0: $add_plustax2 = "checked ='checked'"; break; case 1: $add_plustax1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[add_plustax]' id='add_plustax1' <?php echo $add_plustax1; ?> /> <label for='add_plustax1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[add_plustax]' id='add_plustax2' <?php echo $add_plustax2; ?> /> <label for='add_plustax2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> </table> <h3 class="form_group"><?php _e('Product Category Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php _e('Show Product Category Description', 'wpsc'); ?> :</th> <td> <?php $wpsc_category_description = get_option('wpsc_category_description'); $wpsc_category_description1 = ""; $wpsc_category_description2 = ""; switch ($wpsc_category_description) { case '1': $wpsc_category_description1 = "checked ='checked'"; break; case '0': default: $wpsc_category_description2 = "checked ='checked'"; break; } ?> <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 _e('Yes', 'wpsc'); ?> </label> <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 _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"> <?php _e('Show Product Category Thumbnails', 'wpsc'); ?> : </th> <td> <?php $show_category_thumbnails = get_option('show_category_thumbnails'); $show_category_thumbnails1 = ""; $show_category_thumbnails2 = ""; switch ($show_category_thumbnails) { case 0: $show_category_thumbnails2 = "checked ='checked'"; break; case 1: $show_category_thumbnails1 = "checked ='checked'"; break; } ?> <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 _e('Yes', 'wpsc'); ?> </label> <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 _e('No', 'wpsc'); ?> </label> </td> </tr> <!-- // Adrian - options for displaying number of products per category --> <tr> <th scope="row"> <?php _e('Show Product Count per Product Category', 'wpsc'); ?> : </th> <td> <?php $display_pnp = get_option('show_category_count'); $show_category_count1 = ""; $show_category_count2 = ""; switch ($display_pnp) { case 0: $show_category_count2 = "checked ='checked'"; break; case 1: $show_category_count1 = "checked ='checked'"; break; } ?> <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 _e('Yes', 'wpsc'); ?> </label> <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 _e('No', 'wpsc'); ?> </label> </td> </tr> <!-- // Adrian - options for displaying category display type --> <tr> <th scope="row"><?php _e("Use Category Grid View", 'wpsc'); ?> :</th> <td> <?php $wpsc_category_grid_view = get_option('wpsc_category_grid_view'); $wpsc_category_grid_view1 = ""; $wpsc_category_grid_view2 = ""; switch ($wpsc_category_grid_view) { case '1': $wpsc_category_grid_view1 = "checked ='checked'"; break; case '0': default: $wpsc_category_grid_view2 = "checked ='checked'"; break; } ?> <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 _e('Yes', 'wpsc'); ?> </label> <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 _e('No', 'wpsc'); ?> </label> </td> </tr> </table> <h3 class="form_group"><a name='thumb_settings'><?php _e('Thumbnail Settings', 'wpsc'); ?> </a></h3> <p><em><?php _e('Note: Anytime you update any of the thumbnail settings, WPeC will automatically resize all of your thumbnails for you. Depending on how many images you have, this could take awhile.', 'wpsc'); ?> </em></p> <table class='wpsc_options form-table'> <?php if (function_exists("getimagesize")) { ?> <tr> <th scope="row"><?php _e('Default Product Thumbnail Size', 'wpsc'); ?> :</th> <td> <?php _e('Width', 'wpsc'); ?> :<input type='text' size='6' name='wpsc_options[product_image_width]' class='wpsc_prod_thumb_option' value='<?php esc_attr_e(get_option('product_image_width')); ?> ' /> <?php _e('Height', 'wpsc'); ?> :<input type='text' size='6' name='wpsc_options[product_image_height]' class='wpsc_prod_thumb_option' value='<?php esc_attr_e(get_option('product_image_height')); ?> ' /> </td> </tr> <tr> <th scope="row"> <?php _e('Default Product Group Thumbnail Size', 'wpsc'); ?> : </th> <td> <?php _e('Width', 'wpsc'); ?> :<input type='text' size='6' name='wpsc_options[category_image_width]' value='<?php esc_attr_e(get_option('category_image_width')); ?> ' /> <?php _e('Height', 'wpsc'); ?> :<input type='text' size='6' name='wpsc_options[category_image_height]' value='<?php esc_attr_e(get_option('category_image_height')); ?> ' /> </td> </tr> <tr> <th scope="row"> <?php _e('Single Product Image Size', 'wpsc'); ?> : </th> <td> <?php _e('Width', 'wpsc'); ?> :<input type='text' size='6' name='wpsc_options[single_view_image_width]' value='<?php esc_attr_e(get_option('single_view_image_width')); ?> ' /> <?php _e('Height', 'wpsc'); ?> :<input type='text' size='6' name='wpsc_options[single_view_image_height]' value='<?php esc_attr_e(get_option('single_view_image_height')); ?> ' /> </td> </tr> <tr> <th scope="row"> <?php $cropthumbs = get_option('wpsc_crop_thumbnails'); $crop1 = ""; $crop2 = ""; switch ($cropthumbs) { case 0: $crop2 = "checked ='checked'"; break; case 1: $crop1 = "checked ='checked'"; break; } ?> <?php _e("Crop Thumbnails", 'wpsc'); ?> : </th> <td> <input type='radio' value='1' name='wpsc_options[wpsc_crop_thumbnails]' id='wpsc_crop_thumbnails1' <?php echo $crop1; ?> /> <label for='crop1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[wpsc_crop_thumbnails]' id='wpsc_crop_thumbnails2' <?php echo $crop2; ?> /> <label for='crop2'><?php _e('No', 'wpsc'); ?> </label><br /> <?php _e('Choosing "Yes" means that thumbnails are cropped to exact dimensions (normally thumbnails are proportional)', 'wpsc'); ?> </td> </tr> <?php } ?> <tr> <th scope="row"><?php _e('Show Thumbnails', 'wpsc'); ?> :</th> <td> <?php $show_thumbnails = get_option('show_thumbnails'); $show_thumbnails1 = ""; $show_thumbnails2 = ""; switch ($show_thumbnails) { case 0: $show_thumbnails2 = "checked ='checked'"; break; case 1: $show_thumbnails1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[show_thumbnails]' id='show_thumbnails1' <?php echo $show_thumbnails1; ?> /> <label for='show_thumbnails1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[show_thumbnails]' id='show_thumbnails2' <?php echo $show_thumbnails2; ?> /> <label for='show_thumbnails2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"><?php _e('Use Lightbox Effect for product images', 'wpsc'); ?> :</th> <td> <?php $show_thumbnails_thickbox = get_option('show_thumbnails_thickbox'); $show_thumbnails_thickbox1 = ""; $show_thumbnails_thickbox2 = ""; switch ($show_thumbnails_thickbox) { case 0: $show_thumbnails_thickbox2 = "checked ='checked'"; break; case 1: $show_thumbnails_thickbox1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[show_thumbnails_thickbox]' id='show_thumbnails_thickbox1' <?php echo $show_thumbnails_thickbox1; ?> /> <label for='show_thumbnails_thickbox1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[show_thumbnails_thickbox]' id='show_thumbnails_thickbox2' <?php echo $show_thumbnails_thickbox2; ?> /> <label for='show_thumbnails_thickbox2'><?php _e('No', 'wpsc'); ?> </label><br /> <?php _e('Using lightbox means that when clicking on a product image, a larger version will be displayed in a "lightbox" style window. If you are using a plugin such as Shutter Reloaded, you may want to disable lightbox.', 'wpsc'); ?> </td> </tr> <tr> <th scope="row"><?php _e('Lightbox script to use', 'wpsc'); ?> :</th> <td> <?php $wpsc_lightbox = get_option('wpsc_lightbox', 'thickbox'); $wpsc_lightbox_thickbox1 = ""; $wpsc_lightbox_thickbox2 = ""; if ($wpsc_lightbox == "thickbox") { $wpsc_lightbox_thickbox2 = "checked ='checked'"; } if ($wpsc_lightbox == "colorbox") { $wpsc_lightbox_thickbox1 = "checked ='checked'"; } ?> <input type='radio' value='colorbox' name='wpsc_options[wpsc_lightbox]' id='wpsc_lightbox_thickbox1' <?php echo $wpsc_lightbox_thickbox1; ?> /> <label for='show_thumbnails_thickbox1'><?php _e('Colorbox', 'wpsc'); ?> </label> <input type='radio' value='thickbox' name='wpsc_options[wpsc_lightbox]' id='wpsc_lightbox_thickbox2' <?php echo $wpsc_lightbox_thickbox2; ?> /> <label for='show_thumbnails_thickbox2'><?php _e('Thickbox', 'wpsc'); ?> </label><br /> </td> </tr> <?php if (function_exists('gold_shpcrt_display_gallery')) { ?> <tr> <th scope="row"> <?php _e('Show Thumbnail Gallery', 'wpsc'); ?> : </th> <td> <?php $display_pnp = get_option('show_gallery'); $show_gallery1 = ""; $show_gallery2 = ""; switch ($display_pnp) { case 0: $show_gallery2 = "checked ='checked'"; break; case 1: $show_gallery1 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[show_gallery]' id='show_gallery1' <?php echo $show_gallery1; ?> /> <label for='show_gallery1'><?php _e('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[show_gallery]' id='show_gallery2' <?php echo $show_gallery2; ?> /> <label for='show_gallery2'><?php _e('No', 'wpsc'); ?> </label> </td> </tr> <tr> <th scope="row"> <?php _e("Gallery Thumbnail Image Size", 'wpsc'); ?> : </th> <td> <?php _e('Width', 'wpsc'); ?> :<input type='text' size='6' name='wpsc_options[wpsc_gallery_image_width]' value='<?php esc_attr_e(get_option('wpsc_gallery_image_width')); ?> ' /> <?php _e('Height', 'wpsc'); ?> :<input type='text' size='6' name='wpsc_options[wpsc_gallery_image_height]' value='<?php esc_attr_e(get_option('wpsc_gallery_image_height')); ?> ' /><br /> </td> </tr> <?php } ?> </table> <h3 class="form_group"><?php _e('Pagination settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"> <?php _e('Use Pagination', 'wpsc'); ?> : </th> <td> <?php $use_pagination = get_option('use_pagination'); $use_pagination1 = ""; $use_pagination2 = ""; switch ($use_pagination) { case 0: $use_pagination2 = "checked ='checked'"; $page_count_display_state = 'style=\'display: none;\''; break; case 1: $use_pagination1 = "checked ='checked'"; $page_count_display_state = ''; break; } ?> <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 _e('Yes', 'wpsc'); ?> </label> <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 _e('No', 'wpsc'); ?> </label><br /> <div id='wpsc_products_per_page' <?php echo $page_count_display_state; ?> > <input type='text' size='6' name='wpsc_options[wpsc_products_per_page]' value='<?php echo get_option('wpsc_products_per_page'); ?> ' /> <?php _e('number of products to show per page', 'wpsc'); ?> </div> </td> </tr> <tr> <th scope="row"> <?php _e('Page Number position', 'wpsc'); ?> : </th> <td> <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 _e('Top', 'wpsc'); ?> </label> <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 _e('Bottom', 'wpsc'); ?> </label> <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 _e('Both', 'wpsc'); ?> </label> <br /> </td> </tr> </table> <h3 class="form_group"><?php _e('Comment Settings', 'wpsc'); ?> </h3> <table class='wpsc_options form-table'> <tr> <th scope="row"> <?php _e('Use IntenseDebate Comments', 'wpsc'); ?> : <a href="http://intensedebate.com/" title="IntenseDebate comments enhance and encourage conversation on your blog or website" target="_blank"><img src="<?php echo WPSC_CORE_IMAGES_URL; ?> /intensedebate-logo.png" alt="intensedebate-logo" title="IntenseDebate"/></a> </th> <td> <?php $enable_comments = get_option('wpsc_enable_comments'); $enable_comments1 = ""; $enable_comments2 = ""; switch ($enable_comments) { case 1: $enable_comments1 = "checked ='checked'"; $intense_debate_account_id_display_state = ''; break; default: case 0: $enable_comments2 = "checked ='checked'"; $intense_debate_account_id_display_state = 'style=\'display: none;\''; break; } ?> <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 _e('Yes', 'wpsc'); ?> </label> <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 _e('No', 'wpsc'); ?> </label><br /> <div id='wpsc_enable_comments' <?php echo $intense_debate_account_id_display_state; ?> > <?php _e('IntenseDebate Account ID', 'wpsc'); ?> :<br/> <input type='text' size='30' name='wpsc_options[wpsc_intense_debate_account_id]' value='<?php esc_attr_e(get_option('wpsc_intense_debate_account_id')); ?> ' /><br/> <small><a href='http://intensedebate.com/sitekey/' title='Help finding the Account ID'><?php _e('Help on finding the Account ID', 'wpsc'); ?> </a></small> </div> </td> </tr> <tr> <th scope="row"> <div class='wpsc_comments_details' <?php echo $intense_debate_account_id_display_state; ?> > <?php _e('By Default Display Comments on', 'wpsc'); ?> : </div> </th> <td> <div class='wpsc_comments_details' <?php echo $intense_debate_account_id_display_state; ?> > <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'><?php _e('All Products', 'wpsc'); ?> </label> <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'><?php _e('Per Product', 'wpsc'); ?> </label> <br /> </div> </td> </tr> </table> <?php do_action('wpsc_presentation_settings_page'); ?> <div class="submit"> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type="submit" value="<?php _e('Update »', 'wpsc'); ?> " name="updateoption" /> </div> </div> </form> <?php }
function wpsc_options_general() { global $wpdb; ?> <form method='post' action='' id='cart_options' name='cart_options' class='wpsc_form_track'> <div id="options_general"> <h3><?php _e('General Settings', 'wpsc'); ?> </h3> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php _e('Base Country/Region', 'wpsc'); ?> : </th> <td> <select name='wpsc_options[base_country]' onchange='submit_change_country();'> <?php echo country_list(esc_attr(get_option('base_country'))); ?> </select> <span id='options_country'> <?php $region_list = $wpdb->get_results("SELECT `" . WPSC_TABLE_REGION_TAX . "`.* FROM `" . WPSC_TABLE_REGION_TAX . "`, `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `" . WPSC_TABLE_CURRENCY_LIST . "`.`isocode` IN('" . esc_attr(get_option('base_country')) . "') AND `" . WPSC_TABLE_CURRENCY_LIST . "`.`id` = `" . WPSC_TABLE_REGION_TAX . "`.`country_id`", ARRAY_A); if (!empty($region_list)) { ?> <select name='wpsc_options[base_region]'> <?php foreach ($region_list as $region) { if (esc_attr(get_option('base_region')) == $region['id']) { $selected = "selected='selected'"; } else { $selected = ""; } ?> <option value='<?php echo $region['id']; ?> ' <?php echo $selected; ?> ><?php echo esc_attr($region['name']); ?> </option> <?php } ?> </select> <?php } ?> </span> <br /><?php _e('Select your primary business location.', 'wpsc'); ?> </td> </tr> <?php /* START OF TARGET MARKET SELECTION */ $countrylist = $wpdb->get_results("SELECT id,country,visible FROM `" . WPSC_TABLE_CURRENCY_LIST . "` ORDER BY country ASC ", ARRAY_A); ?> <tr> <th scope="row"> <?php _e('Target Markets', 'wpsc'); ?> : </th> <td> <?php // check for the suhosin module if (@extension_loaded('suhosin') && @ini_get('suhosin.post.max_vars') > 0 && @ini_get('suhosin.post.max_vars') < 500) { echo "<em>" . __("The Target Markets feature has been disabled because you have the Suhosin PHP extension installed on this server. If you need to use the Target Markets feature then disable the suhosin extension, if you can not do this, you will need to contact your hosting provider.", 'wpsc') . "</em>"; } else { ?> <span><?php printf(__('Select: <a href="%1$s" class="wpsc_select_all" title="All">All</a> <a href="%1$s" class="wpsc_select_none" title="None">None</a>', 'wpsc'), add_query_arg(array('selected_all' => 'all')), add_query_arg(array('selected_all' => 'none'))); ?> </span><br /> <div id='resizeable' class='ui-widget-content multiple-select'> <?php foreach ((array) $countrylist as $country) { $country['country'] = htmlspecialchars($country['country']); if ($country['visible'] == 1) { ?> <input type='checkbox' id="countrylist2-<?php echo $country['id']; ?> " name='countrylist2[]' value='<?php echo $country['id']; ?> ' checked='checked' /> <label for="countrylist2-<?php echo $country['id']; ?> "><?php echo $country['country']; ?> </label><br /> <?php } else { ?> <input type='checkbox' id="countrylist2-<?php echo $country['id']; ?> " name='countrylist2[]' value='<?php echo $country['id']; ?> ' /> <label for="countrylist2-<?php echo $country['id']; ?> "><?php esc_attr_e($country['country']); ?> </label><br /> <?php } } ?> </div><br /> <?php _e('Select the markets you are selling products to.', 'wpsc'); } ?> </td> </tr> </table> <h3 class="form_group"><?php _e('Currency Settings', 'wpsc'); ?> :</h3> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php _e('Currency Type', 'wpsc'); ?> :</th> <td> <select name='wpsc_options[currency_type]' onchange='getcurrency(this.options[this.selectedIndex].value);'> <?php $currency_data = $wpdb->get_results("SELECT * FROM `" . WPSC_TABLE_CURRENCY_LIST . "` ORDER BY `country` ASC", ARRAY_A); foreach ($currency_data as $currency) { if (esc_attr(get_option('currency_type')) == $currency['id']) { $selected = "selected='selected'"; } else { $selected = ""; } ?> <option value='<?php echo $currency['id']; ?> ' <?php echo $selected; ?> ><?php echo htmlspecialchars($currency['country']); ?> (<?php echo $currency['currency']; ?> )</option> <?php } $currency_data = $wpdb->get_row("SELECT `symbol`,`symbol_html`,`code` FROM `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `id`='" . esc_attr(get_option('currency_type')) . "' LIMIT 1", ARRAY_A); if ($currency_data['symbol'] != '') { $currency_sign = esc_attr($currency_data['symbol_html']); } else { $currency_sign = esc_attr($currency_data['code']); } ?> </select> </td> </tr> <tr> <th scope="row"><?php _e('Currency Sign Location', 'wpsc'); ?> :</th> <td> <?php $currency_sign_location = esc_attr(get_option('currency_sign_location')); $csl1 = ""; $csl2 = ""; $csl3 = ""; $csl4 = ""; switch ($currency_sign_location) { case 1: $csl1 = "checked ='checked'"; break; case 2: $csl2 = "checked ='checked'"; break; case 3: $csl3 = "checked ='checked'"; break; case 4: $csl4 = "checked ='checked'"; break; } ?> <input type='radio' value='1' name='wpsc_options[currency_sign_location]' id='csl1' <?php echo $csl1; ?> /> <label for='csl1'>100<span id='cslchar1'><?php echo $currency_sign; ?> </span></label> <input type='radio' value='2' name='wpsc_options[currency_sign_location]' id='csl2' <?php echo $csl2; ?> /> <label for='csl2'>100 <span id='cslchar2'><?php echo $currency_sign; ?> </span></label> <input type='radio' value='3' name='wpsc_options[currency_sign_location]' id='csl3' <?php echo $csl3; ?> /> <label for='csl3'><span id='cslchar3'><?php echo $currency_sign; ?> </span>100</label> <input type='radio' value='4' name='wpsc_options[currency_sign_location]' id='csl4' <?php echo $csl4; ?> /> <label for='csl4'><span id='cslchar4'><?php echo $currency_sign; ?> </span> 100</label> </td> </tr> <tr> <th scope="row"><?php _e('Thousands and decimal separators', 'wpsc'); ?> :</th> <td> <?php _e('Thousands separator', 'wpsc'); ?> : <input name="wpsc_options[wpsc_thousands_separator]" type="text" maxlength="1" size="1" value="<?php echo esc_attr(stripslashes(get_option('wpsc_thousands_separator'))); ?> " /> <br /> <?php _e('Decimal separator', 'wpsc'); ?> : <input name="wpsc_options[wpsc_decimal_separator]" type="text" maxlength="1" size="1" value="<?php echo esc_attr(stripslashes(get_option('wpsc_decimal_separator'))); ?> " /> <br /> <?php _e('Preview:', 'wpsc'); ?> 10<?php echo esc_attr(stripslashes(get_option('wpsc_thousands_separator'))); ?> 000<?php echo esc_attr(stripslashes(get_option('wpsc_decimal_separator'))); ?> 00 </td> </tr> </table> <?php do_action('wpsc_general_settings_page'); ?> <div class="submit"> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type="submit" value="<?php _e('Update »', 'wpsc'); ?> " name="updateoption" /> </div> </div> </form> <?php }
public function display() { global $wpdb, $wpsc_shipping_modules, $external_shipping_modules, $internal_shipping_modules; // sort into external and internal arrays. foreach ($GLOBALS['wpsc_shipping_modules'] as $key => $module) { if (empty($module)) { continue; } if (isset($module->is_external) && $module->is_external) { $external_shipping_modules[$key] = $module; } else { $internal_shipping_modules[$key] = $module; } } ?> <h3><?php esc_html_e('Shipping Settings', 'wp-e-commerce'); ?> </h3> <input type='hidden' name='shipping_submits' value='true' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <table class='form-table'> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <tr> <th scope="row"><?php _e('Use Shipping', 'wp-e-commerce'); ?> </th> <td> <input type='hidden' value='1' name='wpsc_options[do_not_use_shipping]' /> <input type='checkbox' value='0' name='wpsc_options[do_not_use_shipping]' id='do_not_use_shipping' <?php checked('0', get_option('do_not_use_shipping')); ?> /> <label for='do_not_use_shipping'><?php _e('Enable Shipping settings', 'wp-e-commerce'); ?> </label> <p class='description'><?php esc_html_e('If you are only selling digital downloads, you should turn this off.', 'wp-e-commerce'); ?> </p> </td> </tr> <tr> <th><?php esc_html_e('Shipping Origin City', 'wp-e-commerce'); ?> </th> <td> <input type='text' name='wpsc_options[base_city]' value='<?php echo esc_attr(get_option('base_city')); ?> ' /> <p class='description'><?php esc_html_e('The name of the city where you fulfill and ship orders from. This enables us to give your customers more accurate shipping pricing.', 'wp-e-commerce'); ?> </p> </td> </tr> <tr> <th><?php esc_html_e('Shipping Origin Zipcode/Postcode', 'wp-e-commerce'); ?> </th> <td> <input type='text' name='wpsc_options[base_zipcode]' value='<?php echo esc_attr(get_option('base_zipcode')); ?> ' /> <p class='description'> <?php esc_html_e('The ZIP code / Postal code from where you fulfill and ship orders.', 'wp-e-commerce'); ?> <br /> <?php esc_html_e('If you are based in the United States, then this field is required in order for the UPS and USPS Shipping Calculators to work.', 'wp-e-commerce'); ?> </p> </td> </tr> <tr> <th scope="row"><?php _e('Shipwire', 'wp-e-commerce'); ?> <span style='color: red;'></span></th> <td> <input type='hidden' value='0' name='wpsc_options[shipwire]' /> <input type='checkbox' onclick='jQuery("#wpsc_shipwire_setting").toggle( jQuery(this).prop("checked") );' value='1' name='wpsc_options[shipwire]' id='shipwire' <?php checked('1', get_option('shipwire')); ?> /> <label for='shipwire'><?php _e('Enable Shipwire Integration', 'wp-e-commerce'); ?> </label> <p class='description'><?php printf(__('<a href="%1$s" target="_blank">Shipwire</a> provide e-commerce fulfillment warehouses. WP eCommerce can integrate stock inventory and shipping tracking with their service.', 'wp-e-commerce'), 'http://www.shipwire.com/pp/o.php?id=11922'); ?> </p> </td> </tr> <?php switch (get_option('shipwire')) { case 1: $shipwire_settings = ''; break; case 0: default: $shipwire_settings = 'style="display: none;"'; break; } ?> <tr id='wpsc_shipwire_setting' <?php echo $shipwire_settings; ?> > <th> </th> <td> <table> <tr> <th><?php esc_html_e('Shipwire Email', 'wp-e-commerce'); ?> </th> <td><input type="text" name='wpsc_options[shipwireemail]' value="<?php echo esc_attr(get_option('shipwireemail')); ?> " /></td> </tr> <tr> <th><?php esc_html_e('Shipwire Password', 'wp-e-commerce'); ?> </th> <td><input type="text" name='wpsc_options[shipwirepassword]' value="<?php echo esc_attr(get_option('shipwirepassword')); ?> " /></td> </tr> <tr> <th><?php esc_html_e('Use Test Server?', 'wp-e-commerce'); ?> </th> <td><input type="checkbox" name='wpsc_options[shipwire_test_server]' value="0" <?php checked('1', get_option('shipwire_test_server', '0')); ?> /></td> </tr> <tr> <th><?php esc_html_e('Force Sync with Shipwire', 'wp-e-commerce'); ?> </th> <td> <a class="shipwire_sync button"><?php esc_html_e('Update Tracking and Inventory', 'wp-e-commerce'); ?> </a> <img src="<?php echo esc_url(wpsc_get_ajax_spinner()); ?> " class="ajax-feedback" title="" alt="" /> </td> </tr> </table> </td> </tr> <?php $currency_data = WPSC_Countries::get_currency_data(get_option('currency_type'), true); if ($currency_data['symbol'] != '') { $currency_sign = $currency_data['symbol_html']; } else { $currency_sign = $currency_data['code']; } ?> <tr> <th><?php _e('Free Shipping Discount', 'wp-e-commerce'); ?> </th> <td> <?php if (get_option('shipping_discount') == 1) { $shipping_discount_settings = 'style=\'display: block;\''; } else { $shipping_discount_settings = ''; } ?> <input type='hidden' value='0' name='wpsc_options[shipping_discount]' /> <input type='checkbox' onclick='jQuery("#shipping_discount_value").toggle( jQuery(this).prop("checked") );' value='1' name='wpsc_options[shipping_discount]' id='shipping_discount' <?php checked('1', get_option('shipping_discount')); ?> /> <label for='shipping_discount'><?php _e('Enable Free Shipping Discount', 'wp-e-commerce'); ?> </label> </td> </tr> <tr> <td> </td> <td colspan="2"> <?php $value = wpsc_format_number(get_option('shipping_discount_value')); ?> <div <?php echo $shipping_discount_settings; ?> id='shipping_discount_value'> <?php printf(__('Sales over or equal to %1$s<input type="text" size="6" name="wpsc_options[shipping_discount_value]" value="%2$s" id="shipping_discount_value" /> will receive free shipping.', 'wp-e-commerce'), $currency_sign, esc_attr($value)); ?> </div> </td> </tr> </table> <?php submit_button(__('Save Changes', 'wp-e-commerce')); ?> <h3><?php _e('Shipping Modules', 'wp-e-commerce'); ?> </h3> <p class='description'><?php _e('To enable shipping in WP eCommerce you must select which shipping methods you want to enable on your site.', 'wp-e-commerce'); ?> </p> <p class='description'> <strong><?php _e('Tip', 'wp-e-commerce'); ?> </strong>: <?php printf(__('For fixed-price shipping options such as "Pickup - $0, Overnight - $10, Same day - $20, etc.", install our free <a href="%1$s">Fixed Rate Shipping</a> plugin.', 'wp-e-commerce'), 'http://wordpress.org/extend/plugins/wp-e-commerce-fixed-rate-shipping/'); ?> </p> <h4><?php _e('Internal Shipping Calculators', 'wp-e-commerce'); ?> </h4> <table id='wpsc-shipping-options-internal' class='wpsc-edit-module-options wp-list-table widefat plugins'> <thead> <tr> <th scope="col" id="wpsc-shipping-options-internal-active" class="manage-column"><?php _e('Active', 'wp-e-commerce'); ?> </th> <th scope="col" id="wpsc-shipping-options-internal-name" class="manage-column column-name"><?php _e('Shipping Calculator', 'wp-e-commerce'); ?> </th> </tr> </thead> <tfoot> <tr> <th scope="col" id="wpsc-shipping-options-internal-active" class="manage-column"><?php _e('Active', 'wp-e-commerce'); ?> </th> <th scope="col" id="wpsc-shipping-options-internal-name" class="manage-column column-name"><?php _e('Shipping Calculator', 'wp-e-commerce'); ?> </th> </tr> </tfoot> <tbody> <?php foreach ($internal_shipping_modules as $shipping) { $force = $shipping->getInternalName() === (string) get_user_option('wpsc_settings_selected_shipping_module', get_current_user_id()); $this->shipping_list_item($shipping, $force); } ?> </tbody> </table> <?php submit_button(__('Save Changes', 'wp-e-commerce')); ?> <h4><?php _e('External Shipping Calculators', 'wp-e-commerce'); ?> </h4> <?php if (!function_exists('curl_init')) { ?> <p style='color: red; font-size:8pt; line-height:10pt;'> <?php _e('The following shipping modules all need cURL which is not installed on this server. You may need to contact your web hosting provider to get it set up. ', 'wp-e-commerce'); ?> </p> <?php } ?> <table id='wpsc-shipping-options-external' class='wpsc-edit-module-options wp-list-table widefat plugins'> <thead> <tr> <th scope="col" id="wpsc-shipping-options-external-active" class="manage-column"><?php _e('Active', 'wp-e-commerce'); ?> </th> <th scope="col" id="wpsc-shipping-options-external-name" class="manage-column column-name"><?php _e('Shipping Calculator', 'wp-e-commerce'); ?> </th> </tr> </thead> <tfoot> <tr> <th scope="col" id="wpsc-shipping-options-external-active" class="manage-column"><?php _e('Active', 'wp-e-commerce'); ?> </th> <th scope="col" id="wpsc-shipping-options-external-name" class="manage-column column-name"><?php _e('Shipping Calculator', 'wp-e-commerce'); ?> </th> </tr> </tfoot> <tbody> <?php foreach ($external_shipping_modules as $shipping) { $force = $shipping->getInternalName() === (string) get_user_option('wpsc_settings_selected_shipping_module', get_current_user_id()); $this->shipping_list_item($shipping, $force); } ?> </tbody> </table> <?php }
function wpsc_options_shipping() { global $wpdb, $external_shipping_modules, $internal_shipping_modules; // sort into external and internal arrays. foreach ($GLOBALS['wpsc_shipping_modules'] as $key => $module) { if ($module->is_external == true) { $external_shipping_modules[$key] = $module; } else { $internal_shipping_modules[$key] = $module; } } $currency_data = $wpdb->get_row("SELECT `symbol`,`symbol_html`,`code` FROM `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `id`='" . get_option('currency_type') . "' LIMIT 1", ARRAY_A); if ($currency_data['symbol'] != '') { $currency_sign = $currency_data['symbol_html']; } else { $currency_sign = $currency_data['code']; } //get shipping options that are selected $selected_shippings = get_option('custom_shipping_options'); ?> <form name='cart_options' id='cart_options' method='post' action=''> <script language='JavaScript' type='text/javascript'> function selectgateway() { document.forms.shippingopt.submit(); } </script> <div class="wrap"> <div class="metabox-holder"> <form name='shippingopt' method='post' id='shipping_options' action=''> <input type='hidden' name='shipping_submits' value='true' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php if (get_option('custom_gateway') == 1) { $custom_gateway_hide = "style='display:block;'"; $custom_gateway1 = 'checked="checked"'; } else { $custom_gateway_hide = "style='display:none;'"; $custom_gateway2 = 'checked="checked"'; } ?> <h2 class='wpsc_special'><?php echo __('Shipping Options', 'wpsc'); ?> </h2> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <?php if (IS_WP27) { ?> <div class='postbox'> <h3 class='hndle'><?php echo __('General Settings', 'wpsc'); ?> </h3> <div class='inside'> <?php } else { ?> <div class="categorisation_title"> <strong class="form_group"> <?php echo __('General Settings', 'wpsc'); ?> </strong> <br class="clear"/> </div> <?php } ?> <table class='wpsc_options form-table'> <tr> <th scope="row"> <?php echo __('Use Shipping', 'wpsc'); ?> : </th> <td> <?php $do_not_use_shipping = get_option('do_not_use_shipping'); // exit($do_not_use_shipping); $do_not_use_shipping1 = ""; $do_not_use_shipping2 = ""; switch ($do_not_use_shipping) { case 1: $do_not_use_shipping1 = "checked ='checked'"; break; case 0: default: $do_not_use_shipping2 = "checked ='checked'"; break; } ?> <input type='radio' value='0' name='wpsc_options[do_not_use_shipping]' id='do_not_use_shipping2' <?php echo $do_not_use_shipping2; ?> /> <label for='do_not_use_shipping2'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' value='1' name='wpsc_options[do_not_use_shipping]' id='do_not_use_shipping1' <?php echo $do_not_use_shipping1; ?> /> <label for='do_not_use_shipping1'><?php echo __('No', 'wpsc'); ?> </label><br /> <?php echo __('If you are only selling digital downloads, you should select no to disable the shipping on your site.', 'wpsc'); ?> </td> </tr> <tr> <th><?php echo __('Base Zipcode/Postcode:', 'wpsc'); ?> </th> <td> <input type='text' name='wpsc_options[base_zipcode]' value='<?php echo get_option('base_zipcode'); ?> ' /> <br /><?php echo __('If you are based in America then you need to set your own Zipcode for UPS and USPS to work. This should be the Zipcode for your Base of Operations.', 'wpsc'); ?> </td> </tr> <?php $shipwire1 = ""; $shipwire2 = ""; switch (get_option('shipwire')) { case 1: $shipwire1 = "checked ='checked'"; $shipwire_settings = 'style=\'display: block;\''; break; case 0: default: $shipwire2 = "checked ='checked'"; $shipwire_settings = ''; break; } ?> <tr> <th scope="row"> <?php echo __('ShipWire Settings', 'wpsc'); ?> <span style='color: red;'></span> : </th> <td> <input type='radio' onclick='jQuery("#wpsc_shipwire_setting").show()' value='1' name='wpsc_options[shipwire]' id='shipwire1' <?php echo $shipwire1; ?> /> <label for='shipwire1'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' onclick='jQuery("#wpsc_shipwire_setting").hide()' value='0' name='wpsc_options[shipwire]' id='shipwire2' <?php echo $shipwire2; ?> /> <label for='shipwire2'><?php echo __('No', 'wpsc'); ?> </label> <?php $shipwireemail = get_option("shipwireemail"); $shipwirepassword = get_option("shipwirepassword"); ?> <div id='wpsc_shipwire_setting' <?php echo $shipwire_settings; ?> > <table> <tr><td><?php echo __('ShipWire Email', 'wpsc'); ?> :</td><td> <input type="text" name='wpsc_options[shipwireemail]' value="<?php echo $shipwireemail; ?> " /></td></tr> <tr><td><?php echo __('ShipWire Password', 'wpsc'); ?> :</td><td><input type="text" name='wpsc_options[shipwirepassword]' value="<?php echo $shipwirepassword; ?> " /></td></tr> <tr><td><a onclick='shipwire_sync()' style="cursor:pointer;">Sync product</a></td></tr> </table> </div> </td> </tr> <tr> <th scope="row"> <?php echo __('Enable Free Shipping Discount', 'wpsc'); ?> </th> <td> <?php if (get_option('shipping_discount') == 1) { $selected2 = ''; $selected1 = 'checked="checked"'; $shipping_discount_settings = 'style=\'display: block;\''; } else { $selected2 = 'checked="checked"'; $selected1 = ''; $shipping_discount_settings = ''; } ?> <input type='radio' onclick='jQuery("#shipping_discount_value").show()' value='1' name='wpsc_options[shipping_discount]' id='shipping_discount1' <?php echo $selected1; ?> /> <label for='shipping_discount1'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' onclick='jQuery("#shipping_discount_value").hide()' value='0' name='wpsc_options[shipping_discount]' id='shipping_discount2' <?php echo $selected2; ?> /> <label for='shipping_discount2'><?php echo __('No', 'wpsc'); ?> </label> </td> </tr> <tr> <td> </td> <td colspan="2"> <?php $value = get_option('shipping_discount_value'); ?> <div <?php echo $shipping_discount_settings; ?> id='shipping_discount_value'> Sales over or equal to: <?php echo $currency_sign; ?> <input type='text' size='6' name='wpsc_options[shipping_discount_value]' value='<?php echo $value; ?> ' id='shipping_discount_value' /> will receive free shipping. </div> </td> </tr> </table> <?php if (IS_WP27) { ?> </div> </div> <?php do_action('wpsc_settings_shipping_general_end'); //1bigidea ?> <?php } ?> <table id='gateway_options' > <tr> <td class='select_gateway'> <?php if (IS_WP27) { ?> <div class='postbox'> <h3 class='hndle'><?php echo __('Shipping Modules', 'wpsc'); ?> </h3> <div class='inside'> <?php } else { ?> <div class="categorisation_title"> <strong class="form_group"><?php echo __('Shipping Modules', 'wpsc'); ?> </strong> </div> <?php } ?> <p> <?php echo __('To enable shipping in WP e-Commerce you must select which shipping methods you want to enable on your site', 'wpsc'); ?> <?php if (!phpMinV('5')) { echo __('<br /><strong>UPS has been deactivated because you are running PHP4, please upgrade to PHP5 to enable UPS.</strong>', 'wpsc'); } ?> </p> <br /> <p> <strong><?php echo __('Internal Shipping Calculators', 'wpsc'); ?> </strong> </p> <?php foreach ($internal_shipping_modules as $shipping) { // exit("<pre>".print_r($shipping,1)."</pre>"); if (in_array($shipping->getInternalName(), (array) $selected_shippings)) { ?> <div class='wpsc_shipping_options'> <div class='wpsc-shipping-actions'> | <span class="edit"> <a class='edit-shipping-module' rel="<?php echo $shipping->getInternalName(); ?> " onclick="event.preventDefault();" title="Edit this Shipping Module" href='<?php echo htmlspecialchars(add_query_arg('shipping_module', $shipping->getInternalName())); ?> ' style="cursor:pointer;">Edit</a> </span> | </div> <p><input name='custom_shipping_options[]' checked='checked' type='checkbox' value='<?php echo $shipping->getInternalName(); ?> ' id='<?php echo $shipping->getInternalName(); ?> _id' /><label for='<?php echo $shipping->getInternalName(); ?> _id'><?php echo $shipping->getName(); ?> </label></p> </div> <?php } else { ?> <div class='wpsc_shipping_options'> <div class='wpsc-shipping-actions'> | <span class="edit"> <a class='edit-shippping-module' onclick="event.preventDefault();" rel="<?php echo $shipping->getInternalName(); ?> " title="Edit this Shipping Module" href='<?php echo htmlspecialchars(add_query_arg('shipping_module', $shipping->getInternalName())); ?> ' style="cursor:pointer;">Edit</a> </span> | </div> <p><input name='custom_shipping_options[]' type='checkbox' value='<?php echo $shipping->getInternalName(); ?> ' id='<?php echo $shipping->getInternalName(); ?> _id' /><label for='<?php echo $shipping->getInternalName(); ?> _id'><?php echo $shipping->getName(); ?> </label></p> </div> <?php } } ?> <br /> <p> <strong><?php echo __('External Shipping Calculators', 'wpsc'); ?> </strong> <?php if (!function_exists('curl_init')) { ?> <br /><span style='color: red; font-size:8pt; line-height:10pt;'><?php echo __('The following shipping modules all need cURL which is not installed on this server, you may need to contact your web hosting provider to get it set up. ', 'wpsc'); ?> </span> <?php } ?> </p> <?php // print the internal shipping methods foreach ($external_shipping_modules as $shipping) { $disabled = ''; if ($shipping->requires_curl == true && !function_exists('curl_init')) { $disabled = "disabled='disabled'"; } if (in_array($shipping->getInternalName(), (array) $selected_shippings)) { ?> <div class='wpsc_shipping_options'> <div class="wpsc-shipping-actions"> | <span class="edit"> <a class='edit-shippping-module' onclick="event.preventDefault();" rel="<?php echo $shipping->getInternalName(); ?> " title="Edit this Shipping Module" href='<?php echo htmlspecialchars(add_query_arg('shipping_module', $shipping->getInternalName())); ?> ' style="cursor:pointer;">Edit</a> </span> | </div> <p><input <?php echo $disabled; ?> name='custom_shipping_options[]' checked='checked' type='checkbox' value='<?php echo $shipping->getInternalName(); ?> ' id='<?php echo $shipping->getInternalName(); ?> _id' /><label for='<?php echo $shipping->getInternalName(); ?> _id'><?php echo $shipping->getName(); ?> </label></p> </div> <?php } else { ?> <div class='wpsc_shipping_options'> <div class="wpsc-shipping-actions"> | <span class="edit"> <a class='edit-shippping-module' onclick="event.preventDefault();" rel="<?php echo $shipping->getInternalName(); ?> " title="Edit this Shipping Module" href='<?php echo htmlspecialchars(add_query_arg('shipping_module', $shipping->getInternalName())); ?> ' style="cursor:pointer;">Edit</a> </span> | </div> <p><input <?php echo $disabled; ?> name='custom_shipping_options[]' type='checkbox' value='<?php echo $shipping->getInternalName(); ?> ' id='<?php echo $shipping->getInternalName(); ?> _id' /><label for='<?php echo $shipping->getInternalName(); ?> _id'><?php echo $shipping->getName(); ?> </label></p> </div> <?php } } ?> <div class='submit gateway_settings'> <input type='hidden' value='true' name='update_gateways'/> <input type='submit' value='<?php echo __('Update »', 'wpsc'); ?> ' name='updateoption'/> </div> <?php if (IS_WP27) { ?> </div> </div> <?php } ?> </td> <td class='gateway_settings' rowspan='2'> <div class='postbox'> <?php $shipping_data = wpsc_get_shipping_form($_SESSION['previous_shipping_name']); ?> <h3 class='hndle'><?php echo $shipping_data['name']; ?> </h3> <div class='inside'> <table class='form-table'> <?php echo $shipping_data['form_fields']; ?> </table> <?php if ($shipping_data['has_submit_button'] == 0) { $update_button_css = 'style= "display: none;"'; } ?> <div class='submit' <?php echo $update_button_css; ?> > <input type='submit' value='<?php echo __('Update »', 'wpsc'); ?> ' name='updateoption' /> </div> </div> </td> </tr> </table> </form> </div> </div> </form> <?php }
function wpsc_options_admin() { global $wpdb; ?> <form name='cart_options' id='cart_options' method='post' action=''> <div id="options_admin"> <h2><?php echo __('Admin Settings', 'wpsc'); ?> </h2> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <table class='wpsc_options form-table'> <tr> <th scope="row"><?php echo __('Max downloads per file', 'wpsc'); ?> : </th> <td> <input type='text' size='10' value='<?php echo get_option('max_downloads'); ?> ' name='wpsc_options[max_downloads]' /> </td> </tr> <?php $wpsc_ip_lock_downloads1 = ""; $wpsc_ip_lock_downloads2 = ""; switch (get_option('wpsc_ip_lock_downloads')) { case 1: $wpsc_ip_lock_downloads1 = "checked ='checked'"; break; case 0: default: $wpsc_ip_lock_downloads2 = "checked ='checked'"; break; } ?> <tr> <th scope="row"> <?php echo __('Lock downloads to IP address', 'wpsc'); ?> : </th> <td> <input type='radio' value='1' name='wpsc_options[wpsc_ip_lock_downloads]' id='wpsc_ip_lock_downloads2' <?php echo $wpsc_ip_lock_downloads1; ?> /> <label for='wpsc_ip_lock_downloads2'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' value='0' name='wpsc_options[wpsc_ip_lock_downloads]' id='wpsc_ip_lock_downloads1' <?php echo $wpsc_ip_lock_downloads2; ?> /> <label for='wpsc_ip_lock_downloads1'><?php echo __('No', 'wpsc'); ?> </label><br /> </td> </tr> <?php $wpsc_check_mime_types1 = ""; $wpsc_check_mime_types2 = ""; switch (get_option('wpsc_check_mime_types')) { case 1: $wpsc_check_mime_types2 = "checked ='checked'"; break; case 0: default: $wpsc_check_mime_types1 = "checked ='checked'"; break; } ?> <tr> <th scope="row"> <?php echo __('Check MIME types on file uploads', 'wpsc'); ?> : </th> <td> <input type='radio' value='0' name='wpsc_options[wpsc_check_mime_types]' id='wpsc_check_mime_types2' <?php echo $wpsc_check_mime_types1; ?> /> <label for='wpsc_check_mime_types2'><?php echo __('Yes', 'wpsc'); ?> </label> <input type='radio' value='1' name='wpsc_options[wpsc_check_mime_types]' id='wpsc_check_mime_types1' <?php echo $wpsc_check_mime_types2; ?> /> <label for='wpsc_check_mime_types1'><?php echo __('No', 'wpsc'); ?> </label><br /> <span class="wpscsmall description"> <?php echo __('Warning: Disabling this exposes your site to greater possibility of malicious files being uploaded, we reccomend installing the Fileinfo extention for PHP rather than disabling this.', 'wpsc'); ?> </span> </td> </tr> <tr> <th scope="row"> <?php echo __('Purchase Log Email', 'wpsc'); ?> : </th> <td> <input class='text' name='wpsc_options[purch_log_email]' type='text' size='40' value='<?php echo get_option('purch_log_email'); ?> ' /><br /> <?php _e('i.e. this is the address where your purchase reports are sent.', 'wpsc'); ?> </td> </tr> <tr> <th scope="row"> <?php _e('Purchase Receipt - Reply Address'); ?> : </th> <td> <input class='text' name='wpsc_options[return_email]' type='text' size='40' value='<?php echo get_option('return_email'); ?> ' /> <?php _e('i.e. this is the reply address contained in the purchase receipt sent to the buyer.', 'wpsc'); ?> </td> </tr> <tr> <th scope="row"> <?php _e('Purchase Receipt - Reply Name'); ?> : </th> <td> <input class='text' name='wpsc_options[return_name]' type='text' size='40' value='<?php echo get_option('return_name'); ?> ' /> <?php _e('i.e. this is the "from name" buyers will see in their purchase receipt. ', 'wpsc'); ?> </td> </tr> <tr> <th scope="row"> <?php echo __('Terms and Conditions', 'wpsc'); ?> : </th> <td> <textarea name='wpsc_options[terms_and_conditions]' cols='' rows='' style='width: 300px; height: 200px;'><?php echo stripslashes(get_option('terms_and_conditions')); ?> </textarea> </td> </tr> </table> <h3 class="form_group"><?php echo __('Custom Messages', 'wpsc'); ?> :</h3> <table class='wpsc_options form-table'> <tr> <th colspan="2"><?php echo __('Tags can be used', 'wpsc'); ?> : %shop_name%,<!-- %order_status%,--> %product_list%, %total_price%, %total_shipping%, %find_us%</th> </tr> <tr> <td class='wpsc_td_note' colspan='2'> <span class="wpscsmall description"> Note: The purchase receipt is the message e-mailed to users after purchasing products from your shop. </span> </td> </tr> <tr> <th><strong><?php echo __('Purchase Receipt', 'wpsc'); ?> </strong></th> <td><textarea name="wpsc_options[wpsc_email_receipt]" cols='' rows='' style='width: 300px; height: 200px;'><?php echo stripslashes(get_option('wpsc_email_receipt')); ?> </textarea></td> </tr> <tr> <td class='wpsc_td_note' colspan='2'> <span class="wpscsmall description"> Note: The Admin Report is the email sent to the e-mail address set above as soon as someone successfully buys a product. </span> </td> </tr> <tr> <th><strong><?php echo __('Admin Report', 'wpsc'); ?> </strong></th> <td><textarea name="wpsc_options[wpsc_email_admin]" cols='' rows='' style='width: 300px; height: 200px;'><?php echo stripslashes(get_option('wpsc_email_admin')); ?> </textarea></td> </tr> </table> <h3 class="form_group"><?php echo __("Track and Trace settings", 'wpsc'); ?> :</h3> <table class='wpsc_options form-table'> <tr> <td class='wpsc_td_note' colspan='2'> <span class="wpscsmall description"> Note: The Tracking Subject, is the subject for The Tracking Message email. The Tracking Message is the message e-mailed to users when you click 'Email buyer' on the sales log. This option is only available for purchases with the status of 'Job Dispatched'. Tags you can use in the email message section are %trackid% and %shop_name% </span> </td> </tr> <tr> <th><strong><?php echo __('Tracking Email Subject', 'wpsc'); ?> </strong></th> <td><input name="wpsc_options[wpsc_trackingid_subject]" type='text' value='<?php echo stripslashes(get_option('wpsc_trackingid_subject')); ?> ' /></td> </tr> <tr> <th><strong><?php echo __('Tracking Email Message', 'wpsc'); ?> </strong></th> <td><textarea name="wpsc_options[wpsc_trackingid_message]" cols='' rows='' style='width: 300px; height: 200px;'><?php echo stripslashes(get_option('wpsc_trackingid_message')); ?> </textarea></td> </tr> </table> <h3 class="form_group"><?php echo __('URL Settings', 'wpsc'); ?> :</h3> <table class='wpsc_options form-table'> <tr class='merged'> <th scope="row"> <?php echo __('The location of the product list', 'wpsc'); ?> : </th> <td> <input class='text' type='text' size='50' value='<?php echo get_option('product_list_url'); ?> ' name='wpsc_options[product_list_url]' /> </td> </tr> <tr class='merged'> <th scope="row"> <?php echo __('The location of the shopping cart', 'wpsc'); ?> : </th> <td> <input class='text' type='text' size='50' value='<?php echo get_option('shopping_cart_url'); ?> ' name='wpsc_options[shopping_cart_url]' /> </td> </tr> <?php /* <tr class='merged'> <th scope="row"> <?php echo __('The location of the checkout page', 'wpsc');?>: </th> <td> <input class='text' type='text' size='50' value='<?php echo get_option('checkout_url'); ?>' name='checkout_url' /> </td> </tr>*/ ?> <tr class='merged'> <th scope="row"> <?php echo __('Transaction Details URL', 'wpsc'); ?> : </th> <td> <input class='text' type='text' size='50' value='<?php echo get_option('transact_url'); ?> ' name='wpsc_options[transact_url]' /> </td> </tr> <?php if (function_exists("nzshpcrt_user_log")) { ?> <tr class='merged'> <th scope="row"> <?php echo __('User Account URL', 'wpsc'); ?> : </th> <td> <input class='text' type='text' size='50' value='<?php echo get_option('user_account_url'); ?> ' name='wpsc_options[user_account_url]' /> </td> </tr> <?php } $sendback = wp_get_referer(); ?> <tr class='merged'> <td colspan="2"><a href='<?php echo wp_nonce_url($sendback . "&wpsc_admin_action=update_page_urls"); ?> ' ><?php echo __('Update Page URLs', 'wpsc'); ?> </a> | <a href='<?php echo wp_nonce_url($sendback . "&wpsc_admin_action=clean_categories"); ?> '><?php echo __('Fix Product Group Permalinks', 'wpsc'); ?> </a> </td> </tr> </table> <?php /* here end the admin options */ ?> <div class="submit"> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type="submit" value="<?php echo __('Update »', 'wpsc'); ?> " name="updateoption"/> </div> </div> </form> <?php }
function wpsc_options_shipping() { global $wpdb, $external_shipping_modules, $internal_shipping_modules; // sort into external and internal arrays. foreach ($GLOBALS['wpsc_shipping_modules'] as $key => $module) { if ($module->is_external == true) { $external_shipping_modules[$key] = $module; } else { $internal_shipping_modules[$key] = $module; } } $currency_data = $wpdb->get_row("SELECT `symbol`,`symbol_html`,`code` FROM `" . WPSC_TABLE_CURRENCY_LIST . "` WHERE `id`='" . get_option('currency_type') . "' LIMIT 1", ARRAY_A); if ($currency_data['symbol'] != '') { $currency_sign = $currency_data['symbol_html']; } else { $currency_sign = $currency_data['code']; } //get shipping options that are selected $selected_shippings = get_option('custom_shipping_options'); ?> <form name='cart_options' id='cart_options' method='post' action=''> <script language='JavaScript' type='text/javascript'> function selectgateway() { document.forms.shippingopt.submit(); } </script> <div class="wrap"> <div class="metabox-holder"> <form name='shippingopt' method='post' id='shipping_options' action=''> <input type='hidden' name='shipping_submits' value='true' /> <?php wp_nonce_field('update-options', 'wpsc-update-options'); ?> <input type='hidden' name='wpsc_admin_action' value='submit_options' /> <?php if (get_option('custom_gateway') == 1) { $custom_gateway_hide = "style='display:block;'"; $custom_gateway1 = 'checked="checked"'; } else { $custom_gateway_hide = "style='display:none;'"; $custom_gateway2 = 'checked="checked"'; } ?> <h2 class='wpsc_special'><?php echo TXT_WPSC_SHIPPINGOPTIONS; ?> </h2> <?php /* wpsc_setting_page_update_notification displays the wordpress styled notifications */ wpsc_settings_page_update_notification(); ?> <?php if (IS_WP27) { ?> <div class='postbox'> <h3 class='hndle'><?php echo TXT_WPSC_OPTIONS_GENERAL_HEADER; ?> </h3> <div class='inside'> <?php } else { ?> <div class="categorisation_title"> <strong class="form_group"> <?php echo TXT_WPSC_OPTIONS_GENERAL_HEADER; ?> </strong> <br class="clear"/> </div> <?php } ?> <table class='wpsc_options form-table'> <tr> <th scope="row"> <?php echo TXT_WPSC_USE_SHIPPING; ?> : </th> <td> <?php $do_not_use_shipping = get_option('do_not_use_shipping'); // exit($do_not_use_shipping); $do_not_use_shipping1 = ""; $do_not_use_shipping2 = ""; switch ($do_not_use_shipping) { case 1: $do_not_use_shipping1 = "checked ='checked'"; break; case 0: default: $do_not_use_shipping2 = "checked ='checked'"; break; } ?> <input type='radio' value='0' name='wpsc_options[do_not_use_shipping]' id='do_not_use_shipping2' <?php echo $do_not_use_shipping2; ?> /> <label for='do_not_use_shipping2'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' value='1' name='wpsc_options[do_not_use_shipping]' id='do_not_use_shipping1' <?php echo $do_not_use_shipping1; ?> /> <label for='do_not_use_shipping1'><?php echo TXT_WPSC_NO; ?> </label><br /> <?php echo TXT_WPSC_USE_SHIPPING_DESCRIPTION; ?> </td> </tr> <tr> <th><?php echo TXT_WPSC_BASE_ZIPCODE; ?> </th> <td> <input type='text' name='wpsc_options[base_zipcode]' value='<?php echo get_option('base_zipcode'); ?> ' /> <br /><?php echo TXT_WPSC_USPS_DESC; ?> </td> </tr> <?php $shipwire1 = ""; $shipwire2 = ""; switch (get_option('shipwire')) { case 1: $shipwire1 = "checked ='checked'"; $shipwire_settings = 'style=\'display: block;\''; break; case 0: default: $shipwire2 = "checked ='checked'"; $shipwire_settings = ''; break; } ?> <tr> <th scope="row"> <?php echo TXT_WPSC_SHIPWIRESETTINGS; ?> <span style='color: red;'></span> : </th> <td> <input type='radio' onclick='jQuery("#wpsc_shipwire_setting").show()' value='1' name='wpsc_options[shipwire]' id='shipwire1' <?php echo $shipwire1; ?> /> <label for='shipwire1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' onclick='jQuery("#wpsc_shipwire_setting").hide()' value='0' name='wpsc_options[shipwire]' id='shipwire2' <?php echo $shipwire2; ?> /> <label for='shipwire2'><?php echo TXT_WPSC_NO; ?> </label> <?php $shipwireemail = get_option("shipwireemail"); $shipwirepassword = get_option("shipwirepassword"); ?> <div id='wpsc_shipwire_setting' <?php echo $shipwire_settings; ?> > <table> <tr><td><?php echo TXT_WPSC_SHIPWIREEMAIL; ?> :</td><td> <input type="text" name='wpsc_options[shipwireemail]' value="<?php echo $shipwireemail; ?> " /></td></tr> <tr><td><?php echo TXT_WPSC_SHIPWIREPASSWORD; ?> :</td><td><input type="text" name='wpsc_options[shipwirepassword]' value="<?php echo $shipwirepassword; ?> " /></td></tr> <tr><td><a onclick='shipwire_sync()' style="cursor:pointer;">Sync product</a></td></tr> </table> </div> </td> </tr> <tr> <th scope="row"> <?php echo TXT_WPSC_SHIPDISCOUNT; ?> </th> <td> <?php if (get_option('shipping_discount') == 1) { $selected2 = ''; $selected1 = 'checked="checked"'; $shipping_discount_settings = 'style=\'display: block;\''; } else { $selected2 = 'checked="checked"'; $selected1 = ''; $shipping_discount_settings = ''; } ?> <input type='radio' onclick='jQuery("#shipping_discount_value").show()' value='1' name='wpsc_options[shipping_discount]' id='shipping_discount1' <?php echo $selected1; ?> /> <label for='shipping_discount1'><?php echo TXT_WPSC_YES; ?> </label> <input type='radio' onclick='jQuery("#shipping_discount_value").hide()' value='0' name='wpsc_options[shipping_discount]' id='shipping_discount2' <?php echo $selected2; ?> /> <label for='shipping_discount2'><?php echo TXT_WPSC_NO; ?> </label> </td> </tr> <tr> <td> </td> <td colspan="2"> <?php $value = get_option('shipping_discount_value'); ?> <div <?php echo $shipping_discount_settings; ?> id='shipping_discount_value'> Sales over or equal to: <?php echo $currency_sign; ?> <input type='text' size='6' name='wpsc_options[shipping_discount_value]' value='<?php echo $value; ?> ' id='shipping_discount_value' /> will receive free shipping. </div> </td> </tr> </table> <?php if (IS_WP27) { ?> </div> </div> <?php } ?> <table id='gateway_options' > <tr> <td class='select_gateway'> <?php if (IS_WP27) { ?> <div class='postbox'> <h3 class='hndle'><?php echo TXT_WPSC_SHIPPING_MODULES; ?> </h3> <div class='inside'> <?php } else { ?> <div class="categorisation_title"> <strong class="form_group"><?php echo TXT_WPSC_SHIPPING_MODULES; ?> </strong> </div> <?php } ?> <p> <?php echo TXT_WPSC_CHOOSE_SHIPPING; ?> </p> <br /> <p> <strong><?php echo TXT_WPSC_CHOOSE_INTERNAL_SHIPPING_MODULES; ?> </strong> </p> <?php foreach ($internal_shipping_modules as $shipping) { // exit("<pre>".print_r($shipping,1)."</pre>"); if (in_array($shipping->getInternalName(), (array) $selected_shippings)) { ?> <div class='wpsc_shipping_options'> <div class='wpsc-shipping-actions'> | <span class="edit"> <a class='edit-shipping-module' rel="<?php echo $shipping->internal_name; ?> " onclick="event.preventDefault();" title="Edit this Shipping Module" href='<?php echo htmlspecialchars(add_query_arg('shipping_module', $shipping->internal_name)); ?> ' style="cursor:pointer;">Edit</a> </span> | </div> <p><input name='custom_shipping_options[]' checked='checked' type='checkbox' value='<?php echo $shipping->internal_name; ?> ' id='<?php echo $shipping->internal_name; ?> _id' /><label for='<?php echo $shipping->internal_name; ?> _id'><?php echo $shipping->name; ?> </label></p> </div> <?php } else { ?> <div class='wpsc_shipping_options'> <div class='wpsc-shipping-actions'> | <span class="edit"> <a class='edit-shippping-module' onclick="event.preventDefault();" rel="<?php echo $shipping->internal_name; ?> " title="Edit this Shipping Module" href='<?php echo htmlspecialchars(add_query_arg('shipping_module', $shipping->internal_name)); ?> ' style="cursor:pointer;">Edit</a> </span> | </div> <p><input name='custom_shipping_options[]' type='checkbox' value='<?php echo $shipping->internal_name; ?> ' id='<?php echo $shipping->internal_name; ?> _id' /><label for='<?php echo $shipping->internal_name; ?> _id'><?php echo $shipping->name; ?> </label></p> </div> <?php } } ?> <br /> <p> <strong><?php echo TXT_WPSC_CHOOSE_EXTERNAL_SHIPPING_MODULES; ?> </strong> <?php if (!function_exists('curl_init')) { ?> <br /><span style='color: red; font-size:8pt; line-height:10pt;'><?php echo TXT_WPSC_SHIPPING_BUT_NO_CURL; ?> </span> <?php } ?> </p> <?php // print the internal shipping methods foreach ($external_shipping_modules as $shipping) { $disabled = ''; if ($shipping->requires_curl == true && !function_exists('curl_init')) { $disabled = "disabled='disabled'"; } if (in_array($shipping->getInternalName(), (array) $selected_shippings)) { ?> <div class='wpsc_shipping_options'> <div class="wpsc-shipping-actions"> | <span class="edit"> <a class='edit-shippping-module' onclick="event.preventDefault();" rel="<?php echo $shipping->internal_name; ?> " title="Edit this Shipping Module" href='<?php echo htmlspecialchars(add_query_arg('shipping_module', $shipping->internal_name)); ?> ' style="cursor:pointer;">Edit</a> </span> | </div> <p><input <?php echo $disabled; ?> name='custom_shipping_options[]' checked='checked' type='checkbox' value='<?php echo $shipping->internal_name; ?> ' id='<?php echo $shipping->internal_name; ?> _id' /><label for='<?php echo $shipping->internal_name; ?> _id'><?php echo $shipping->name; ?> </label></p> </div> <?php } else { ?> <div class='wpsc_shipping_options'> <div class="wpsc-shipping-actions"> | <span class="edit"> <a class='edit-shippping-module' onclick="event.preventDefault();" rel="<?php echo $shipping->internal_name; ?> " title="Edit this Shipping Module" href='<?php echo htmlspecialchars(add_query_arg('shipping_module', $shipping->internal_name)); ?> ' style="cursor:pointer;">Edit</a> </span> | </div> <p><input <?php echo $disabled; ?> name='custom_shipping_options[]' type='checkbox' value='<?php echo $shipping->internal_name; ?> ' id='<?php echo $shipping->internal_name; ?> _id' /><label for='<?php echo $shipping->internal_name; ?> _id'><?php echo $shipping->name; ?> </label></p> </div> <?php } } ?> <div class='submit gateway_settings'> <input type='hidden' value='true' name='update_gateways'/> <input type='submit' value='<?php echo TXT_WPSC_UPDATE_BUTTON; ?> ' name='updateoption'/> </div> <?php if (IS_WP27) { ?> </div> </div> <?php } ?> </td> <td class='gateway_settings' rowspan='2'> <div class='postbox'> <?php $shipping_data = wpsc_get_shipping_form($_SESSION['previous_shipping_name']); ?> <h3 class='hndle'><?php echo $shipping_data['name']; ?> </h3> <div class='inside'> <table class='form-table'> <?php echo $shipping_data['form_fields']; ?> </table> <?php if ($shipping_data['has_submit_button'] == 0) { $update_button_css = 'style= "display: none;"'; } ?> <div class='submit' <?php echo $update_button_css; ?> > <input type='submit' value='<?php echo TXT_WPSC_UPDATE_BUTTON; ?> ' name='updateoption' /> </div> </div> </td> </tr> </table> </form> </div> </div> </form> <?php }