" class="button btn_select_store_category" onclick=""> <input type="button" value="<?php echo __('remove', 'wplister'); ?> " class="button btn_remove_store_category" onclick=""> </div> </div> <div style="position:relative; margin: 0 5px; clear:both"> <label for="wpl-text-store_category_2_name" class="text_label"> <?php echo __('Store category', 'wplister'); ?> 2 <?php wplister_tooltip('<b>Store category</b><br>A custom category that the seller created in their eBay Store.<br><br> eBay Stores sellers can create up to three levels of custom categories for their stores. Items can only be listed in root categories, or categories that have no child categories (subcategories).'); ?> </label> <input type="hidden" name="wpl_e2e_store_category_2_id" id="store_category_id_2" value="<?php echo $item_details['store_category_2_id']; ?> " class="" /> <span id="store_category_name_2" class="text_input" style="width:45%;float:left;line-height:2em;"><?php echo $item_details['store_category_2_name']; ?> </span> <div class="category_row_actions"> <input type="button" value="<?php echo __('select', 'wplister'); ?> " class="button btn_select_store_category" onclick="">
?> selected="selected"<?php } ?> ><?php echo __('Use Freight Shipping', 'wplister'); ?> </option> </select> <?php wplister_tooltip('<b>Shipping Service Type</b><br> The shipping cost model offered by the seller<br><br> <b>Calculated Shipping Costs</b>: The cost of shipping is determined in large part by the seller-offered and buyer-selected shipping service. The seller might assess an additional fee via packaging and handling costs. <br><br> <b>Flat Shipping Costs</b>: The seller establishes the cost of shipping and cost of shipping insurance, regardless of what any buyer-selected shipping service might charge the seller. <br><br> <b>Freight Shipping Model</b>: Freight shipping may be used when flat or calculated shipping cannot be used due to the greater weight of the item.<br> Currently, FreightFlat is available only for the US, UK, AU, CA and CAFR sites, and only for domestic shipping. On the US site, FreightFlat applies to shipping with carriers that are not affiliated with eBay.'); ?> </h3> <div class="inside"> <?php include 'edit_shipping_loc.php'; ?> </div> </div>
?> </label> <input type="text" name="wplister_paypal_email" id="wpl-paypal_email" value="<?php echo $wpl_account->paypal_email; ?> " class="text_input" /> <?php if (WPL_Setup::isV2()) { ?> <label for="wpl-oosc_mode" class="text_label"> <?php echo __('Out Of Stock Control', 'wplister'); ?> <?php wplister_tooltip('This option has to be enabled in your eBay account preferences on eBay directly. Please refresh your account details in WP-Lister when you have changed the setting on eBay.'); ?> </label> <select id="wpl-oosc_mode" name="wplister_oosc_mode" class=" required-entry select" disabled > <option value="1" <?php if ($wpl_account->oosc_mode == 1) { echo 'selected'; } ?> ><?php echo __('Active', 'wplister'); ?> </option> <option value="0" <?php if ($wpl_account->oosc_mode == 0) { echo 'selected';
<option value="HiddenStyle" <?php if ($item_details['counter_style'] == 'HiddenStyle') { ?> selected="selected"<?php } ?> >Hidden Counter</option> </select> <br class="clear" /> <label for="wpl-text-sort_order" class="text_label"> <?php echo __('Sort order', 'wplister'); ?> <?php wplister_tooltip('Enter any numeric value to specify a custom sort order for your profiles.<br>Leave this empty to display profiles alphabetically.'); ?> </label> <input type="text" name="wpl_e2e_sort_order" id="wpl-text-sort_order" value="<?php echo @$wpl_item['sort_order']; ?> " class="text_input" /> <br class="clear" /> </div> </div> <?php #if ( ! get_option('wpl_reseller_enable_whitelabel' ) ) : ?> <?php
</div> <?php if (isset($wpl_seller_shipping_profiles) && is_array($wpl_seller_shipping_profiles)) { ?> <?php $wpl_seller_shipping_profiles = EbayShippingModel::sortSellerProfiles($wpl_seller_shipping_profiles); ?> <label for="wpl-text-seller_shipping_profile_id" class="text_label"> <?php echo __('Shipping policy', 'wplister'); ?> <?php wplister_tooltip('Instead of setting your shipping details in WP-Lister you can select a predefined shipping policy from your eBay account.<br><br>Note: Due to limitations in the eBay API you need to select at least one shipping service above, even though it will be overwritten by your shipping policy.<br><br>Please note that if you use a predefined shipping policy, you might have to use payment and return policies as well.'); ?> </label> <select id="wpl-text-seller_shipping_profile_id" name="wpl_e2e_seller_shipping_profile_id" class=" required-entry select" style="width:65%;">> <option value="">-- <?php echo __('no policy', 'wplister'); ?> --</option> <?php foreach ($wpl_seller_shipping_profiles as $seller_profile) { ?> <option value="<?php echo $seller_profile->ProfileID; ?> " <?php
</label> <select multiple="multiple" class="wple_chosen_select" id="wpl_e2e_ShipToLocations" name="wpl_e2e_ShipToLocations[]" data-placeholder="Select locations" style="width: 65%;"> <?php foreach ($wpl_shipping_locations as $location => $desc) { echo '<option value="' . $location . '" ' . selected(!empty($item_details['ShipToLocations']) && in_array($location, $item_details['ShipToLocations']), true) . '>' . $desc . '</option>'; } ?> </select> <br class="clear" /> <label class="text_label"> <?php echo __('Exclude locations', 'wplister'); ?> <?php wplister_tooltip('Select the locations you do not want to ship to. (optional)<br><br>Note: If you leave this empty, your default set of locations as set up in My eBay will be applied - unless you sent a specific set of locations previously in which case it will remain unchanged.<br>To remove the default or previously defined set of locations you have to select "NONE".'); ?> </label> <select multiple="multiple" class="wple_chosen_select" id="wpl_e2e_ExcludeShipToLocations" name="wpl_e2e_ExcludeShipToLocations[]" data-placeholder="Select locations" style="width: 65%;"> <?php foreach ($wpl_exclude_locations as $location => $desc) { echo '<option value="' . $location . '" ' . selected(!empty($item_details['ExcludeShipToLocations']) && in_array($location, $item_details['ExcludeShipToLocations']), true) . '>' . $desc . '</option>'; } ?> </select> <br class="clear" /> </div> <?php
?> <?php if ($wpl_text_log_level > 1) { ?> » <a href="/wp-content/uploads/wp-lister/wplister.log" target="_blank">view log</a> <?php } ?> </p> <label for="wpl-option-log_include_authinfo" class="text_label"> <?php echo __('Include auth debug info in log', 'wplister'); ?> <?php wplister_tooltip('Collect additional debug information when the database log option is enabled.'); ?> </label> <select id="wpl-option-log_include_authinfo" name="wpl_e2e_log_include_authinfo" class=" required-entry select"> <option value="0" <?php if ($wpl_log_include_authinfo == '0') { ?> selected="selected"<?php } ?> ><?php echo __('Disabled', 'wplister'); ?> (default)</option> <option value="1" <?php if ($wpl_log_include_authinfo == '1') {
?> </option> </select> <p class="desc" style="display: block;"> <?php echo __('Automatically update item details from eBay when a listing has ended.', 'wplister'); ?> (experimental) </p> <label for="wpl-archive_days_limit" class="text_label"> <?php echo __('Keep archived items for', 'wplister'); ?> <?php wplister_tooltip('Select how long archived listings should be kept. Older records are removed automatically. The default is 90 days.'); ?> </label> <select id="wpl-archive_days_limit" name="wpl_e2e_archive_days_limit" class=" required-entry select"> <option value="7" <?php if ($wpl_archive_days_limit == '7') { ?> selected="selected"<?php } ?> >7 days</option> <option value="14" <?php if ($wpl_archive_days_limit == '14') { ?> selected="selected"<?php }
_e('not recommended', 'wplister'); ?> )</option> </select> <p class="desc" style="display: block;"> <?php echo __('Enable this to modify the product details page for items currently on auction.', 'wplister'); ?> </p> <label for="wpl-send_weight_and_size" class="text_label"> <?php echo __('Send weight and dimensions', 'wplister'); ?> <?php wplister_tooltip('By default, product weight and dimensions are only sent to eBay when calculated shipping is used.<br>Enable this option to send weight and dimensions for all listings.'); ?> </label> <select id="wpl-send_weight_and_size" name="wpl_e2e_send_weight_and_size" class=" required-entry select"> <option value="default" <?php if ($wpl_send_weight_and_size == 'default') { ?> selected="selected"<?php } ?> ><?php echo __('Only for calculated shipping services', 'wplister'); ?> (<?php _e('default', 'wplister'); ?>
function showCategoryOptions() { global $post; // get listing object $listing = $this->get_current_ebay_item(); $wpl_account_id = $listing && $listing->account_id ? $listing->account_id : get_option('wplister_default_account_id'); $wpl_site_id = $listing ? $listing->site_id : get_option('wplister_ebay_site_id'); $default_text = '<span style="color:silver"><i>— ' . __('will be assigned automatically', 'wplister') . ' —</i></span>'; // primary ebay category $ebay_category_1_id = get_post_meta($post->ID, '_ebay_category_1_id', true); $ebay_category_1_name = $ebay_category_1_id ? EbayCategoriesModel::getFullEbayCategoryName($ebay_category_1_id, $wpl_site_id) : $default_text; // secondary ebay category $ebay_category_2_id = get_post_meta($post->ID, '_ebay_category_2_id', true); $ebay_category_2_name = $ebay_category_2_id ? EbayCategoriesModel::getFullEbayCategoryName($ebay_category_2_id, $wpl_site_id) : $default_text; // primary store category $store_category_1_id = get_post_meta($post->ID, '_ebay_store_category_1_id', true); $store_category_1_name = $store_category_1_id ? EbayCategoriesModel::getFullStoreCategoryName($store_category_1_id, $wpl_account_id) : $default_text; // secondary store category $store_category_2_id = get_post_meta($post->ID, '_ebay_store_category_2_id', true); $store_category_2_name = $store_category_2_id ? EbayCategoriesModel::getFullStoreCategoryName($store_category_2_id, $wpl_account_id) : $default_text; // if no eBay category selected on product level, check profile $profile = $this->get_current_listing_profile(); if ($profile && (empty($ebay_category_1_id) || empty($ebay_category_2_id))) { if (!$ebay_category_1_id && $profile['details']['ebay_category_1_id']) { $ebay_category_1_name = EbayCategoriesModel::getFullEbayCategoryName($profile['details']['ebay_category_1_id'], $wpl_site_id); $ebay_category_1_name = '<span style="color:silver">Profile category: ' . $ebay_category_1_name . ' </span>'; } if (!$ebay_category_2_id && $profile['details']['ebay_category_2_id']) { $ebay_category_2_name = EbayCategoriesModel::getFullEbayCategoryName($profile['details']['ebay_category_2_id'], $wpl_site_id); $ebay_category_2_name = '<span style="color:silver">Profile category: ' . $ebay_category_2_name . ' </span>'; } } // if no Store category selected on product level, check profile if ($profile && (empty($store_category_1_id) || empty($store_category_2_id))) { if (!$store_category_1_id && $profile['details']['store_category_1_id']) { $store_category_1_name = EbayCategoriesModel::getFullStoreCategoryName($profile['details']['store_category_1_id'], $wpl_account_id); $store_category_1_name = '<span style="color:silver">Profile category: ' . $store_category_1_name . ' </span>'; } if (!$store_category_2_id && $profile['details']['store_category_2_id']) { $store_category_2_name = EbayCategoriesModel::getFullStoreCategoryName($profile['details']['store_category_2_id'], $wpl_account_id); $store_category_2_name = '<span style="color:silver">Profile category: ' . $store_category_2_name . ' </span>'; } } $store_categories_message = 'Note: eBay <i>Store</i> categories are selected automatically based on the product categories assigned and your '; $store_categories_message .= '<a href="admin.php?page=wplister-settings&tab=categories" target="_blank">category settings</a>.'; // if ( $profile && ( $profile['details']['store_category_1_id'] || $profile['details']['store_category_2_id'] ) ) { // // $store_categories_message .= ' - unless you set specific store categories in your listing profile or on this page. '; // } else { // // $store_categories_message .= '. Your listing profile <b>'.$profile['profile_name'].'</b> does not use any store categories.'; // // $store_categories_message .= '.'; // } ?> <h4><?php echo __('eBay categories', 'wplister'); ?> </h4> <div style="position:relative; margin: 0 5px;"> <label for="wpl-text-ebay_category_1_name" class="text_label"><?php echo __('Primary eBay category', 'wplister'); ?> </label> <input type="hidden" name="wpl_ebay_category_1_id" id="ebay_category_id_1" value="<?php echo $ebay_category_1_id; ?> " class="" /> <span id="ebay_category_name_1" class="text_input" style="width:45%;float:left;line-height:2em;"><?php echo $ebay_category_1_name; ?> </span> <div class="category_row_actions"> <input type="button" value="<?php echo __('select', 'wplister'); ?> " class="button btn_select_ebay_category" onclick=""> <input type="button" value="<?php echo __('remove', 'wplister'); ?> " class="button btn_remove_ebay_category" onclick=""> </div> </div> <br style="clear:both" /> <div style="position:relative; margin: 0 5px;"> <label for="wpl-text-ebay_category_2_name" class="text_label"><?php echo __('Secondary eBay category', 'wplister'); ?> </label> <input type="hidden" name="wpl_ebay_category_2_id" id="ebay_category_id_2" value="<?php echo $ebay_category_2_id; ?> " class="" /> <span id="ebay_category_name_2" class="text_input" style="width:45%;float:left;line-height:2em;"><?php echo $ebay_category_2_name; ?> </span> <div class="category_row_actions"> <input type="button" value="<?php echo __('select', 'wplister'); ?> " class="button btn_select_ebay_category" onclick=""> <input type="button" value="<?php echo __('remove', 'wplister'); ?> " class="button btn_remove_ebay_category" onclick=""> </div> </div> <br style="clear:both" /> <h4><?php echo __('Store categories', 'wplister'); ?> </h4> <div style="position:relative; margin: 0 5px;"> <label for="wpl-text-store_category_1_name" class="text_label"> <?php echo __('Store category', 'wplister'); ?> 1 <?php wplister_tooltip('<b>Store category</b><br>A custom category that the seller created in their eBay Store.<br><br> eBay Stores sellers can create up to three levels of custom categories for their stores. Items can only be listed in root categories, or categories that have no child categories (subcategories).'); ?> </label> <input type="hidden" name="wpl_ebay_store_category_1_id" id="store_category_id_1" value="<?php echo $store_category_1_id; ?> " class="" /> <span id="store_category_name_1" class="text_input" style="width:45%;float:left;line-height:2em;"><?php echo $store_category_1_name; ?> </span> <div class="category_row_actions"> <input type="button" value="<?php echo __('select', 'wplister'); ?> " class="button btn_select_store_category" onclick=""> <input type="button" value="<?php echo __('remove', 'wplister'); ?> " class="button btn_remove_store_category" onclick=""> </div> </div> <div style="position:relative; margin: 0 5px; clear:both"> <label for="wpl-text-store_category_2_name" class="text_label"> <?php echo __('Store category', 'wplister'); ?> 2 <?php wplister_tooltip('<b>Store category</b><br>A custom category that the seller created in their eBay Store.<br><br> eBay Stores sellers can create up to three levels of custom categories for their stores. Items can only be listed in root categories, or categories that have no child categories (subcategories).'); ?> </label> <input type="hidden" name="wpl_ebay_store_category_2_id" id="store_category_id_2" value="<?php echo $store_category_2_id; ?> " class="" /> <span id="store_category_name_2" class="text_input" style="width:45%;float:left;line-height:2em;"><?php echo $store_category_2_name; ?> </span> <div class="category_row_actions"> <input type="button" value="<?php echo __('select', 'wplister'); ?> " class="button btn_select_store_category" onclick=""> <input type="button" value="<?php echo __('remove', 'wplister'); ?> " class="button btn_remove_store_category" onclick=""> </div> </div> <br style="clear:both" /> <p> <small><?php echo $store_categories_message; ?> </small> </p> <!-- hidden ajax categories tree --> <div id="ebay_categories_tree_wrapper"> <div id="ebay_categories_tree_container"></div> </div> <!-- hidden ajax categories tree --> <div id="store_categories_tree_wrapper"> <div id="store_categories_tree_container"></div> </div> <style type="text/css"> #ebay_categories_tree_wrapper, #store_categories_tree_wrapper { /*max-height: 320px;*/ /*margin-left: 35%;*/ overflow: auto; width: 65%; display: none; } #wplister-ebay-categories .category_row_actions { position: absolute; top: 0; right: 0; } #wplister-ebay-categories .category_row_actions input { width: auto; } a.link_select_category { float: right; padding-top: 3px; text-decoration: none; } a.link_remove_category { padding-left: 3px; text-decoration: none; } </style> <script type="text/javascript"> var wpl_site_id = '<?php echo $wpl_site_id; ?> '; var wpl_account_id = '<?php echo $wpl_account_id; ?> '; /* recusive function to gather the full category path names */ function wpl_getCategoryPathName( pathArray, depth ) { var pathname = ''; if (typeof depth == 'undefined' ) depth = 0; // get name if ( depth == 0 ) { var cat_name = jQuery('[rel=' + pathArray.join('\\\/') + ']').html(); } else { var cat_name = jQuery('[rel=' + pathArray.join('\\\/') +'\\\/'+ ']').html(); } // console.log('path...: ', pathArray.join('\\\/') ); // console.log('catname: ', cat_name); // console.log('pathArray: ', pathArray); // strip last (current) item popped = pathArray.pop(); // console.log('popped: ',popped); // call self with parent path if ( pathArray.length > 2 ) { pathname = wpl_getCategoryPathName( pathArray, depth + 1 ) + ' » ' + cat_name; } else if ( pathArray.length > 1 ) { pathname = cat_name; } return pathname; } jQuery( document ).ready( function () { // select ebay category button jQuery('input.btn_select_ebay_category').click( function(event) { // var cat_id = jQuery(this).parent()[0].id.split('sel_ebay_cat_id_')[1]; e2e_selecting_cat = ('ebay_category_name_1' == jQuery(this).parent().parent().first().find('.text_input')[0].id) ? 1 : 2; var tbHeight = tb_getPageSize()[1] - 120; var tbURL = "#TB_inline?height="+tbHeight+"&width=753&inlineId=ebay_categories_tree_wrapper"; tb_show("Select a category", tbURL); }); // remove ebay category button jQuery('input.btn_remove_ebay_category').click( function(event) { var cat_id = ('ebay_category_name_1' == jQuery(this).parent().parent().first().find('.text_input')[0].id) ? 1 : 2; jQuery('#ebay_category_id_'+cat_id).attr('value',''); jQuery('#ebay_category_name_'+cat_id).html(''); }); // select store category button jQuery('input.btn_select_store_category').click( function(event) { // var cat_id = jQuery(this).parent()[0].id.split('sel_store_cat_id_')[1]; e2e_selecting_cat = ('store_category_name_1' == jQuery(this).parent().parent().first().find('.text_input')[0].id) ? 1 : 2; var tbHeight = tb_getPageSize()[1] - 120; var tbURL = "#TB_inline?height="+tbHeight+"&width=753&inlineId=store_categories_tree_wrapper"; tb_show("Select a category", tbURL); }); // remove store category button jQuery('input.btn_remove_store_category').click( function(event) { var cat_id = ('store_category_name_1' == jQuery(this).parent().parent().first().find('.text_input')[0].id) ? 1 : 2; jQuery('#store_category_id_'+cat_id).attr('value',''); jQuery('#store_category_name_'+cat_id).html(''); }); // jqueryFileTree 1 - ebay categories jQuery('#ebay_categories_tree_container').fileTree({ root: '/0/', script: ajaxurl+'?action=e2e_get_ebay_categories_tree&site_id='+wpl_site_id, expandSpeed: 400, collapseSpeed: 400, loadMessage: 'loading eBay categories...', multiFolder: false }, function(catpath) { // get cat id from full path var cat_id = catpath.split('/').pop(); // get last item - like php basename() // get name of selected category var cat_name = ''; var pathname = wpl_getCategoryPathName( catpath.split('/') ); // console.log('pathname: ',pathname); // update fields jQuery('#ebay_category_id_'+e2e_selecting_cat).attr( 'value', cat_id ); jQuery('#ebay_category_name_'+e2e_selecting_cat).html( pathname ); // close thickbox tb_remove(); if ( e2e_selecting_cat == 1 ) { updateItemSpecifics(); // updateItemConditions(); } }); // jqueryFileTree 2 - store categories jQuery('#store_categories_tree_container').fileTree({ root: '/0/', script: ajaxurl+'?action=e2e_get_store_categories_tree&account_id='+wpl_account_id, expandSpeed: 400, collapseSpeed: 400, loadMessage: 'loading store categories...', multiFolder: false }, function(catpath) { // get cat id from full path var cat_id = catpath.split('/').pop(); // get last item - like php basename() // get name of selected category var cat_name = ''; var pathname = wpl_getCategoryPathName( catpath.split('/') ); // console.log('pathname: ',pathname); if ( pathname.indexOf('[use this category]') > -1 ) { catpath = catpath + '/'; pathname = wpl_getCategoryPathName( catpath.split('/') ); } // update fields jQuery('#store_category_id_'+e2e_selecting_cat).attr( 'value', cat_id ); jQuery('#store_category_name_'+e2e_selecting_cat).html( pathname ); // close thickbox tb_remove(); }); } ); </script> <?php }
echo stripslashes($item_details['returns_description']); ?> </textarea> <br class="clear" /> </div> <?php if (isset($wpl_seller_return_profiles) && is_array($wpl_seller_return_profiles)) { ?> <label for="wpl-text-seller_return_profile_id" class="text_label"> <?php echo __('Return policy', 'wplister'); ?> <?php wplister_tooltip('Instead of setting your return policy details in WP-Lister you can select a predefined return policy from your eBay account.<br><br>Please note that if you use a predefined return policy, you might have to use shipping and payment policies as well.'); ?> </label> <select id="wpl-text-seller_return_profile_id" name="wpl_e2e_seller_return_profile_id" class=" required-entry select"> <option value="">-- <?php echo __('no policy', 'wplister'); ?> --</option> <?php foreach ($wpl_seller_return_profiles as $seller_profile) { ?> <option value="<?php echo $seller_profile->ProfileID; ?> " <?php