public function screen() { if (!current_user_can('shopp_settings')) { wp_die(__('You do not have sufficient permissions to access this page.')); } // Welcome screen handling if (!empty($_POST['setup'])) { shopp_set_setting('display_welcome', 'off'); } $countries = ShoppLookup::countries(); $basecountry = ShoppBaseLocale()->country(); $countrymenu = Shopp::menuoptions($countries, $basecountry, true); $basestates = ShoppLookup::country_zones(array($basecountry)); $statesmenu = ''; if (!empty($basestates)) { $statesmenu = Shopp::menuoptions($basestates[$basecountry], ShoppBaseLocale()->state(), true); } $targets = shopp_setting('target_markets'); if (is_array($targets)) { $targets = array_map('stripslashes', $targets); } if (!$targets) { $targets = array(); } $zones_ajaxurl = wp_nonce_url(admin_url('admin-ajax.php'), 'wp_ajax_shopp_country_zones'); include $this->ui('setup.php'); }
function settings_meta_box($Customer) { ?> <p> <span> <input type="hidden" name="marketing" value="no" /> <input type="checkbox" id="marketing" name="marketing" value="yes"<?php echo $Customer->marketing == 'yes' ? ' checked="checked"' : ''; ?> /> <label for="marketing" class="inline"> <?php _e('Subscribes to marketing', 'Shopp'); ?> </label> </span> </p> <br class="clear" /> <p> <span> <select name="type"><?php echo Shopp::menuoptions(Lookup::customer_types(), $Customer->type); ?> </select> <label for="type"><?php _e('Customer Type', 'Shopp'); ?> </label> </span> </p> <br class="clear" /> <?php do_action('shopp_customer_editor_settings', $Customer); }
function save_meta_box($Category) { $Shopp = Shopp::object(); $workflows = array("continue" => __('Continue Editing', 'Shopp'), "close" => __('Category Manager', 'Shopp'), "new" => __('New Category', 'Shopp'), "next" => __('Edit Next', 'Shopp'), "previous" => __('Edit Previous', 'Shopp')); ?> <div id="major-publishing-actions"> <input type="hidden" name="id" value="<?php echo $Category->id; ?> " /> <select name="settings[workflow]" id="workflow"> <?php echo Shopp::menuoptions($workflows, shopp_setting('workflow'), true); ?> </select> <input type="submit" class="button-primary" name="save" value="<?php _e('Update', 'Shopp'); ?> " /> </div> <?php }
<script id="delivery-menu" type="text/x-jquery-tmpl"> <?php echo Shopp::menuoptions(ShoppLookup::timeframes_menu(), false, true); ?> </script> <?php $Table->display(); ?> <table class="form-table"> <tr> <th scope="row" valign="top"><label><?php _e('Shipping Carriers', 'Shopp'); ?> </label></th> <td> <div id="carriers" class="multiple-select"> <ul> <li<?php $even = true; $classes[] = 'odd hide-if-no-js'; if (!empty($classes)) { echo ' class="' . join(' ', $classes) . '"'; } $even = !$even; ?> ><input type="checkbox" name="selectall" id="selectall" /><label for="selectall"><strong><?php _e('Select All', 'Shopp'); ?>
/** * Gets the generated conditional rules property menu options. * * @since 1.4 * * @param string $selected The currently selected option. * @return string The generated menu options. **/ public function property_menu($selected = false) { return Shopp::menuoptions(array('product-name' => Shopp::__('Product name is'), 'product-tags' => Shopp::__('Product is tagged'), 'product-category' => Shopp::__('Product in category'), 'customer-type' => Shopp::__('Customer type is')), $selected, true); }
<div id="image-storage-engine" class="storage-settings"><?php if ($ImageStorage) { echo $ImageStorage->ui('image'); } ?> </div> </td> </tr> <tr> <th scope="row" valign="top"><label for="download-storage"><?php _e('Product File Storage', 'Shopp'); ?> </label></th> <td><select name="settings[product_storage]" id="download-storage"> <?php echo Shopp::menuoptions($storage, shopp_setting('product_storage'), true); ?> </select><input type="submit" name="download-settings" value="<?php _e('Settings…', 'Shopp'); ?> " class="button-secondary hide-if-js"/> <div id="download-storage-engine" class="storage-settings"><?php if ($DownloadStorage) { echo $DownloadStorage->ui('download'); } ?> </div> </td> </tr> </table>
<div class="clear"> <?php wp_nonce_field('shopp_categories_manager'); ?> </div> <div class="tablenav top"> <div class="alignleft actions"> <select name="action" id="actions"> <option value="" selected="selected"><?php _e('Bulk Actions…', 'Shopp'); ?> </option> <?php echo Shopp::menuoptions(array('delete' => Shopp::__('Delete')), false, true); ?> </select> <input type="submit" value="<?php esc_attr_e('Apply', 'Shopp'); ?> " id="apply" class="button action" /> </div> <?php $ListTable->pagination('top'); ?> </div> <table class="widefat" cellspacing="0"> <thead>
<p class="clearfix"> <span> <input type="hidden" name="marketing" value="no" /> <input type="checkbox" id="marketing" name="marketing" value="yes"<?php echo $Customer->marketing == 'yes' ? ' checked="checked"' : ''; ?> /> <label for="marketing" class="inline"> <?php _e('Subscribes to marketing', 'Shopp'); ?> </label> </span> </p> <p class="clearfix"> <span> <label for="customer-type"><?php _e('Customer Type', 'Shopp'); ?> </label> <select id="customer-type" name="type"><?php echo Shopp::menuoptions(Lookup::customer_types(), $Customer->type); ?> </select> </span> </p>
function save_meta_box($Product) { $Shopp = Shopp::object(); $workflows = array("continue" => __('Continue Editing', 'Shopp'), "close" => __('Products Manager', 'Shopp'), "new" => __('New Product', 'Shopp'), "next" => __('Edit Next', 'Shopp'), "previous" => __('Edit Previous', 'Shopp')); $date_format = get_option('date_format'); $time_format = get_option('time_format'); ?> <div id="misc-publishing-actions"> <input type="hidden" name="id" value="<?php echo $Product->id; ?> " /> <div class="misc-pub-section misc-pub-section-last"> <input type="hidden" name="status" value="draft" /><input type="checkbox" name="status" value="publish" id="published" tabindex="11" <?php if ($Product->status == "publish") { echo ' checked="checked"'; } ?> /><label for="published"><strong> <?php if ($Product->published() && !empty($Product->id)) { _e('Published', 'Shopp'); } else { _e('Publish', 'Shopp'); } ?> </strong> <span id="publish-status"><?php if ($Product->publish > 1) { printf(__('on: %s', 'Shopp'), "</span><br />" . date($date_format . ' @ ' . $time_format, $Product->publish)); } else { echo "</span>"; } ?> </label> <span id="schedule-toggling"><button type="button" name="schedule-toggle" id="schedule-toggle" class="button-secondary"><?php if ($Product->publish > 1) { _e('Edit', 'Shopp'); } else { _e('Schedule', 'Shopp'); } ?> </button></span> <div id="scheduling"> <div id="schedule-calendar" class="calendar-wrap"> <?php $previous = false; $dateorder = Shopp::date_format_order(true); foreach ($dateorder as $type => $format) { if ($previous == "s" && $type[0] == "s") { continue; } if ("month" == $type) { ?> <input type="text" name="publish[month]" id="publish-month" title="<?php _e('Month', 'Shopp'); ?> " size="2" maxlength="2" value="<?php echo $Product->publish > 1 ? date("n", $Product->publish) : ''; ?> " class="publishdate selectall" /><?php } elseif ("day" == $type) { ?> <input type="text" name="publish[date]" id="publish-date" title="<?php _e('Day', 'Shopp'); ?> " size="2" maxlength="2" value="<?php echo $Product->publish > 1 ? date("j", $Product->publish) : ''; ?> " class="publishdate selectall" /><?php } elseif ("year" == $type) { ?> <input type="text" name="publish[year]" id="publish-year" title="<?php _e('Year', 'Shopp'); ?> " size="4" maxlength="4" value="<?php echo $Product->publish > 1 ? date("Y", $Product->publish) : ''; ?> " class="publishdate selectall" /><?php } elseif ($type[0] == "s") { echo "/"; } $previous = $type[0]; } ?> <br /> <input type="text" name="publish[hour]" id="publish-hour" title="<?php _e('Hour', 'Shopp'); ?> " size="2" maxlength="2" value="<?php echo $Product->publish > 1 ? date("g", $Product->publish) : date('g'); ?> " class="publishdate selectall" />:<input type="text" name="publish[minute]" id="publish-minute" title="<?php _e('Minute', 'Shopp'); ?> " size="2" maxlength="2" value="<?php echo $Product->publish > 1 ? date("i", $Product->publish) : date('i'); ?> " class="publishdate selectall" /> <select name="publish[meridiem]" class="publishdate"> <?php echo Shopp::menuoptions(array('AM' => __('AM', 'Shopp'), 'PM' => __('PM', 'Shopp')), date('A', $Product->publish), true); ?> </select> </div> </div> </div> </div> <div id="major-publishing-actions"> <select name="settings[workflow]" id="workflow"> <?php echo menuoptions($workflows, shopp_setting('workflow'), true); ?> </select> <input type="submit" class="button-primary" name="save" value="<?php _e('Save Product', 'Shopp'); ?> " /> </div> <?php }
public function data() { $Purchase = $this->Purchase; $names = explode(' ', $Purchase->shipname); $firstname = array_shift($names); $lastname = join(' ', $names); if (empty($Purchase->_shipping_states) && !empty($Purchase->shipstate)) { $statemenu = array($Purchase->shipstate => $Purchase->shipstate); } else { Shopp::menuoptions($Purchase->_shipping_states, $Purchase->shipstate, true); } return array('${type}' => 'shipping', '${firstname}' => $firstname, '${lastname}' => $lastname, '${address}' => $Purchase->shipaddress, '${xaddress}' => $Purchase->shipxaddress, '${city}' => $Purchase->shipcity, '${state}' => $Purchase->shipstate, '${postcode}' => $Purchase->shippostcode, '${country}' => $Purchase->shipcountry, '${statemenu}' => $statemenu, '${countrymenu}' => Shopp::menuoptions($Purchase->_countries, $Purchase->shipcountry, true)); }
</span> <span id="${type}-state-inputs"> <label for="${type}-state"><?php Shopp::_e('State / Province'); ?> </label> <select name="${type}[state]" id="${type}-state-menu">${statemenu}</select> <input type="text" name="${type}[state]" id="${type}-state" value="${state}" size="12" disabled="disabled" class="hidden" /> </span> </p> <p class="inline-fields"> <span> <label for="${type}-postcode"><?php Shopp::_e('Postal Code'); ?> </label> <input type="text" name="${type}[postcode]" id="${type}-postcode" value="${postcode}" size="10" /><br /> </span> <span> <label for="${type}-country"><?php Shopp::_e('Country'); ?> </label> <select name="${type}[country]" id="${type}-country"> <?php echo Shopp::menuoptions($Customer->_countries, 'billing' == $type ? $Customer->Billing->country : $Customer->Shipping->country, true); ?> </select> </span> </p>
$default = array('tracking' => '', 'carrier' => ''); $shipment = isset($_POST['shipment']) ? $_POST['shipment'] : array($default); $shipments = (int) $_POST['shipments']; if (isset($_POST['delete-shipment'])) { $queue = array_keys($_POST['delete-shipment']); foreach ($queue as $index) { array_splice($shipment, $index, 1); } } if (isset($_POST['add-shipment'])) { $shipment[] = $default; } // Build the shipment entry UIs foreach ($shipment as $id => $package) { extract($package); $menu = Shopp::menuoptions($carriers_menu, $carrier, true); $shipmentuis = ShoppUI::template($shipmentui, array('${id}' => $id, '${num}' => $id + 1, '${tracking}' => $tracking, '${carriermenu}' => $menu)); } echo ShoppUI::template($shipnotice_ui, array('${shipments}' => $shipmentuis, '${shipmentnum}' => count($shipment) + 1)); } if ('refund-order' == $action) { $data = array('${action}' => 'refund', '${title}' => __('Refund Order', 'Shopp'), '${reason}' => __('Reason for refund', 'Shopp'), '${send}' => __('Send to gateway', 'Shopp'), '${cancel}' => __('Cancel Refund', 'Shopp'), '${process}' => __('Process Refund', 'Shopp')); if (isset($_POST['cancel-order'])) { $data = array('${action}' => 'cancel', '${disable_amount}' => ' disabled="disabled"', '${title}' => __('Cancel Order', 'Shopp'), '${reason}' => __('Reason for cancellation', 'Shopp'), '${send}' => __('Send to gateway', 'Shopp'), '${cancel}' => __('Do Not Cancel', 'Shopp'), '${process}' => __('Cancel Order', 'Shopp')); } echo ShoppUI::template($refundui, $data); } ?> </div> </div> </div>
<div class="alignleft actions"> <select name="newstatus"> <?php echo Shopp::menuoptions($statusLabels, false, true); ?> </select> <button type="submit" id="update-button" name="update" value="order" class="button-secondary"><?php _e('Update', 'Shopp'); ?> </button> </div> <div class="alignleft actions filtering"> <select name="range" id="range"> <?php echo Shopp::menuoptions($ranges, $range, true); ?> </select><div id="dates" class="hide-if-js"><div id="start-position" class="calendar-wrap"><input type="text" id="start" name="start" value="<?php echo $startdate; ?> " size="10" class="search-input selectall" /></div> <small>to</small> <div id="end-position" class="calendar-wrap"><input type="text" id="end" name="end" value="<?php echo $enddate; ?> " size="10" class="search-input selectall" /></div> </div> <button type="submit" id="filter-button" name="filter" value="order" class="button-secondary"><?php _e('Filter', 'Shopp'); ?> </button>
public function extra_tablenav($which) { if ('bottom' == $which) { return; } echo '<select name="id" id="payment-option-menu">' . ' <option>' . Shopp::__('Add a payment system…') . '</option>' . ' ' . Shopp::menuoptions($this->installed, false, true) . '</select>' . '<button type="submit" name="add-payment-option" id="add-payment-option" class="button-secondary hide-if-js" tabindex="9999">' . Shopp::__('Add Payment System') . '</button>'; }
_e('Search Products', 'Shopp'); ?> " class="button" /> </p> <div class="tablenav top"> <div class="alignleft actions"> <select name="action" id="actions"> <option value="" selected="selected"><?php _e('Bulk Actions…', 'Shopp'); ?> </option> <?php echo Shopp::menuoptions($actions_menu, false, true); ?> </select> <input type="submit" value="<?php esc_attr_e('Apply', 'Shopp'); ?> " name="apply" id="apply" class="button-secondary action" /> </div> <div class="alignleft actions"> <?php echo $categories_menu; ?> <?php echo $inventory_menu; ?>
<?php if (count(shopp_setting('target_markets')) == 0) { echo '<div class="error"><p>' . Shopp::__('No target markets have been selected in your store setup.') . '</p></div>'; } ?> <script id="property-menu" type="text/x-jquery-tmpl"><?php $propertymenu = array('product-name' => Shopp::__('Product name is'), 'product-tags' => Shopp::__('Product is tagged'), 'product-category' => Shopp::__('Product in category'), 'customer-type' => Shopp::__('Customer type is')); echo Shopp::menuoptions($propertymenu, false, true); ?> </script> <script id="countries-menu" type="text/x-jquery-tmpl"><?php echo Shopp::menuoptions($Table->countries, false, true); ?> </script> <script id="conditional" type="text/x-jquery-tmpl"> <?php ob_start(); ?> <li> <?php echo ShoppUI::button('delete', 'deleterule'); ?> <select name="settings[taxrates][${id}][rules][${ruleid}][p]" class="property">${property_menu}</select> <input type="text" name="settings[taxrates][${id}][rules][${ruleid}][v]" size="25" class="value" value="${rulevalue}" /> <?php echo ShoppUI::button('add', 'addrule'); ?> </li>
</label></th> <td><select name="settings[base_operations][country]" id="base_operations"> <option value=""> </option> <?php echo Shopp::menuoptions($countries, $operations['country'], true); ?> </select> <select name="settings[base_operations][zone]" id="base_operations_zone"<?php if (!isset($zones)) { ?> disabled="disabled" class="hide-if-no-js"<?php } ?> > <?php echo Shopp::menuoptions($zones, $operations['zone'], true); ?> </select> <br /> <?php _e('Select your primary business location.', 'Shopp'); ?> <br /> <?php if (!empty($operations['country'])) { ?> <strong><?php _e('Currency', 'Shopp'); ?> : </strong><?php echo Shopp::money(1000.0);
<thead> <tr><?php print_column_headers('shopp_page_shopp-settings-shipping'); ?> </tr> </thead> <tfoot> <tr><?php print_column_headers('shopp_page_shopp-settings-shipping', false); ?> </tr> </tfoot> <tbody id="shiprates" class="list"> <?php if ($edit && !isset($shiprates[$edit])) { $template_data = array('${mindelivery_menu}' => Shopp::menuoptions($deliverymenu, false, true), '${maxdelivery_menu}' => Shopp::menuoptions($deliverymenu, false, true), '${cancel_href}' => $this->url); $editor = str_replace(array_keys($template_data), $template_data, $editor); $editor = preg_replace('/\\${\\w+}/', '', $editor); echo $editor; } if (count($shiprates) == 0 && !$edit) { ?> <tr id="no-shiprate-settings"><td colspan="6"><?php _e('No shipping methods, yet.', 'Shopp'); ?> </td></tr> <?php } $hidden = get_hidden_columns('shopp_page_shopp-settings-shiprates'); $even = false; foreach ($shiprates as $setting => $module) {
<p class="inline-fields"> <span> <label for="address-postcode"><?php _e('Postal Code', 'Shopp'); ?> </label> <input type="text" name="${type}[postcode]" id="${type}-postcode" value="${postcode}" size="10" /><br /> </span> <span> <label for="address-country"><?php _e('Country', 'Shopp'); ?> </label> <select name="${type}[country]" id="${type}-country"> <?php echo Shopp::menuoptions($Purchase->_countries, 'billing' == $type ? $Purchase->country : $Purchase->shipcountry, true); ?> </select> </span> </p> <div class="editing-controls"> <input type="submit" id="cancel-edit-address" name="cancel-edit-address" value="<?php Shopp::_e('Cancel'); ?> " class="button-secondary" /> <div class="alignright"> <input type="submit" name="submit-address" value="<?php Shopp::_e('Update'); ?> " class="button-primary" /> </div>
public function box() { $options = array('continue' => Shopp::__('Continue Editing'), 'close' => Shopp::__('Category Manager'), 'new' => Shopp::__('New Category'), 'next' => Shopp::__('Edit Next'), 'previous' => Shopp::__('Edit Previous')); $this->references['workflows'] = Shopp::menuoptions($options, shopp_setting('workflow'), true); parent::box(); }
/** * Interface processor for the product list manager * * @author Jonathan Davis * @since 1.0 * @version 1.2 * * @param boolean $workflow True to get workflow data * @return void **/ public function manager() { if (!current_user_can('shopp_products')) { wp_die(__('You do not have sufficient permissions to access this page.')); } // Explicitly recall the loader to reload products inside the admin content $this->loader(); $defaults = array('cat' => false, 'paged' => 1, 'per_page' => 20, 's' => '', 'sl' => '', 'matchcol' => '', 'view' => $this->view, 'is_inventory' => false, 'is_trash' => false, 'is_bestselling' => false, 'categories_menu' => false, 'inventory_menu' => false, 'lowstock' => 0, 'columns' => '', 'orderby' => '', 'order' => '', 'where' => array(), 'joins' => array()); $args = array_merge($defaults, $_GET); $per_page_option = get_current_screen()->get_option('per_page'); if (false !== ($user_per_page = get_user_option($per_page_option['option']))) { $args['per_page'] = $user_per_page; } extract($args, EXTR_SKIP); $url = add_query_arg(array_merge($_GET, array('page' => $this->Admin->pagename('products'))), admin_url('admin.php')); if (empty($categories)) { $categories = array(''); } $categories_menu = wp_dropdown_categories(array('show_option_all' => __('View all categories', 'Shopp'), 'show_option_none' => __('Uncategorized', 'Shopp'), 'hide_empty' => 0, 'hierarchical' => 1, 'show_count' => 0, 'orderby' => 'name', 'selected' => $cat, 'echo' => 0, 'taxonomy' => 'shopp_category')); if ('on' == shopp_setting('inventory')) { $inventory_filters = array('all' => __('View all products', 'Shopp'), 'is' => __('In stock', 'Shopp'), 'ls' => __('Low stock', 'Shopp'), 'oos' => __('Out-of-stock', 'Shopp'), 'ns' => __('Not stocked', 'Shopp')); $inventory_menu = '<select name="sl">' . Shopp::menuoptions($inventory_filters, $sl, true) . '</select>'; } if ('off' == shopp_setting('inventory')) { unset($this->subs['inventory']); } switch ($view) { case 'inventory': if (shopp_setting_enabled('inventory')) { $is_inventory = true; } break; case 'trash': $is_trash = true; break; case 'bestselling': $is_bestselling = true; break; } if ($is_inventory) { $per_page = 50; } $pagenum = absint($paged); $start = $per_page * ($pagenum - 1); $actions_menu = array('publish' => __('Publish', 'Shopp'), 'unpublish' => __('Unpublish', 'Shopp'), 'feature' => __('Feature', 'Shopp'), 'defeature' => __('De-feature', 'Shopp'), 'trash' => __('Move to trash', 'Shopp')); if ($is_trash) { $actions_menu = array('restore' => __('Restore', 'Shopp'), 'delete' => __('Delete permanently', 'Shopp')); } global $Products; $Products = $this->products; $num_pages = ceil($Products->total / $per_page); $ListTable = ShoppUI::table_set_pagination($this->screen, $Products->total, $num_pages, $per_page); $subs = $this->subs; switch ($view) { case 'inventory': if (shopp_setting_enabled('inventory')) { $ui = 'inventory.php'; } break; default: $ui = 'products.php'; break; } include SHOPP_ADMIN_PATH . '/products/' . $ui; }
<input type="text" name="publish[hour]" id="publish-hour" title="<?php _e('Hour', 'Shopp'); ?> " size="2" maxlength="2" value="<?php echo $Product->publish > 1 ? date("g", $Product->publish) : date('g'); ?> " class="publishdate selectall" />:<input type="text" name="publish[minute]" id="publish-minute" title="<?php _e('Minute', 'Shopp'); ?> " size="2" maxlength="2" value="<?php echo $Product->publish > 1 ? date("i", $Product->publish) : date('i'); ?> " class="publishdate selectall" /> <select name="publish[meridiem]" class="publishdate"> <?php echo Shopp::menuoptions(array('AM' => __('AM', 'Shopp'), 'PM' => __('PM', 'Shopp')), date('A', $Product->publish), true); ?> </select> </div> </div> </div> </div> <div id="major-publishing-actions"> <select name="settings[workflow]" id="workflow"> <?php echo menuoptions($workflows, shopp_setting('workflow'), true); ?> </select> <input type="submit" class="button-primary" name="save" value="<?php
function shipto_meta_box($Purchase) { ?> <?php if (isset($_POST['edit-shipping-address']) || empty(ShoppPurchase()->shipping)) { ?> <form action="<?php echo ShoppAdminController::url(array('page' => $page, 'id' => $Purchase->id)); ?> " method="post" id="shipping-address-editor"> <?php $names = explode(' ', $Purchase->shipname); $firstname = array_shift($names); $lastname = join(' ', $names); $address = array('${type}' => 'shipping', '${firstname}' => $firstname, '${lastname}' => $lastname, '${address}' => $Purchase->shipaddress, '${xaddress}' => $Purchase->shipxaddress, '${city}' => $Purchase->shipcity, '${state}' => $Purchase->shipstate, '${postcode}' => $Purchase->shippostcode, '${country}' => $Purchase->shipcountry, '${statemenu}' => Shopp::menuoptions($Purchase->_shipping_states, $Purchase->shipstate, true), '${countrymenu}' => Shopp::menuoptions($Purchase->_countries, $Purchase->shipcountry, true)); echo ShoppUI::template(order_address_editor(), $address); ?> </form> <?php return; } ?> <form action="<?php echo ShoppAdminController::url(array('id' => $Purchase->id)); ?> " method="post" id="shipping-address-editor"></form> <div class="display"> <form action="<?php echo ShoppAdminController::url(array('id' => $Purchase->id)); ?> " method="post"> <?php $targets = shopp_setting('target_markets'); ?> <input type="hidden" id="edit-shipping-address-data" value="<?php $shipname = explode(' ', $Purchase->shipname); $shipfirst = array_shift($shipname); $shiplast = join(' ', $shipname); $address = array('action' => 'update-address', 'type' => 'shipping', 'firstname' => $shipfirst, 'lastname' => $shiplast, 'address' => $Purchase->shipaddress, 'xaddress' => $Purchase->shipxaddress, 'city' => $Purchase->shipcity, 'state' => $Purchase->shipstate, 'postcode' => $Purchase->shippostcode, 'country' => $Purchase->shipcountry, 'statemenu' => Shopp::menuoptions($Purchase->_shipping_states, $Purchase->shipstate, true), 'countrymenu' => Shopp::menuoptions($Purchase->_countries, $Purchase->shipcountry, true)); $js = preg_replace('/\\${([-\\w]+)}/', '$1', json_encode($address)); shopp_custom_script('orders', 'address["shipping"] = ' . $js . ';'); echo esc_attr(json_encode($address)); ?> " /> <input type="submit" id="edit-shipping-address" name="edit-shipping-address" value="<?php _e('Edit', 'Shopp'); ?> " class="button-secondary button-edit" /> </form> <address><big><?php echo esc_html($Purchase->shipname); ?> </big><br /> <?php echo esc_html($Purchase->shipaddress); ?> <br /> <?php if (!empty($Purchase->shipxaddress)) { echo esc_html($Purchase->shipxaddress) . "<br />"; } ?> <?php echo esc_html("{$Purchase->shipcity}" . (!empty($Purchase->shipstate) ? ', ' : '') . " {$Purchase->shipstate} {$Purchase->shippostcode}"); ?> <br /> <?php echo $targets[$Purchase->shipcountry]; ?> </address> </div> <?php }
?> " id="payments" method="post"> <div> <?php wp_nonce_field('shopp-settings-payments'); ?> </div> <div class="tablenav"><div class=" actions"> <select name="id" id="payment-option-menu"> <option><?php _e('Add a payment system…', 'Shopp'); ?> </option> <?php echo Shopp::menuoptions($installed, false, true); ?> </select> <button type="submit" name="add-payment-option" id="add-payment-option" class="button-secondary hide-if-js" tabindex="9999"><?php _e('Add Payment Option', 'Shopp'); ?> </button> </div> </div> <table class="widefat" cellspacing="0"> <thead> <tr><?php print_column_headers('shopp_page_shopp-settings-payments'); ?> </tr>
public function editor($Item) { $deliverymenu = ShoppLookup::timeframes_menu(); echo '<script id="delivery-menu" type="text/x-jquery-tmpl">' . Shopp::menuoptions($deliverymenu, false, true) . '</script>'; $data = array('${mindelivery_menu}' => Shopp::menuoptions($deliverymenu, $Item->settings['mindelivery'], true), '${maxdelivery_menu}' => Shopp::menuoptions($deliverymenu, $Item->settings['maxdelivery'], true), '${fallbackon}' => 'on' == $Item->settings['fallback'] ? 'checked="checked"' : '', '${cancel_href}' => $this->url); echo ShoppUI::template($Item->editor, $data); }
/** * @deprecated Use Shopp::menuoptions() **/ function menuoptions($list, $selected = null, $values = false, $extend = false) { return Shopp::menuoptions($list, $selected, $values, $extend); }
<?php if (count(shopp_setting('target_markets')) == 0) { echo '<div class="error"><p>' . Shopp::__('No target markets have been selected in your store setup.') . '</p></div>'; } ?> <script id="property-menu" type="text/x-jquery-tmpl"><?php $propertymenu = array('product-name' => Shopp::__('Product name is'), 'product-tags' => Shopp::__('Product is tagged'), 'product-category' => Shopp::__('Product in category'), 'customer-type' => Shopp::__('Customer type is')); echo Shopp::menuoptions($propertymenu, false, true); ?> </script> <script id="countries-menu" type="text/x-jquery-tmpl"><?php echo Shopp::menuoptions($this->countries, false, true); ?> </script> <script id="conditional" type="text/x-jquery-tmpl"> <?php ob_start(); ?> <li> <?php echo ShoppUI::button('delete', 'deleterule'); ?> <select name="settings[taxrates][${id}][rules][${ruleid}][p]" class="property">${property_menu}</select> <input type="text" name="settings[taxrates][${id}][rules][${ruleid}][v]" size="25" class="value" value="${rulevalue}" /> <?php echo ShoppUI::button('add', 'addrule'); ?> </li>
<select name="status"> <option value=""><?php esc_html(Shopp::_e('View All Discounts')); ?> </option> <?php echo Shopp::menuoptions($states, $status, true); ?> </select> <select name="type"> <option value=""><?php Shopp::esc_html_e('View All Types'); ?> </option> <?php echo Shopp::menuoptions($types, $type, true); ?> </select> <input type="submit" id="filter-button" value="<?php Shopp::esc_attr_e('Filter'); ?> " class="button-secondary" /> </div> <?php $ListTable->pagination('top'); ?> <div class="clear"></div> </div> <div class="clear"></div>
<?php $editaddress = ShoppAdminCustomerBillingAddressBox::editor($Customer, 'shipping'); $address = array('${type}' => 'shipping', '${address}' => $Customer->Shipping->address, '${xaddress}' => $Customer->Shipping->xaddress, '${city}' => $Customer->Shipping->city, '${state}' => $Customer->Shipping->state, '${postcode}' => $Customer->Shipping->postcode, '${country}' => $Customer->Shipping->country, '${statemenu}' => Shopp::menuoptions($Customer->_shipping_states, $Customer->Shipping->state, true), '${countrymenu}' => Shopp::menuoptions($Customer->_countries, $Customer->Shipping->country, true)); $js = preg_replace('/\\${([-\\w]+)}/', '$1', json_encode($address)); shopp_custom_script('customers', 'address["shipping"] = ' . $js . ';'); ?> <div id="shipping-address-editor" class="editor"> <?php echo ShoppUI::template($editaddress, $address); ?> </div>
?> <script id="statusLabel" type="text/x-jquery-tmpl"> <?php ob_start(); ?> <li id="status-${id}"> <span> <input type="text" name="settings[order_status][${id}]" id="status-${id}" size="14" value="${label}" /><button type="button" class="delete"> <span class="shoppui-minus"><span class="hidden"><?php Shopp::_e('Add'); ?> </span></span> </button><select name="settings[order_states][${id}]" id="state-${id}"> <?php echo Shopp::menuoptions($states, '', true); ?> </select> <button type="button" class="add"> <span class="shoppui-plus"><span class="hidden"><?php Shopp::_e('Add'); ?> </span></span> </button> </span> </li> <?php $statusui = ob_get_contents(); ob_end_clean(); echo $statusui; ?>