public function assets() { shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('shiprates'); shopp_localize_script('shiprates', '$ps', array('confirm' => __('Are you sure you want to remove this shipping rate?', 'Shopp'))); $this->nonce($this->request('page')); }
/** * Setup constructor * * @return voidtax * @author Jonathan Davis **/ public function __construct() { parent::__construct(); switch ($this->pagename) { case 'pages': shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('pageset'); $this->pages_ui(); break; case 'images': shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('imageset'); shopp_localize_script('imageset', '$is', array('confirm' => __('Are you sure you want to remove this image preset?', 'Shopp'))); $this->images_ui(); break; case 'management': shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('labelset'); shopp_localize_script('labelset', '$sl', array('prompt' => __('Are you sure you want to remove this order status label?', 'Shopp'))); break; case 'core': case 'setup': shopp_enqueue_script('setup'); break; } }
public function assets() { shopp_enqueue_script('setup'); shopp_localize_script('setup', '$ss', array('loading' => Shopp::__('Loading…'), 'prompt' => Shopp::__('Select your %s…', '%s'))); shopp_enqueue_script('selectize'); $this->nonce($this->request('page')); }
public function assets() { shopp_enqueue_script('ocupload'); shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('taxrates'); shopp_enqueue_script('suggest'); shopp_localize_script('taxrates', '$tr', array('confirm' => __('Are you sure you want to remove this tax rate?', 'Shopp'))); }
/** * Setup constructor * * @return voidtax * @author Jonathan Davis **/ public function __construct() { parent::__construct(); switch ($this->pagename) { case 'taxes': shopp_enqueue_script('ocupload'); shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('taxrates'); shopp_enqueue_script('suggest'); shopp_localize_script('taxrates', '$tr', array('confirm' => __('Are you sure you want to remove this tax rate?', 'Shopp'))); $this->subscreens = array('rates' => __('Rates', 'Shopp'), 'settings' => __('Settings', 'Shopp')); if (isset($_GET['sub'])) { $this->url = add_query_arg(array('sub' => esc_attr($_GET['sub'])), $this->url); } else { $_GET['sub'] = shopp_setting_enabled('taxes') ? 'rates' : 'settings'; } if (shopp_setting_enabled('taxes')) { $this->taxrate_ui(); } break; case 'advanced': shopp_enqueue_script('colorbox'); shopp_enqueue_script('system'); shopp_localize_script('system', '$sys', array('indexing' => __('Product Indexing', 'Shopp'), 'indexurl' => wp_nonce_url(add_query_arg('action', 'shopp_rebuild_search_index', admin_url('admin-ajax.php')), 'wp_ajax_shopp_rebuild_search_index'))); break; case 'storage': shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('storage'); break; case 'shipping': shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('shiprates'); shopp_localize_script('shiprates', '$ps', array('confirm' => __('Are you sure you want to remove this shipping rate?', 'Shopp'))); $this->subscreens = array('rates' => __('Rates', 'Shopp'), 'settings' => __('Settings', 'Shopp')); if (isset($_GET['sub'])) { $this->url = add_query_arg(array('sub' => esc_attr($_GET['sub'])), $this->url); } else { $_GET['sub'] = shopp_setting_enabled('taxes') ? 'rates' : 'settings'; } if (shopp_setting_enabled('shipping')) { $this->shipping_ui(); } break; case 'payments': default: shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('payments'); shopp_localize_script('payments', '$ps', array('confirm' => __('Are you sure you want to remove this payment system?', 'Shopp'))); add_action("load-{$this->screen}", array($this, 'payments_help'), 20); $this->payments_ui(); break; } }
/** * Service constructor * * @return void * @author Jonathan Davis **/ public function __construct() { parent::__construct(); if (isset($_GET['id'])) { wp_enqueue_script('postbox'); shopp_enqueue_script('colorbox'); shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('orders'); shopp_localize_script('orders', '$om', array('co' => __('Cancel Order', 'Shopp'), 'mr' => __('Mark Refunded', 'Shopp'), 'pr' => __('Process Refund', 'Shopp'), 'dnc' => __('Do Not Cancel', 'Shopp'), 'ro' => __('Refund Order', 'Shopp'), 'cancel' => __('Cancel', 'Shopp'), 'rr' => __('Reason for refund', 'Shopp'), 'rc' => __('Reason for cancellation', 'Shopp'), 'mc' => __('Mark Cancelled', 'Shopp'), 'stg' => __('Send to gateway', 'Shopp'))); shopp_enqueue_script('address'); shopp_custom_script('address', 'var regions = ' . json_encode(Lookup::country_zones()) . ';'); add_action('load-' . $this->screen, array($this, 'workflow')); add_action('load-' . $this->screen, array($this, 'layout')); do_action('shopp_order_management_scripts'); } else { add_action('load-' . $this->screen, array($this, 'loader')); add_action('admin_print_scripts', array($this, 'columns')); } do_action('shopp_order_admin_scripts'); }
public function assets() { shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('imageset'); shopp_localize_script('imageset', '$is', array('confirm' => __('Are you sure you want to remove this image preset?', 'Shopp'))); }
public function assets() { shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('labelset'); shopp_localize_script('labelset', '$sl', array('prompt' => __('Are you sure you want to remove this order status label?', 'Shopp'))); }
function shopp_default_script_settings() { $base = array(); $settings = Shopp::currency_format(); if (!empty($settings)) { $currency = array('cp' => $settings['cpos'], 'c' => $settings['currency'], 'p' => (int) $settings['precision'], 't' => $settings['thousands'], 'd' => $settings['decimals']); if (isset($settings['grouping'])) { $currency['g'] = is_array($settings['grouping']) ? join(',', $settings['grouping']) : $settings['grouping']; } } if (!is_admin()) { $base = array('nocache' => is_shopp_page('account')); } // Validation alerts shopp_localize_script('catalog', '$cv', array('field' => __('Your %s is required.', 'Shopp'), 'email' => __('The e-mail address you provided does not appear to be a valid address.', 'Shopp'), 'minlen' => __('The %s you entered is too short. It must be at least %d characters long.', 'Shopp'), 'pwdmm' => __('The passwords you entered do not match. They must match in order to confirm you are correctly entering the password you want to use.', 'Shopp'), 'chkbox' => __('%s must be checked before you can proceed.', 'Shopp'))); // Checkout page settings & localization shopp_localize_script('checkout', '$co', array('ajaxurl' => admin_url('admin-ajax.php'), 'loginname' => Shopp::__('You did not enter a login.'), 'loginpwd' => Shopp::__('You did not enter a password to login with.'), 'badpan' => Shopp::__('Not a valid card number.'), 'submitting' => Shopp::__('Submitting…'), 'error' => Shopp::__('An error occurred while submitting your order. Please try submitting your order again.'), 'timeout' => (int) SHOPP_SUBMIT_TIMEOUT)); // Validation alerts shopp_localize_script('cart', '$ct', array('items' => __('Items', 'Shopp'), 'total' => __('Total', 'Shopp'))); // Calendar localization shopp_localize_script('calendar', '$cal', array('jan' => __('January', 'Shopp'), 'feb' => __('February', 'Shopp'), 'mar' => __('March', 'Shopp'), 'apr' => __('April', 'Shopp'), 'may' => __('May', 'Shopp'), 'jun' => __('June', 'Shopp'), 'jul' => __('July', 'Shopp'), 'aug' => __('August', 'Shopp'), 'sep' => __('September', 'Shopp'), 'oct' => __('October', 'Shopp'), 'nov' => __('November', 'Shopp'), 'dec' => __('December', 'Shopp'), 'sun' => __('Sun', 'Shopp'), 'mon' => __('Mon', 'Shopp'), 'tue' => __('Tue', 'Shopp'), 'wed' => __('Wed', 'Shopp'), 'thu' => __('Thu', 'Shopp'), 'fri' => __('Fri', 'Shopp'), 'sat' => __('Sat', 'Shopp'))); // Product editor: unsaved changes warning shopp_localize_script('product-editor', '$msg', array('confirm' => __('The changes you made will be lost if you navigate away from this page.', 'Shopp'))); $defaults = apply_filters('shopp_js_settings', array_merge($currency, $base)); shopp_localize_script('shopp', '$s', $defaults); }
/** * Enqueue the scripts * * @since 1.4 * * @return void **/ public function assets() { wp_enqueue_script('postbox'); shopp_enqueue_script('colorbox'); shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('selectize'); shopp_enqueue_script('orders'); shopp_custom_script('orders', 'var address = [], carriers = ' . json_encode($this->shipcarriers()) . ';'); shopp_localize_script('orders', '$om', array('co' => Shopp::__('Cancel Order'), 'mr' => Shopp::__('Mark Refunded'), 'pr' => Shopp::__('Process Refund'), 'dnc' => Shopp::__('Do Not Cancel'), 'ro' => Shopp::__('Refund Order'), 'cancel' => Shopp::__('Cancel'), 'rr' => Shopp::__('Reason for refund'), 'rc' => Shopp::__('Reason for cancellation'), 'mc' => Shopp::__('Mark Cancelled'), 'stg' => Shopp::__('Send to gateway'))); shopp_enqueue_script('address'); shopp_custom_script('address', 'var regions = ' . json_encode(ShoppLookup::country_zones()) . ';'); do_action('shopp_order_management_scripts'); }
public function assets() { shopp_enqueue_script('colorbox'); shopp_enqueue_script('system'); shopp_localize_script('system', '$sys', array('indexing' => __('Product Indexing', 'Shopp'), 'indexurl' => wp_nonce_url(add_query_arg('action', 'shopp_rebuild_search_index', admin_url('admin-ajax.php')), 'wp_ajax_shopp_rebuild_search_index'))); }
public function assets() { shopp_enqueue_script('jquery-tmpl'); shopp_enqueue_script('payments'); shopp_localize_script('payments', '$ps', array('confirm' => __('Are you sure you want to remove this payment system?', 'Shopp'))); }