Changeset 976205
- Timestamp:
- 08/31/2014 10:51:19 PM (12 years ago)
- Location:
- woocommerce-poor-guys-swiss-knife
- Files:
-
- 138 added
- 5 edited
-
tags/1.9.6 (added)
-
tags/1.9.6/assets (added)
-
tags/1.9.6/assets/css (added)
-
tags/1.9.6/assets/css/accordion_styles.css (added)
-
tags/1.9.6/assets/css/accordion_styles_repository.css (added)
-
tags/1.9.6/assets/css/chosen.css (added)
-
tags/1.9.6/assets/css/chosen.less (added)
-
tags/1.9.6/assets/css/datepicker.css (added)
-
tags/1.9.6/assets/css/images (added)
-
tags/1.9.6/assets/css/images/animated-overlay.gif (added)
-
tags/1.9.6/assets/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_diagonals-thick_20_666666_40x40.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_flat_10_000000_40x100.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_flat_75_ffffff_40x100.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_glass_100_f6f6f6_1x400.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_glass_100_fdf5ce_1x400.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_glass_55_fbf9ee_1x400.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_glass_75_dadada_1x400.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_glass_95_fef1ec_1x400.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png (added)
-
tags/1.9.6/assets/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png (added)
-
tags/1.9.6/assets/css/images/ui-icons_222222_256x240.png (added)
-
tags/1.9.6/assets/css/images/ui-icons_228ef1_256x240.png (added)
-
tags/1.9.6/assets/css/images/ui-icons_2e83ff_256x240.png (added)
-
tags/1.9.6/assets/css/images/ui-icons_454545_256x240.png (added)
-
tags/1.9.6/assets/css/images/ui-icons_888888_256x240.png (added)
-
tags/1.9.6/assets/css/images/ui-icons_cd0a0a_256x240.png (added)
-
tags/1.9.6/assets/css/images/ui-icons_ef8c08_256x240.png (added)
-
tags/1.9.6/assets/css/images/ui-icons_ffd27a_256x240.png (added)
-
tags/1.9.6/assets/css/images/ui-icons_ffffff_256x240.png (added)
-
tags/1.9.6/assets/css/input.css (added)
-
tags/1.9.6/assets/css/jquery-ui-1.10.3.custom.css (added)
-
tags/1.9.6/assets/css/jquery-ui-timepicker-addon.css (added)
-
tags/1.9.6/assets/css/jquery-ui-tooltip.css (added)
-
tags/1.9.6/assets/css/jquery-ui.css (added)
-
tags/1.9.6/assets/css/timepicker.css (added)
-
tags/1.9.6/assets/css/wcpgsk_styles.css (added)
-
tags/1.9.6/assets/images (added)
-
tags/1.9.6/assets/images/ajax-loader.gif (added)
-
tags/1.9.6/assets/images/ajax-loader@2x.gif (added)
-
tags/1.9.6/assets/images/chosen-sprite.png (added)
-
tags/1.9.6/assets/images/chosen-sprite@2x.png (added)
-
tags/1.9.6/assets/js (added)
-
tags/1.9.6/assets/js/accordion.js (added)
-
tags/1.9.6/assets/js/chosen (added)
-
tags/1.9.6/assets/js/chosen/ajax-chosen.jquery.js (added)
-
tags/1.9.6/assets/js/chosen/ajax-chosen.jquery.min.js (added)
-
tags/1.9.6/assets/js/chosen/chosen.jquery.js (added)
-
tags/1.9.6/assets/js/chosen/chosen.jquery.min.js (added)
-
tags/1.9.6/assets/js/chosen/reposistory (added)
-
tags/1.9.6/assets/js/chosen/reposistory/chosen-sprite.png (added)
-
tags/1.9.6/assets/js/chosen/reposistory/chosen-sprite@2x.png (added)
-
tags/1.9.6/assets/js/chosen/reposistory/chosen.css (added)
-
tags/1.9.6/assets/js/chosen/reposistory/chosen.jquery.js (added)
-
tags/1.9.6/assets/js/chosen/reposistory/chosen.jquery.min.js (added)
-
tags/1.9.6/assets/js/chosen/reposistory/chosen.min.css (added)
-
tags/1.9.6/assets/js/chosen/reposistory/chosen.proto.js (added)
-
tags/1.9.6/assets/js/chosen/reposistory/chosen.proto.min.js (added)
-
tags/1.9.6/assets/js/chosen/reposistory/docsupport (added)
-
tags/1.9.6/assets/js/chosen/reposistory/docsupport/chosen.png (added)
-
tags/1.9.6/assets/js/chosen/reposistory/docsupport/oss-credit.png (added)
-
tags/1.9.6/assets/js/chosen/reposistory/docsupport/prism.css (added)
-
tags/1.9.6/assets/js/chosen/reposistory/docsupport/prism.js (added)
-
tags/1.9.6/assets/js/chosen/reposistory/docsupport/style.css (added)
-
tags/1.9.6/assets/js/chosen/reposistory/index.html (added)
-
tags/1.9.6/assets/js/chosen/reposistory/index.proto.html (added)
-
tags/1.9.6/assets/js/chosen/reposistory/options.html (added)
-
tags/1.9.6/assets/js/input.js (added)
-
tags/1.9.6/assets/js/jquery-ui-sliderAccess.js (added)
-
tags/1.9.6/assets/js/jquery-ui-timepicker-addon.js (added)
-
tags/1.9.6/assets/js/localization (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-af.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-bg.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-ca.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-cs.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-de.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-el.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-es.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-et.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-eu.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-fi.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-fr.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-gl.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-he.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-hu.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-id.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-it.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-ja.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-ko.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-lt.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-nl.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-no.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-pl.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-pt-BR.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-pt.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-ro.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-ru.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-sk.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-sv.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-th.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-tr.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-uk.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-vi.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-zh-CN.js (added)
-
tags/1.9.6/assets/js/localization/jquery-ui-timepicker-zh-TW.js (added)
-
tags/1.9.6/assets/js/timepicker-localization.js (added)
-
tags/1.9.6/assets/js/timepicker.js (added)
-
tags/1.9.6/assets/js/wcpgsk-validate.js (added)
-
tags/1.9.6/assets/js/wcpgsk_admin.js (added)
-
tags/1.9.6/classes (added)
-
tags/1.9.6/classes/wcpgsk-validation.php (added)
-
tags/1.9.6/classes/woocommerce-poor-guys-swiss-knife-about.php (added)
-
tags/1.9.6/classes/woocommerce-poor-guys-swiss-knife.php (added)
-
tags/1.9.6/classes/woocommerce_session_helper.php (added)
-
tags/1.9.6/lang (added)
-
tags/1.9.6/lang/wcpgsk-de_DE.mo (added)
-
tags/1.9.6/lang/wcpgsk-de_DE.po (added)
-
tags/1.9.6/lang/wcpgsk-en_US.mo (added)
-
tags/1.9.6/lang/wcpgsk-en_US.po (added)
-
tags/1.9.6/lang/wcpgsk-es_ES.mo (added)
-
tags/1.9.6/lang/wcpgsk-es_ES.po (added)
-
tags/1.9.6/lang/wcpgsk-pt_BR.mo (added)
-
tags/1.9.6/lang/wcpgsk-pt_BR.po (added)
-
tags/1.9.6/lang/wcpgsk.mo (added)
-
tags/1.9.6/lang/wcpgsk.pot (added)
-
tags/1.9.6/license.txt (added)
-
tags/1.9.6/readme.txt (added)
-
tags/1.9.6/wcpgsk-af.php (added)
-
tags/1.9.6/wcpgsk-user.js (added)
-
tags/1.9.6/woocommerce-poor-guys-swiss-knife.php (added)
-
trunk/assets/icon-128x128.png (added)
-
trunk/assets/icon-256x256.png (added)
-
trunk/assets/js/wcpgsk-cart.js (added)
-
trunk/assets/js/wcpgsk_admin.js (modified) (3 diffs)
-
trunk/classes/woocommerce-poor-guys-swiss-knife.php (modified) (25 diffs)
-
trunk/readme.txt (modified) (10 diffs)
-
trunk/wcpgsk-af.php (modified) (1 diff)
-
trunk/woocommerce-poor-guys-swiss-knife.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-poor-guys-swiss-knife/trunk/assets/js/wcpgsk_admin.js
r936643 r976205 281 281 new_row = table.children('tbody').children('tr.wcpgsk_add_field_row').clone(false), 282 282 /*fix hyphen problem*/ 283 //new_id = jQuery('#' + jQuery(this).attr('for') + '_fieldid').val().toLowerCase().replace(/[^a-z0-9_\s]/gi, '').replace(/[_\s]/g, '_'),284 283 new_id = jQuery('#' + jQuery(this).attr('for') + '_fieldid').val().toLowerCase().replace(/[^a-z0-9_\s]/gi, '').replace(/[\s]/g, '_'), 284 285 285 new_type = jQuery('#' + jQuery(this).attr('for') + '_type').val();// Create and add the new field row 286 286 if (new_id.length > 0) { … … 294 294 if (!foundid) { 295 295 new_row.attr( 'class', 'wcpgsk_order_row' ); 296 297 298 296 // Update names 299 297 var count = parseInt(row_count) + 1; … … 306 304 307 305 }); 308 306 //fix new field problem 307 var newfield = new_row.find('[name$="[label_' + new_id + ']"]').val(); 308 alert(newfield); 309 var nfcnt = 1; 310 table.children('tbody').children('tr.wcpgsk_order_row').each(function() { 311 jQuery(this).find('[name*="[label_"]').each(function(){ 312 if ( jQuery(this).val().indexOf(newfield) == 0 ) { 313 nfcnt++; 314 } 315 }); 316 }); 317 if ( nfcnt > 1 ) { 318 new_row.find('[name$="[placeholder_' + new_id + ']"]').val(newfield + nfcnt); 319 new_row.find('[name$="[label_' + new_id + ']"]').val(newfield + nfcnt); 320 } 321 //fix end 309 322 new_row.find('[name$="[ident_' + new_id + ']"]').html(new_id); 310 323 new_row.find('[name$="[button_' + new_id + ']"]').html(new_type); -
woocommerce-poor-guys-swiss-knife/trunk/classes/woocommerce-poor-guys-swiss-knife.php
r972884 r976205 52 52 53 53 add_action('wp_ajax_wcpgsk_save_checkoutjs', array($this, 'wcpgsk_save_checkoutjs_callback')); 54 54 add_action( 'wcpgsk_settings_page_email', array( $this, 'wcpgsk_settings_page_email_wcpgsk' ), 10, 1 ); 55 add_action( 'wcpgsk_settings_page_labels', array( $this, 'wcpgsk_page_labels' ), 10, 1 ); 56 55 57 endif; 56 58 … … 94 96 95 97 add_filter( 'woocommerce_customer_meta_fields', array($this, 'wcpgsk_customer_meta_fields'), 99 ); 98 //add_filter( 'woocommerce_customer_meta_fields', array($this, 'wcpgsk_customer_meta_fields'), 99 ); 99 100 add_filter( 'woocommerce_email_headers', array( $this, 'wcpgsk_email_headers' ), PHP_INT_MAX, 3 ); 96 101 97 102 add_action( 'wp_print_scripts', array($this, 'wcpgsk_handle_scripts'), 100 ); 98 add_action( 'wp_enqueue_scripts', array($this, 'wcpgsk_degenerate'), 100 ); 99 } 100 103 add_action( 'wp_enqueue_scripts', array($this, 'wcpgsk_degenerate'), 100 ); 104 105 add_filter( 'woocommerce_sale_flash', array( $this, 'wcpgsk_sale_flash' ), 10, 3 ); 106 add_action( 'woocommerce_proceed_to_checkout', array( $this, 'wcpgsk_after_cart' ), 10 ); 107 108 add_action( 'woocommerce_init', array( $this, 'wcpgsk_empty_cart' ), PHP_INT_MAX ); 109 110 111 } 112 113 /** 114 * Process empty cart request 115 * 116 * @since 1.9.7 117 * 118 * @access public 119 */ 120 public function wcpgsk_empty_cart() { 121 if ( isset( $_POST['wcpgsk_empty_cart'] ) ) { 122 global $woocommerce; 123 $woocommerce->cart->empty_cart(); 124 } 125 } 126 127 /** 128 * Add empty cart form 129 * 130 * @since 1.9.7 131 * 132 * @access public 133 */ 134 public function wcpgsk_after_cart( ) { 135 $options = get_option( 'wcpgsk_settings' ); 136 if ( isset( $options['cart']['addemptycart'] ) && $options['cart']['addemptycart'] ) : 137 if ( isset( $options['process']['confirmemptycart'] ) && !empty( $options['process']['confirmemptycart'] ) ) : 138 $eclabel = isset( $options['process']['emptycartlabel'] ) && !empty( $options['process']['emptycartlabel'] ) ? $options['process']['emptycartlabel'] : "Empty cart"; 139 $cclabel = isset( $options['process']['confirmemptycart'] ) && !empty( $options['process']['confirmemptycart'] ) ? $options['process']['confirmemptycart'] : "Yes, empty cart"; 140 echo '<div style="float:left;display:inline-block;padding:0 5px 0 5px;" class="wcpgsk_empty_cart"><input type="button" class="button" style="width:100%" id="wcpgsk_confirm_empty_cart" value="' . __( $eclabel, WCPGSK_DOMAIN) . '"/></div>'; 141 echo '<div style="float:left;display:inline-block;padding:0 5px 0 5px;" class="wcpgsk_empty_cart"><input type="submit" class="button" style="display:none;width:100%" id="wcpgsk_empty_cart" name="wcpgsk_empty_cart" value="' . __( $cclabel, WCPGSK_DOMAIN) . '"></div>'; 142 else : 143 $eclabel = isset( $options['process']['emptycartlabel'] ) && !empty( $options['process']['emptycartlabel'] ) ? $options['process']['emptycartlabel'] : "Empty cart"; 144 echo '<div style="float:left;display:inline-block;padding:0 5px 0 5px;" class="wcpgsk_empty_cart"><input type="submit" class="button" name="wcpgsk_empty_cart" value="' . __( $eclabel, WCPGSK_DOMAIN) . '"></div>'; 145 endif; 146 endif; 147 } 148 149 150 151 /** 152 * Sale flash text 153 * 154 * @since 1.9.7 155 * 156 * @access public 157 * @param string $flash 158 * @param mixed $post 159 * @param mixed $product 160 * @return string 161 */ 162 public function wcpgsk_sale_flash( $flash, $post, $product ) { 163 $options = get_option( 'wcpgsk_settings' ); 164 if ( isset( $options['process']['onsalelabel'] ) && !empty( $options['process']['onsalelabel'] ) ) : 165 $flash = '<span class="onsale">' . __( $options['process']['onsalelabel'], WCPGSK_DOMAIN ) . '</span>'; 166 endif; 167 return $flash; 168 } 169 170 /** 171 * Add additional email headers 172 * 173 * @since 1.9.7 174 * 175 * @access public 176 * @param string $headers (existing) 177 * @param string $context 178 * @param mixed $email 179 * @return string 180 */ 181 public function wcpgsk_email_headers( $headers = '', $context = '', $email = array() ) { 182 $options = get_option( 'wcpgsk_settings' ); 183 if ( isset( $headers ) && !empty( $headers ) ) : 184 $headers = explode( "\r\n", $headers ); 185 else : 186 $headers = array(); 187 endif; 188 if ( isset( $options['email']['wc_cc_email'] ) && !empty( $options['email']['wc_cc_email'] ) && is_email( $options['email']['wc_cc_email'] ) ) : 189 $headers[] = "Cc: " . $options['email']['wc_cc_email']; 190 endif; 191 if ( isset($options['email']['wc_bcc_email']) && !empty( $options['email']['wc_bcc_email'] ) && is_email( $options['email']['wc_bcc_email'] ) ) : 192 $headers[] = "Bcc: " . $options['email']['wc_bcc_email']; 193 endif; 194 195 return implode( "\r\n", $headers); 196 } 197 198 /** 199 * Email configuration settings 200 * 201 * @since 1.9.7 202 * 203 * @access public 204 * @param array $options 205 */ 206 public function wcpgsk_settings_page_email_wcpgsk( $options ) { 207 if ( isset( $options['email']['wc_cc_email'] ) && !empty( $options['email']['wc_cc_email'] ) ) : 208 $emails = explode( ',', str_replace( ';', ',', $options['email']['wc_cc_email'] ) ); 209 $options['email']['wc_cc_email'] = isset( $emails[0] ) ? $emails[0] : ''; 210 else : 211 $options['email']['wc_cc_email'] = ''; 212 endif; 213 if ( isset($options['email']['wc_bcc_email']) && !empty( $options['email']['wc_bcc_email'] ) ) : 214 $emails = explode( ',', str_replace( ';', ',', $options['email']['wc_bcc_email'] ) ); 215 $options['email']['wc_bcc_email'] = isset( $emails[0] ) ? $emails[0] : ''; 216 else : 217 $options['email']['wc_bcc_email'] = ''; 218 endif; 219 ?> 220 <h3 class="wcpgsk_acc_header"><?php echo __('Email Settings',WCPGSK_DOMAIN); ?></h3> 221 <div> 222 <table class="widefat" border="1" > 223 <thead> 224 <tr> 225 <th><?php _e('Settings Name', WCPGSK_DOMAIN); ?></th> 226 <th><?php _e('Data', WCPGSK_DOMAIN); ?></th> 227 <th><?php _e('Comments', WCPGSK_DOMAIN); ?></th> 228 </tr> 229 </thead> 230 <tbody> 231 <tr> 232 <td width="25%"><?php _e( 'Carbon Copy Email (CC) Recipient', WCPGSK_DOMAIN ); ?></td> 233 <td> 234 <input name="wcpgsk_settings[email][wc_cc_email]" id="wcpgsk_wc_cc_email" type="email" value="<?php echo $options['email']['wc_cc_email'] ?>" class="regular-text" /> 235 </td> 236 <td> 237 <span class="description"><?php _e('Specify a valid email address that will receive copies of all WooCommerce emails.', WCPGSK_DOMAIN); ?></span> 238 </td> 239 </tr> 240 <tr> 241 <td width="25%"><?php _e( 'Blind Carbon Copy (BCC) Email Recipient', WCPGSK_DOMAIN ); ?></td> 242 <td> 243 <input name="wcpgsk_settings[email][wc_bcc_email]" id="wcpgsk_wc_bcc_email" type="email" value="<?php echo $options['email']['wc_bcc_email'] ?>" class="regular-text" /> 244 </td> 245 <td> 246 <span class="description"><?php _e('Specify a valid email address that will receive hidden copies of all WooCommerce emails.', WCPGSK_DOMAIN); ?></span> 247 </td> 248 </tr> 249 <tr><td colspan="3"><?php _e('WooCommerce Rich Guys Swiss Knife includes more email options, e.g. context dependent cc and bcc email recipients, etc.', WCPGSK_DOMAIN); ?></td></tr> 250 </tbody> 251 </table> 252 <?php submit_button( __( 'Save Changes', WCPGSK_DOMAIN ) ); ?> 253 254 </div> 255 <?php 256 } 257 258 /** 259 * Label configuration settings 260 * 261 * @since 1.9.7 262 * 263 * @access public 264 * @param array $options 265 */ 266 public function wcpgsk_page_labels( $options ) { 267 ?> 268 <h3 class="wcpgsk_acc_header"><?php echo __('Label Settings',WCPGSK_DOMAIN); ?></h3> 269 <div> 270 <table class="widefat" border="1" > 271 <thead> 272 <tr> 273 <th><?php _e('Settings Name', WCPGSK_DOMAIN); ?></th> 274 <th><?php _e('Data', WCPGSK_DOMAIN); ?></th> 275 <th><?php _e('Comments', WCPGSK_DOMAIN); ?></th> 276 </tr> 277 </thead> 278 <tbody> 279 <?php do_action( 'wcpgsk_settings_labels_before', $options ); ?> 280 <tr> 281 <td width="25%"><?php _e( 'On Sale Label', WCPGSK_DOMAIN ); ?></td> 282 <td> 283 <input name="wcpgsk_settings[process][onsalelabel]" type="text" id="wcpgsk_onsalelabel" value="<?php echo $options['process']['onsalelabel'] ?>" class="regular-text" /> 284 </td> 285 <td> 286 <span class="description"><?php _e('Define the on sale label. (You may need to adapt css!)', WCPGSK_DOMAIN); ?></span> 287 </td> 288 </tr> 289 <tr> 290 <td width="25%"><?php _e( 'Add to Cart Button Label', WCPGSK_DOMAIN ); ?></td> 291 <td> 292 <input name="wcpgsk_settings[process][fastcheckoutbtn]" type="text" id="wcpgsk_fastcheckout_btn" value="<?php echo $options['process']['fastcheckoutbtn'] ?>" class="regular-text" /> 293 </td> 294 <td> 295 <span class="description"><?php _e('Define the label for the Add to Cart button.', WCPGSK_DOMAIN); ?></span> 296 </td> 297 </tr> 298 <tr> 299 <td width="25%"><?php _e( 'Read more Button Label', WCPGSK_DOMAIN ); ?></td> 300 <td> 301 <input name="wcpgsk_settings[process][readmorebtn]" type="text" id="wcpgsk_readmore_btn" value="<?php echo $options['process']['readmorebtn'] ?>" class="regular-text" /> 302 </td> 303 <td> 304 <span class="description"><?php _e('Define the label for the Read more button.', WCPGSK_DOMAIN); ?></span> 305 </td> 306 </tr> 307 <tr> 308 <td width="25%"><?php _e( 'View products Button Label', WCPGSK_DOMAIN ); ?></td> 309 <td> 310 <input name="wcpgsk_settings[process][viewproductsbtn]" type="text" id="wcpgsk_viewproducts_btn" value="<?php echo $options['process']['viewproductsbtn'] ?>" class="regular-text" /> 311 </td> 312 <td> 313 <span class="description"><?php _e('Define the label for the View products button.', WCPGSK_DOMAIN); ?></span> 314 </td> 315 </tr> 316 <tr> 317 <td width="25%"><?php _e( 'Select options Button Label', WCPGSK_DOMAIN ); ?></td> 318 <td> 319 <input name="wcpgsk_settings[process][selectoptionsbtn]" type="text" id="wcpgsk_selectoptions_btn" value="<?php echo $options['process']['selectoptionsbtn'] ?>" class="regular-text" /> 320 </td> 321 <td> 322 <span class="description"><?php _e('Define the label for the Select options button.', WCPGSK_DOMAIN); ?></span> 323 </td> 324 </tr> 325 <tr> 326 <td width="25%"><?php _e( 'Buy product Button Label', WCPGSK_DOMAIN ); ?></td> 327 <td> 328 <input name="wcpgsk_settings[process][buyproductbtn]" type="text" id="wcpgsk_buyproduct_btn" value="<?php echo $options['process']['buyproductbtn'] ?>" class="regular-text" /> 329 </td> 330 <td> 331 <span class="description"><?php _e('Define the label for the Buy product button.', WCPGSK_DOMAIN); ?></span> 332 </td> 333 </tr> 334 <tr> 335 <td width="25%"><?php _e( 'Out of stock Button Label', WCPGSK_DOMAIN ); ?></td> 336 <td> 337 <input name="wcpgsk_settings[process][outofstockbtn]" type="text" id="wcpgsk_outofstock_btn" value="<?php echo $options['process']['outofstockbtn'] ?>" class="regular-text" /> 338 </td> 339 <td> 340 <span class="description"><?php _e('Define the label for the Out of stock button.', WCPGSK_DOMAIN); ?></span> 341 </td> 342 </tr> 343 <tr> 344 <td width="25%"><?php _e( 'Tax Label', WCPGSK_DOMAIN ); ?></td> 345 <td> 346 <input name="wcpgsk_settings[filters][woocommerce_countries_tax_or_vat]" type="text" id="wcpgsk_woocommerce_countries_tax_or_vat" value="<?php echo $options['filters']['woocommerce_countries_tax_or_vat'] ?>" class="regular-text" /> 347 </td> 348 <td> 349 <span class="description"><?php _e('Define the tax label.', WCPGSK_DOMAIN); ?></span> 350 </td> 351 </tr> 352 <tr> 353 <td width="25%"><?php _e( 'Includes tax message', WCPGSK_DOMAIN ); ?></td> 354 <td> 355 <input name="wcpgsk_settings[filters][woocommerce_countries_inc_tax_or_vat]" type="text" id="wcpgsk_woocommerce_countries_inc_tax_or_vat" value="<?php echo $options['filters']['woocommerce_countries_inc_tax_or_vat'] ?>" class="regular-text" /> 356 </td> 357 <td> 358 <span class="description"><?php _e('Define the tax included message.', WCPGSK_DOMAIN); ?></span> 359 </td> 360 </tr> 361 <tr> 362 <td width="25%"><?php _e( 'Tax excluded message', WCPGSK_DOMAIN ); ?></td> 363 <td> 364 <input name="wcpgsk_settings[filters][woocommerce_countries_ex_tax_or_vat]" type="text" id="wcpgsk_woocommerce_countries_ex_tax_or_vat" value="<?php echo $options['filters']['woocommerce_countries_ex_tax_or_vat'] ?>" class="regular-text" /> 365 </td> 366 <td> 367 <span class="description"><?php _e('Define the tax excluded message.', WCPGSK_DOMAIN); ?></span> 368 </td> 369 </tr> 370 <tr> 371 <td width="25%"><?php _e( 'Product Description Tab Label', WCPGSK_DOMAIN ); ?></td> 372 <td> 373 <input name="wcpgsk_settings[filters][woocommerce_product_description_tab_title]" type="text" id="wcpgsk_woocommerce_product_description_tab_title" value="<?php echo $options['filters']['woocommerce_product_description_tab_title'] ?>" class="regular-text" /> 374 </td> 375 <td> 376 <span class="description"><?php _e('Define the label for the product description tab.', WCPGSK_DOMAIN); ?></span> 377 </td> 378 </tr> 379 <tr> 380 <td width="25%"><?php _e( 'Product Description Header', WCPGSK_DOMAIN ); ?></td> 381 <td> 382 <input name="wcpgsk_settings[filters][woocommerce_product_description_heading]" type="text" id="wcpgsk_woocommerce_product_description_heading" value="<?php echo $options['filters']['woocommerce_product_description_heading'] ?>" class="regular-text" /> 383 </td> 384 <td> 385 <span class="description"><?php _e('Define the product description header.', WCPGSK_DOMAIN); ?></span> 386 </td> 387 </tr> 388 <tr> 389 <td width="25%"><?php _e( 'Product Additional Information Tab Label', WCPGSK_DOMAIN ); ?></td> 390 <td> 391 <input name="wcpgsk_settings[filters][woocommerce_product_additional_information_tab_title]" type="text" id="wcpgsk_woocommerce_product_additional_information_tab_title" value="<?php echo $options['filters']['woocommerce_product_additional_information_tab_title'] ?>" class="regular-text" /> 392 </td> 393 <td> 394 <span class="description"><?php _e('Define the label for the product additional information tab.', WCPGSK_DOMAIN); ?></span> 395 </td> 396 </tr> 397 <tr> 398 <td width="25%"><?php _e( 'Product Additional Information Header', WCPGSK_DOMAIN ); ?></td> 399 <td> 400 <input name="wcpgsk_settings[filters][woocommerce_product_additional_information_heading]" type="text" id="wcpgsk_woocommerce_product_additional_information_heading" value="<?php echo $options['filters']['woocommerce_product_additional_information_heading'] ?>" class="regular-text" /> 401 </td> 402 <td> 403 <span class="description"><?php _e('Define the product additional information header.', WCPGSK_DOMAIN); ?></span> 404 </td> 405 </tr> 406 <tr> 407 <td><?php _e('Set Order Button Text', WCPGSK_DOMAIN); ?>:</td> 408 <td> 409 <input name="wcpgsk_settings[filters][woocommerce_order_button_text]" type="text" class="wcpgsk_textfield" value="<?php if (!empty($options['filters']['woocommerce_order_button_text'])) echo esc_attr( $options['filters']['woocommerce_order_button_text'] ); ?>" class="regular-text" /> 410 </td> 411 <td> 412 <span class="description"><?php _e('Set the order button text.', WCPGSK_DOMAIN); ?></span> 413 </td> 414 </tr> 415 <tr> 416 <td><?php _e('Set Login required message', WCPGSK_DOMAIN); ?>:</td> 417 <td> 418 <input name="wcpgsk_settings[filters][woocommerce_checkout_must_be_logged_in_message]" type="text" class="wcpgsk_textfield" value="<?php if (!empty($options['filters']['woocommerce_checkout_must_be_logged_in_message'])) echo esc_attr( $options['filters']['woocommerce_checkout_must_be_logged_in_message'] ); ?>" class="regular-text" /> 419 </td> 420 <td> 421 <span class="description"><?php _e('Change the login required message for the checkout form.', WCPGSK_DOMAIN); ?></span> 422 </td> 423 </tr> 424 <tr> 425 <td><?php _e('Set Login possible message', WCPGSK_DOMAIN); ?>:</td> 426 <td> 427 <input name="wcpgsk_settings[filters][woocommerce_checkout_login_message]" type="text" class="wcpgsk_textfield" value="<?php if (!empty($options['filters']['woocommerce_checkout_login_message'])) echo esc_attr( $options['filters']['woocommerce_checkout_login_message'] ); ?>" class="regular-text" /> 428 </td> 429 <td> 430 <span class="description"><?php _e('Change the returning customer login message for the checkout form.', WCPGSK_DOMAIN); ?></span> 431 </td> 432 </tr> 433 <tr> 434 <td><?php _e('Set Coupon message', WCPGSK_DOMAIN); ?>:</td> 435 <td> 436 <input name="wcpgsk_settings[filters][woocommerce_checkout_coupon_message]" type="text" class="wcpgsk_textfield" value="<?php if (!empty($options['filters']['woocommerce_checkout_coupon_message'])) echo esc_attr( $options['filters']['woocommerce_checkout_coupon_message'] ); ?>" class="regular-text" /> 437 </td> 438 <td> 439 <span class="description"><?php _e('Change the coupon message for the checkout form.', WCPGSK_DOMAIN); ?></span> 440 </td> 441 </tr> 442 443 <?php do_action( 'wcpgsk_settings_labels_after', $options ); ?> 444 </tbody> 445 </table> 446 <?php submit_button( __( 'Save Changes', WCPGSK_DOMAIN ) ); ?> 447 448 </div> 449 <?php 450 } 451 101 452 /** 102 453 * Hook available and WCPGSK configured WooCommerce filters … … 113 464 endif; 114 465 } 466 467 468 115 469 /** 116 470 * Run available WooCommerce filters … … 574 928 $shipping_fields = $this->wcpgsk_additional_data($order, 'shipping'); 575 929 ?> 576 <table cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top;" border="0" >930 <table cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top;" border="0" class="wcpgsk_customer_data"> 577 931 578 932 <tr> … … 580 934 if ( isset($billing_fields) && !empty($billing_fields) ) : 581 935 ?> 582 <td valign="top" width="50%" >936 <td valign="top" width="50%" class="billing_data"> 583 937 584 938 <?php if ( !empty($options['checkoutform']['morebillingtitle']) ) : ?> … … 586 940 <?php endif; ?> 587 941 588 < p>942 <dl> 589 943 <?php 590 //$billing_fields = $this->wcpgsk_additional_data($order, 'billing');591 //if ( isset($billing_fields) && !empty($billing_fields) ) :592 944 foreach ($billing_fields as $key => $field) : 593 945 $key_type = "billing_" . $key; 594 946 $label = !empty($field['label']) ? $field['label'] . ": " : ""; 595 //if ( isset($options['woofields']['type_' . $key_type]) && $options['woofields']['type_' . $key_type] == 'fileupload' ) : 596 //else : 597 echo $label . $field['captured'] . '<br />'; 598 //endif; 947 if ( is_array( $field['captured'] ) ) : 948 echo '<dt>' . $label . '</dt><dd>' . implode( '<br />', $field['captured'] ) . '</dd>'; 949 else : 950 echo '<dt>' . $label . '</dt><dd>' . $field['captured'] . '</dd>'; 951 endif; 599 952 endforeach; 600 //endif;601 953 ?> 602 </ p>954 </dl> 603 955 604 956 </td> … … 609 961 ?> 610 962 611 <td valign="top" width="50%" >963 <td valign="top" width="50%" class="shipping_data"> 612 964 <?php if ( !empty($options['checkoutform']['moreshippingtitle']) ) : ?> 613 965 <h3><?php _e( $options['checkoutform']['moreshippingtitle'], 'woocommerce' ); ?></h3> 614 966 <?php endif; ?> 615 967 616 < p>968 <dl> 617 969 <?php 618 970 foreach ($shipping_fields as $key => $field) : 619 971 $key_type = "shipping_" . $key; 620 972 $label = !empty($field['label']) ? $field['label'] . ": " : ""; 621 //if ( isset($options['woofields']['type_' . $key_type]) && $options['woofields']['type_' . $key_type] == 'fileupload' ) : 622 //else : 623 echo $label . $field['captured'] . '<br />'; 624 //endif; 973 if ( is_array( $field['captured'] ) ) : 974 echo '<dt>' . $label . '</dt><dd>' . implode( '<br />', $field['captured'] ) . '</dd>'; 975 else : 976 echo '<dt>' . $label . '</dt><dd>' . $field['captured'] . '</dd>'; 977 endif; 625 978 endforeach; 626 979 ?> 627 </ p>980 </dl> 628 981 629 982 </td> … … 654 1007 if ( isset($billing_fields) && !empty($billing_fields) ) : 655 1008 ?> 656 <td valign="top" width="50%" >1009 <td valign="top" width="50%" class="billing_data"> 657 1010 658 1011 <?php if ( !empty($options['checkoutform']['morebillingtitle']) ) : ?> … … 660 1013 <?php endif; ?> 661 1014 662 < p>1015 <dl> 663 1016 <?php 664 1017 //$billing_fields = $this->wcpgsk_additional_data($order, 'billing'); … … 669 1022 //if ( isset($options['woofields']['type_' . $key_type]) && $options['woofields']['type_' . $key_type] == 'fileupload' ) : 670 1023 //else : 671 echo $label . $field['captured'] . '<br />';1024 echo '<dt>' . $label . '</dt><dd>' . $field['captured'] . '</dd>'; 672 1025 //endif; 673 1026 endforeach; 674 1027 //endif; 675 1028 ?> 676 </ p>1029 </dl> 677 1030 678 1031 </td> … … 683 1036 ?> 684 1037 685 <td valign="top" width="50%" >1038 <td valign="top" width="50%" class="shipping_data"> 686 1039 <?php if ( !empty($options['checkoutform']['moreshippingtitle']) ) : ?> 687 1040 <h3><?php _e( $options['checkoutform']['moreshippingtitle'], 'woocommerce' ); ?></h3> 688 1041 <?php endif; ?> 689 < p>1042 <dl> 690 1043 <?php 691 1044 foreach ($shipping_fields as $key => $field) : … … 694 1047 //if ( isset($options['woofields']['type_' . $key_type]) && $options['woofields']['type_' . $key_type] == 'fileupload' ) : 695 1048 //else : 696 echo $label . $field['captured'] . '<br />';1049 echo '<dt>' . $label . '</dt><dd>' . $field['captured'] . '</dd>'; 697 1050 //endif; 698 1051 endforeach; 699 1052 ?> 700 </ p>1053 </dl> 701 1054 702 1055 </td> … … 836 1189 $options['process']['selectoptionsbtn'] = isset($options['process']['selectoptionsbtn']) ? $options['process']['selectoptionsbtn'] : ''; 837 1190 $options['process']['outofstockbtn'] = isset($options['process']['outofstockbtn']) ? $options['process']['outofstockbtn'] : ''; 1191 if ( !isset( $options['process']['onsalelabel'] ) ) : 1192 $options['process']['onsalelabel'] = __( 'Sale!', WCPGSK_DOMAIN ); 1193 endif; 1194 if ( !isset( $options['process']['emptycartlabel'] ) ) : 1195 $options['process']['emptycartlabel'] = __( 'Empty cart?', WCPGSK_DOMAIN ); 1196 endif; 1197 if ( !isset( $options['process']['confirmemptycart'] ) ) : 1198 $options['process']['confirmemptycart'] = __( 'Yes, empty cart', WCPGSK_DOMAIN ); 1199 endif; 1200 1201 838 1202 //add options if necessary 839 1203 //unset( $options['filters'] ); … … 872 1236 </thead> 873 1237 <tbody> 874 <?php do_action( 'wcpgsk_settings_shop_before', $options ); ?>875 <tr>876 <td width="25%"><?php _e( 'Add to Cart Button Label', WCPGSK_DOMAIN ); ?></td>877 <td>878 <input name="wcpgsk_settings[process][fastcheckoutbtn]" id="wcpgsk_fastcheckout_btn" value="<?php echo $options['process']['fastcheckoutbtn'] ?>" class="regular-text" />879 </td>880 <td>881 <span class="description"><?php _e('Define the label for the Add to Cart button.', WCPGSK_DOMAIN); ?></span>882 </td>883 </tr>884 <tr>885 <td width="25%"><?php _e( 'Read more Button Label', WCPGSK_DOMAIN ); ?></td>886 <td>887 <input name="wcpgsk_settings[process][readmorebtn]" id="wcpgsk_readmore_btn" value="<?php echo $options['process']['readmorebtn'] ?>" class="regular-text" />888 </td>889 <td>890 <span class="description"><?php _e('Define the label for the Read more button.', WCPGSK_DOMAIN); ?></span>891 </td>892 </tr>893 <tr>894 <td width="25%"><?php _e( 'View products Button Label', WCPGSK_DOMAIN ); ?></td>895 <td>896 <input name="wcpgsk_settings[process][viewproductsbtn]" id="wcpgsk_viewproducts_btn" value="<?php echo $options['process']['viewproductsbtn'] ?>" class="regular-text" />897 </td>898 <td>899 <span class="description"><?php _e('Define the label for the View products button.', WCPGSK_DOMAIN); ?></span>900 </td>901 </tr>902 <tr>903 <td width="25%"><?php _e( 'Select options Button Label', WCPGSK_DOMAIN ); ?></td>904 <td>905 <input name="wcpgsk_settings[process][selectoptionsbtn]" id="wcpgsk_selectoptions_btn" value="<?php echo $options['process']['selectoptionsbtn'] ?>" class="regular-text" />906 </td>907 <td>908 <span class="description"><?php _e('Define the label for the Select options button.', WCPGSK_DOMAIN); ?></span>909 </td>910 </tr>911 <tr>912 <td width="25%"><?php _e( 'Buy product Button Label', WCPGSK_DOMAIN ); ?></td>913 <td>914 <input name="wcpgsk_settings[process][buyproductbtn]" id="wcpgsk_buyproduct_btn" value="<?php echo $options['process']['buyproductbtn'] ?>" class="regular-text" />915 </td>916 <td>917 <span class="description"><?php _e('Define the label for the Buy product button.', WCPGSK_DOMAIN); ?></span>918 </td>919 </tr>920 <tr>921 <td width="25%"><?php _e( 'Out of stock Button Label', WCPGSK_DOMAIN ); ?></td>922 <td>923 <input name="wcpgsk_settings[process][outofstockbtn]" id="wcpgsk_outofstock_btn" value="<?php echo $options['process']['outofstockbtn'] ?>" class="regular-text" />924 </td>925 <td>926 <span class="description"><?php _e('Define the label for the Out of stock button.', WCPGSK_DOMAIN); ?></span>927 </td>928 </tr>929 <tr>930 <td width="25%"><?php _e( 'Tax Label', WCPGSK_DOMAIN ); ?></td>931 <td>932 <input name="wcpgsk_settings[filters][woocommerce_countries_tax_or_vat]" id="wcpgsk_woocommerce_countries_tax_or_vat" value="<?php echo $options['filters']['woocommerce_countries_tax_or_vat'] ?>" class="regular-text" />933 </td>934 <td>935 <span class="description"><?php _e('Define the tax label.', WCPGSK_DOMAIN); ?></span>936 </td>937 </tr>938 <tr>939 <td width="25%"><?php _e( 'Includes tax message', WCPGSK_DOMAIN ); ?></td>940 <td>941 <input name="wcpgsk_settings[filters][woocommerce_countries_inc_tax_or_vat]" id="wcpgsk_woocommerce_countries_inc_tax_or_vat" value="<?php echo $options['filters']['woocommerce_countries_inc_tax_or_vat'] ?>" class="regular-text" />942 </td>943 <td>944 <span class="description"><?php _e('Define the tax included message.', WCPGSK_DOMAIN); ?></span>945 </td>946 </tr>947 <tr>948 <td width="25%"><?php _e( 'Tax excluded message', WCPGSK_DOMAIN ); ?></td>949 <td>950 <input name="wcpgsk_settings[filters][woocommerce_countries_ex_tax_or_vat]" id="wcpgsk_woocommerce_countries_ex_tax_or_vat" value="<?php echo $options['filters']['woocommerce_countries_ex_tax_or_vat'] ?>" class="regular-text" />951 </td>952 <td>953 <span class="description"><?php _e('Define the tax excluded message.', WCPGSK_DOMAIN); ?></span>954 </td>955 </tr>956 <tr>957 <td width="25%"><?php _e( 'Product Description Tab Label', WCPGSK_DOMAIN ); ?></td>958 <td>959 <input name="wcpgsk_settings[filters][woocommerce_product_description_tab_title]" id="wcpgsk_woocommerce_product_description_tab_title" value="<?php echo $options['filters']['woocommerce_product_description_tab_title'] ?>" class="regular-text" />960 </td>961 <td>962 <span class="description"><?php _e('Define the label for the product description tab.', WCPGSK_DOMAIN); ?></span>963 </td>964 </tr>965 <tr>966 <td width="25%"><?php _e( 'Product Description Header', WCPGSK_DOMAIN ); ?></td>967 <td>968 <input name="wcpgsk_settings[filters][woocommerce_product_description_heading]" id="wcpgsk_woocommerce_product_description_heading" value="<?php echo $options['filters']['woocommerce_product_description_heading'] ?>" class="regular-text" />969 </td>970 <td>971 <span class="description"><?php _e('Define the product description header.', WCPGSK_DOMAIN); ?></span>972 </td>973 </tr>974 <tr>975 <td width="25%"><?php _e( 'Product Additional Information Tab Label', WCPGSK_DOMAIN ); ?></td>976 <td>977 <input name="wcpgsk_settings[filters][woocommerce_product_additional_information_tab_title]" id="wcpgsk_woocommerce_product_additional_information_tab_title" value="<?php echo $options['filters']['woocommerce_product_additional_information_tab_title'] ?>" class="regular-text" />978 </td>979 <td>980 <span class="description"><?php _e('Define the label for the product additional information tab.', WCPGSK_DOMAIN); ?></span>981 </td>982 </tr>983 <tr>984 <td width="25%"><?php _e( 'Product Additional Information Header', WCPGSK_DOMAIN ); ?></td>985 <td>986 <input name="wcpgsk_settings[filters][woocommerce_product_additional_information_heading]" id="wcpgsk_woocommerce_product_additional_information_heading" value="<?php echo $options['filters']['woocommerce_product_additional_information_heading'] ?>" class="regular-text" />987 </td>988 <td>989 <span class="description"><?php _e('Define the product additional information header.', WCPGSK_DOMAIN); ?></span>990 </td>991 </tr>992 1238 <tr> 993 1239 <td><?php _e('Product items per page', WCPGSK_DOMAIN); ?>:</td> 994 1240 <td> 995 <input name="wcpgsk_settings[filters][loop_shop_per_page]" type=" text" value="<?php if (isset($options['filters']['loop_shop_per_page'])) echo esc_attr( $options['filters']['loop_shop_per_page'] ); ?>" size="2" class="regular-text" />1241 <input name="wcpgsk_settings[filters][loop_shop_per_page]" type="number" value="<?php if (isset($options['filters']['loop_shop_per_page'])) echo esc_attr( $options['filters']['loop_shop_per_page'] ); ?>" size="3" class="regular-text" /> 996 1242 </td> 997 1243 <td> … … 1002 1248 <td><?php _e('Product columns per page', WCPGSK_DOMAIN); ?>:</td> 1003 1249 <td> 1004 <input name="wcpgsk_settings[filters][loop_shop_columns]" type=" text" value="<?php if (isset($options['filters']['loop_shop_columns'])) echo esc_attr( $options['filters']['loop_shop_columns'] ); ?>" size="2" class="regular-text" />1250 <input name="wcpgsk_settings[filters][loop_shop_columns]" type="number" value="<?php if (isset($options['filters']['loop_shop_columns'])) echo esc_attr( $options['filters']['loop_shop_columns'] ); ?>" size="2" class="regular-text" /> 1005 1251 </td> 1006 1252 <td> … … 1011 1257 <td><?php _e('Product thumbnail columns per page', WCPGSK_DOMAIN); ?>:</td> 1012 1258 <td> 1013 <input name="wcpgsk_settings[filters][woocommerce_product_thumbnails_columns]" type=" text" value="<?php if (isset($options['filters']['woocommerce_product_thumbnails_columns'])) echo esc_attr( $options['filters']['woocommerce_product_thumbnails_columns'] ); ?>" size="2" class="regular-text" />1259 <input name="wcpgsk_settings[filters][woocommerce_product_thumbnails_columns]" type="number" value="<?php if (isset($options['filters']['woocommerce_product_thumbnails_columns'])) echo esc_attr( $options['filters']['woocommerce_product_thumbnails_columns'] ); ?>" size="2" class="regular-text" /> 1014 1260 </td> 1015 1261 <td> … … 1055 1301 1056 1302 </div> 1303 <?php do_action( 'wcpgsk_settings_page_labels', $options ); ?> 1304 <?php do_action( 'wcpgsk_settings_page_email', $options ); ?> 1057 1305 1058 1306 <?php do_action( 'wcpgsk_settings_page_two', $options ); ?> … … 1070 1318 <tbody> 1071 1319 <?php do_action( 'wcpgsk_settings_cart_before', $options ); ?> 1320 <tr> 1321 <td><?php _e('Add empty cart button to cart', WCPGSK_DOMAIN); ?>:</td> 1322 <td> 1323 <input name="wcpgsk_settings[cart][addemptycart]" type="hidden" value="0" /> 1324 <input name="wcpgsk_settings[cart][addemptycart]" type="checkbox" value="1" <?php if ( 1 == ($options['cart']['addemptycart'])) echo "checked='checked'"; ?> /> 1325 </td> 1326 <td> 1327 <span class="description"><?php _e('Allow your customers to empty the cart.', WCPGSK_DOMAIN); ?></span> 1328 </td> 1329 </tr> 1330 <tr> 1331 <td width="25%"><?php _e( 'Empty Cart Label', WCPGSK_DOMAIN ); ?></td> 1332 <td> 1333 <input name="wcpgsk_settings[process][emptycartlabel]" type="text" id="wcpgsk_emptycartlabel" value="<?php echo isset( $options['process']['emptycartlabel'] ) ? $options['process']['emptycartlabel'] : ''; ?>" class="regular-text" /> 1334 </td> 1335 <td> 1336 <span class="description"><?php _e('Label for the empty cart button.', WCPGSK_DOMAIN); ?></span> 1337 </td> 1338 </tr> 1339 <tr> 1340 <td width="25%"><?php _e( 'Confirm Empty Cart Label', WCPGSK_DOMAIN ); ?></td> 1341 <td> 1342 <input name="wcpgsk_settings[process][confirmemptycart]" type="text" id="wcpgsk_confirmemptycart" value="<?php echo isset( $options['process']['confirmemptycart'] ) ? $options['process']['confirmemptycart'] : ''; ?>" class="regular-text" /> 1343 </td> 1344 <td> 1345 <span class="description"><?php _e('Leave this blank to allow empty cart action without confirmation.', WCPGSK_DOMAIN); ?></span> 1346 </td> 1347 </tr> 1348 1072 1349 <tr> 1073 1350 <td><?php _e('Minimum cart items', WCPGSK_DOMAIN); ?>:</td> … … 1185 1462 </td> 1186 1463 </tr> 1187 1188 <?php 1464 <?php 1189 1465 endforeach; 1190 1466 ?> 1467 1191 1468 <?php do_action( 'wcpgsk_settings_cart_after', $options ); ?> 1192 1469 … … 1224 1501 <td> 1225 1502 <span class="description"><?php _e('For date fields you can specify a maximum offset in number of days.', WCPGSK_DOMAIN); ?></span> 1226 </td>1227 </tr>1228 <tr>1229 <td><?php _e('Set Order Button Text', WCPGSK_DOMAIN); ?>:</td>1230 <td>1231 <input name="wcpgsk_settings[filters][woocommerce_order_button_text]" type="text" class="wcpgsk_textfield" value="<?php if (!empty($options['filters']['woocommerce_order_button_text'])) echo esc_attr( $options['filters']['woocommerce_order_button_text'] ); ?>" class="regular-text" />1232 </td>1233 <td>1234 <span class="description"><?php _e('Set the order button text.', WCPGSK_DOMAIN); ?></span>1235 </td>1236 </tr>1237 <tr>1238 <td><?php _e('Set Login required message', WCPGSK_DOMAIN); ?>:</td>1239 <td>1240 <input name="wcpgsk_settings[filters][woocommerce_checkout_must_be_logged_in_message]" type="text" class="wcpgsk_textfield" value="<?php if (!empty($options['filters']['woocommerce_checkout_must_be_logged_in_message'])) echo esc_attr( $options['filters']['woocommerce_checkout_must_be_logged_in_message'] ); ?>" class="regular-text" />1241 </td>1242 <td>1243 <span class="description"><?php _e('Change the login required message for the checkout form.', WCPGSK_DOMAIN); ?></span>1244 </td>1245 </tr>1246 <tr>1247 <td><?php _e('Set Login possible message', WCPGSK_DOMAIN); ?>:</td>1248 <td>1249 <input name="wcpgsk_settings[filters][woocommerce_checkout_login_message]" type="text" class="wcpgsk_textfield" value="<?php if (!empty($options['filters']['woocommerce_checkout_login_message'])) echo esc_attr( $options['filters']['woocommerce_checkout_login_message'] ); ?>" class="regular-text" />1250 </td>1251 <td>1252 <span class="description"><?php _e('Change the returning customer login message for the checkout form.', WCPGSK_DOMAIN); ?></span>1253 </td>1254 </tr>1255 <tr>1256 <td><?php _e('Set Coupon message', WCPGSK_DOMAIN); ?>:</td>1257 <td>1258 <input name="wcpgsk_settings[filters][woocommerce_checkout_coupon_message]" type="text" class="wcpgsk_textfield" value="<?php if (!empty($options['filters']['woocommerce_checkout_coupon_message'])) echo esc_attr( $options['filters']['woocommerce_checkout_coupon_message'] ); ?>" class="regular-text" />1259 </td>1260 <td>1261 <span class="description"><?php _e('Change the coupon message for the checkout form.', WCPGSK_DOMAIN); ?></span>1262 1503 </td> 1263 1504 </tr> … … 2500 2741 else: 2501 2742 if ($key != 'billing_email_validator' && $field['hideorder'] == 0) : 2502 if ( $options['woofields']['billing'][$key]['custom_' . $key]) :2743 if ( isset( $options['woofields']['billing'][$key]['custom_' . $key] ) && $options['woofields']['billing'][$key]['custom_' . $key] ) : 2503 2744 $configField = $this->createCustomStandardField($key, 'billing', $options['woofields']['type_' . $key]); 2504 2745 if (isset($configField['class'])) unset($configField['class']); … … 2578 2819 else: 2579 2820 if ($key != 'shipping_email_validator') : 2580 if ( $options['woofields']['shipping'][$key]['custom_' . $key]) :2821 if ( isset( $options['woofields']['shipping'][$key]['custom_' . $key] ) && $options['woofields']['shipping'][$key]['custom_' . $key] ) : 2581 2822 $configField = $this->createCustomStandardField($key, 'shipping', $options['woofields']['type_' . $key]); 2582 2823 //unset(configField['placeholder']); … … 3732 3973 'label' => __( 'Label', WCPGSK_DOMAIN ), 3733 3974 'placeholder' => __( 'Placeholder', WCPGSK_DOMAIN ))), 3734 'cart' => array( 3975 'cart' => array( 3976 'addemptycart' => 0, 3735 3977 'minmaxstepproduct' => 0, 3736 3978 'minitemscart' => 1, … … 3775 4017 'fastcart' => 0, 3776 4018 'fastcheckout' => 0, 3777 'paymentgateways' => 0), 4019 'paymentgateways' => 0, 4020 'onsalelabel' => 'Sale!', 4021 'emptycartlabel' => 'Empty cart?', 4022 'confirmemptycart' => 'Yes, empty cart'), 4023 'email' => array( 4024 'wc_cc_email' => '', 4025 'wc_bcc_email' => ''), 3778 4026 ); 3779 4027 //add default woocommerce billing and shipping field settings to wcpgsk settings to fix the problem of fields not showing up after activation of our plugin … … 3834 4082 if ( function_exists( 'is_woocommerce' ) ) : 3835 4083 //dequeue scripts and styles 3836 if ( !is_cart() && !is_checkout() && !is_account_page() ) : 4084 if ( is_cart() ) : 4085 wp_enqueue_script( 'wcpgsk-cart', plugins_url('/assets/js/wcpgsk-cart.js', $this->file) , array('jquery'), '', false); 3837 4086 endif; 3838 4087 if ( is_checkout() || is_account_page() ) : -
woocommerce-poor-guys-swiss-knife/trunk/readme.txt
r972884 r976205 2 2 Contributors: ulih 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KJ4K2X953H8CC 4 Tags: WooCommerce checkout manager, WooCommerce cart manager, quantity management, file upload, color picker, WooCommerce color picker, WooCommerce file upload, cart manager, checkout manager, checkout, cart, shop, WooCommerce, shop settings, cart settings, checkout settings, variations bulk manager, variations manager, minimum items, maximum items, quantity input, product quantities, incremental quantities, minimum quantity, maximum quantity, wholesale, checkout personalization, checkout form, checkout customization, custom forms, custom fields, confirmation, confirmation fields, cart button, payment gateways, payment gateways customization, gateways, shipping, field editor, field, buy, pay, bulk management, variations, variation extender, custom fields per product, custom fields per variation, checkout localization 4 Tags: WooCommerce checkout manager, WooCommerce cart manager, quantity management, file upload, color picker, WooCommerce color picker, WooCommerce file upload, cart manager, checkout manager, checkout, cart, shop, WooCommerce, shop settings, cart settings, checkout settings, variations bulk manager, variations manager, minimum items, maximum items, quantity input, product quantities, incremental quantities, minimum quantity, maximum quantity, wholesale, checkout personalization, checkout form, checkout customization, custom forms, custom fields, confirmation, confirmation fields, cart button, payment gateways, payment gateways customization, gateways, shipping, field editor, field, buy, pay, bulk management, variations, variation extender, custom fields per product, custom fields per variation, checkout localization, label, label definition, email recipients 5 5 Requires at least: Wordpress 3.1 and WooCommerce 2.0 6 6 Tested up to: 3.9.1 7 Stable tag: 1.9. 67 Stable tag: 1.9.7 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 22 22 23 23 * WooCommerce Checkout form customization (works also for billing and shipping fields on the customer's "My Account" page) 24 * Drag and Drop for all Checkout form fields to order all fields (WooCommerce buil d-in fields and your custom fields)24 * Drag and Drop for all Checkout form fields to order all fields (WooCommerce built-in fields and your custom fields) 25 25 * Support for all input types and data (select, checkbox, radio, text, textarea, date picker, time picker, number ranges, password, email) without restrictions 26 26 * Full i18n support to allow localization and translation of all labels, placeholders 27 * Remove WooCommerce buil d-in fields27 * Remove WooCommerce built-in fields 28 28 * Manage required state for all fields 29 29 * Handle minimum and maximum calendar offset for date fields 30 * Separate buil d-in billing and shipping fields from your own custom fields adding a custom title31 * Manage buil d-in and custom field alignment and span for each field (left, right, full)32 * Add second email validator field for buil d-in email field33 * Add second validator field to custom input fields for passwords, additional email inputs, etc.30 * Separate built-in billing and shipping fields from your own custom fields adding a custom title 31 * Manage built-in and custom field alignment and span for each field (left, right, full) 32 * Add second email validator field for built-in email field 33 * Add second validator field to custom input fields for passwords, custom email fields, etc. 34 34 * Hide captured data in emails and receipts on a per field basis 35 35 * Load values and options into inputs and selects via custom javascript … … 38 38 Localization: 39 39 40 * Configure and handle behaviour of vital buil din fields for enabled countries (checkout form reconfigures dynamically when customer switches billing or shipping country and this allows you to handle labels and placeholders for enabled countries)40 * Configure and handle behaviour of vital built-in fields for enabled countries (checkout form reconfigures dynamically when customer switches billing or shipping country and this allows you to handle labels and placeholders for enabled countries) 41 41 42 42 General: 43 43 44 * Set labels for shop buttons (Add to Cart, Read more, Select options, tax, etc.)44 * Set labels for shop buttons (Add to Cart, Read more, On Sale, Select options, tax, etc.) 45 45 * Manage available payment gateways on a per product basis with intelligent filter to show the most restrictive combination when a customer has more than one product in his cart 46 * Configure number of items on shop pages, etc. 47 * Filter products to be displayed on main shop page 46 * Add one cc and one bcc email to all emails send by WooCommerce 48 47 49 48 Cart: … … 53 52 * Set minimum, maximum and incremental steps on a per product basis 54 53 * Switch off quantity input for product types 54 * Add empty cart button with/without confirmation 55 55 56 56 = Features available with WooCommerce Rich Guys Swiss Knife (WCRGSK) = … … 65 65 * Html injects (Add whatever you want in between your checkout form fields) 66 66 * Color picker field 67 * Acceptable terms and conditions on per product basis 67 * Acceptable terms and conditions on per product basis in checkout form 68 68 * File uploads for checkout form sections and on a per product basis 69 * Product terms and conditions70 69 * Advanced quantity and backorder management for products and variations 70 * Filter products to be displayed on main shop page 71 * Advanced email management to add more email recipients for specific contexts like new order, processing order, out of stock, backorder, etc. 72 * Set minimum amount and maximum amount needed or necessary to checkout a cart 71 73 72 74 Data captured via customized (added) form fields is available within your order administration and will be added in the appropriate sections of the individual orders. What shows up can be configured for each individual custom field. Data captured will be shown to the customer on the order receipt page and in emails. … … 78 80 = What's new? = 79 81 80 * Product display filters for main shop page82 * Add one CC and/or BCC email recipient to all WooCommerce emails 81 83 * Global minimum and maximum for item quantities 82 84 * Year and month dropdown selection for calendars 83 85 * Improved min/max/step settings with support for 0 for quantity inputs in all contexts 86 * Stylable representation of captured data 84 87 85 88 = What's on its way? = 86 89 87 Priceable fields for products and variations 90 * Priceable fields for products and variations will be available with version 1.5.0 of Woocommerce Rich Guys Swiss Knife 91 * Woocommerce Poor Guys Swiss Knife will include a package as gift along with gift text as appetizer 88 92 89 93 == Usage == … … 91 95 = Shop Settings = 92 96 93 * Set cart button label94 97 * Enable Fast Cart (show cart after a customer added something to the cart in the shop. Also available in WooCommerce) 95 98 * Enable Fast Checkout (go directly to checkout, when a customer adds a product from the shop) … … 97 100 * Filter products to be displayed on main shop page based on categories and attributes 98 101 102 = Label Settings = 103 104 * Set cart button labels 105 * Set order button label 106 * Set product button labels 107 * Set on sale label 108 * And a lot more labels 99 109 100 110 = Variation Overload and Bulk Settings = … … 173 183 More Tools for your WooCommerce Swiss Knife are available with the Rich Guys Swiss Knife for WooCommerce: 174 184 185 * 175 186 * Item personalization during checkout 176 187 * Custom fields on a per product and per variation basis using Item personalization options 177 188 * Bulk operations for variations 178 189 * Variation Extender which allows to attach virtual variations meaningful to customers and to map these variations back to a more reduced set of internal variations. This allows you to overcome the resource (runtime) and management limits that most e-commerce stores show in the context of variable products. 179 * File upload 190 * File upload (single and multiple) 191 * Html inject for checkout form 180 192 * Color picker support for fields 181 193 * Advanced (conditional) quantity input and backorder management for products and variations 194 * Advanced email handling: More than one cc and bcc email; specify contexts in which to use cc and bcc emails 182 195 183 196 == Upgrade Notice == … … 246 259 247 260 == Changelog == 261 262 = 1.9.7 = 263 264 * Enhancement: Structured presentation of captured data in order-received page and email 265 * Enhancement: Add one CC and/or BCC email to all emails send out by WooCommerce 266 * Enhancement: Add empty cart button to cart 248 267 249 268 = 1.9.6 = -
woocommerce-poor-guys-swiss-knife/trunk/wcpgsk-af.php
r972884 r976205 822 822 if ( !function_exists('wcpgsk_after_checkout_form') ) { 823 823 function wcpgsk_after_checkout_form($checkout) { 824 ?> 825 <div id="wcpgsk-dialog-validation-errors" title="<?php _e('Validation errors' , WCPGSK_DOMAIN); ?>"> 826 <p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span><?php _e('Please check the fields marked with a red border. The values do not pass validation.' , WCPGSK_DOMAIN); ?></p> 827 </div> 828 <?php 829 $options = get_option( 'wcpgsk_settings' ); 830 831 832 echo '<script language="javascript">'; 833 834 echo 'jQuery(document).ready(function(){ 835 jQuery("#cartitemfields").tabs(); 836 var cT = "' . __('Close', WCPGSK_DOMAIN) . '"; 837 var pT = "' . __('<Prev', WCPGSK_DOMAIN) . '"; 838 var nT = "' . __('Next>', WCPGSK_DOMAIN) . '"; 839 var cTT = "' . __('Now', WCPGSK_DOMAIN) . '"; 840 var cTD = "' . __('Today', WCPGSK_DOMAIN) . '"; 841 842 var mN = ["' . __('January', WCPGSK_DOMAIN) . '", 843 "' . __('February', WCPGSK_DOMAIN) . '", 844 "' . __('March', WCPGSK_DOMAIN) . '", 845 "' . __('April', WCPGSK_DOMAIN) . '", 846 "' . __('May', WCPGSK_DOMAIN) . '", 847 "' . __('June', WCPGSK_DOMAIN) . '", 848 "' . __('July', WCPGSK_DOMAIN) . '", 849 "' . __('August', WCPGSK_DOMAIN) . '", 850 "' . __('September', WCPGSK_DOMAIN) . '", 851 "' . __('October', WCPGSK_DOMAIN) . '", 852 "' . __('November', WCPGSK_DOMAIN) . '", 853 "' . __('December', WCPGSK_DOMAIN) . '"]; 854 855 var mNS = ["' . __('Jan', WCPGSK_DOMAIN) . '", 856 "' . __('Feb', WCPGSK_DOMAIN) . '", 857 "' . __('Mar', WCPGSK_DOMAIN) . '", 858 "' . __('Apr', WCPGSK_DOMAIN) . '", 859 "' . __('May', WCPGSK_DOMAIN) . '", 860 "' . __('Jun', WCPGSK_DOMAIN) . '", 861 "' . __('Jul', WCPGSK_DOMAIN) . '", 862 "' . __('Aug', WCPGSK_DOMAIN) . '", 863 "' . __('Sep', WCPGSK_DOMAIN) . '", 864 "' . __('Oct', WCPGSK_DOMAIN) . '", 865 "' . __('Nov', WCPGSK_DOMAIN) . '", 866 "' . __('Dec', WCPGSK_DOMAIN) . '"]; 867 868 var dN = ["' . __('Sunday', WCPGSK_DOMAIN) . '", 869 "' . __('Monday', WCPGSK_DOMAIN) . '", 870 "' . __('Tuesday', WCPGSK_DOMAIN) . '", 871 "' . __('Wednesday', WCPGSK_DOMAIN) . '", 872 "' . __('Thursday', WCPGSK_DOMAIN) . '", 873 "' . __('Friday', WCPGSK_DOMAIN) . '", 874 "' . __('Saturday', WCPGSK_DOMAIN) . '"]; 875 876 var dNS = ["' . __('Sun', WCPGSK_DOMAIN) . '", 877 "' . __('Mon', WCPGSK_DOMAIN) . '", 878 "' . __('Tue', WCPGSK_DOMAIN) . '", 879 "' . __('Wed', WCPGSK_DOMAIN) . '", 880 "' . __('Thu', WCPGSK_DOMAIN) . '", 881 "' . __('Fri', WCPGSK_DOMAIN) . '", 882 "' . __('Sat', WCPGSK_DOMAIN) . '"]; 883 884 885 886 jQuery("input[display=\'date\']").each(function(i, cal) { 887 var minD = "' . $options['checkoutform']['mindate'] . '"; 888 var maxD = "' . $options['checkoutform']['maxdate'] . '"; 889 if (jQuery(this).attr("mindays")) minD = jQuery(this).attr("mindays"); 890 if (jQuery(this).attr("maxdays")) maxD = jQuery(this).attr("maxdays"); 824 if ( is_checkout() || is_account_page() ) : 825 ?> 826 <div id="wcpgsk-dialog-validation-errors" title="<?php _e('Validation errors' , WCPGSK_DOMAIN); ?>"> 827 <p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span><?php _e('Please check the fields marked with a red border. The values do not pass validation.' , WCPGSK_DOMAIN); ?></p> 828 </div> 829 <?php 830 $options = get_option( 'wcpgsk_settings' ); 831 832 833 echo '<script language="javascript">'; 834 835 echo 'jQuery(document).ready(function(){ 836 jQuery("#cartitemfields").tabs(); 837 var cT = "' . __('Close', WCPGSK_DOMAIN) . '"; 838 var pT = "' . __('<Prev', WCPGSK_DOMAIN) . '"; 839 var nT = "' . __('Next>', WCPGSK_DOMAIN) . '"; 840 var cTT = "' . __('Now', WCPGSK_DOMAIN) . '"; 841 var cTD = "' . __('Today', WCPGSK_DOMAIN) . '"; 891 842 892 var dateF = "dd/mm/yy"; 893 if (jQuery(this).attr("dateformat")) dateF = jQuery(this).attr("dateformat"); 894 var exDays = ""; 895 var exDates = ""; 896 var exWeekend = "0"; 897 if (jQuery(this).attr("daysexcluded")) exDays = jQuery(this).attr("daysexcluded"); 898 if (jQuery(this).attr("datesexcluded")) exDates = jQuery(this).attr("datesexcluded"); 899 if (jQuery(this).attr("exweekend")) exWeekend = jQuery(this).attr("exweekend"); 900 901 902 if ( exDays != null && exDays != "" ) exDays = jQuery.map(exDays.split(","), jQuery.trim); 903 if ( exDates != null && exDates != "" ) exDates = jQuery.map(exDates.split(","), jQuery.trim); 904 jQuery(this).datepicker({ 905 changeMonth: true, 906 changeYear: true, 907 yearRange: "-100:+100", 908 beforeShow: function() { 909 if ((selDate = jQuery(this).val()).length > 0) 910 { 911 iYear = selDate.substring(selDate.length - 4, selDate.length); 912 iMonth = jQuery.inArray(selDate.substring(0, selDate.length - 5), 913 jQuery(this).datepicker("option", "monthNames")); 914 jQuery(this).datepicker("option", "defaultDate", new Date(iYear, iMonth, 1)); 915 jQuery(this).datepicker("setDate", new Date(iYear, iMonth, 1)); 916 } 917 }, 918 beforeShowDay: function(date) { 919 show = true; 920 if ( exWeekend == "1" ) { 921 show = jQuery.datepicker.noWeekends(date)[0]; 922 } 923 if ( show && exDays != null && exDays != "" && exDays.length > 0 ) { 924 925 if ( jQuery.inArray( date.getDay().toString(), exDays ) !== -1 ) show = false; 926 } 927 if ( show && exDates != null && exDates != "" && exDates.length > 0 ) { 928 checkDate = jQuery.datepicker.formatDate(dateF, date); 929 if ( jQuery.inArray( checkDate.toString(), exDates ) !== -1 ) show = false; 930 } 931 return [show, "", (!show) ? "' . __('Date excluded', WCPGSK_DOMAIN) . '" : ""]; 932 }, 933 dateFormat: dateF, 934 minDate: minD, 935 maxDate: maxD, 936 dayNamesShort: dNS, 937 dayNames: dN, 938 monthNamesShort: mNS, 939 monthNames: mN, 940 closeText: cT, 941 prevText: pT, 942 nextText: nT, 943 currentText: cTD, 944 firstDay: 1 945 }); 946 }); 947 948 jQuery("input[display=\'time\']").each(function() { 949 var hMax = 23; 950 var hMin = 0; 951 if (jQuery(this).attr("maxhour")) hMax = parseInt(jQuery(this).attr("maxhour")); 952 if (jQuery(this).attr("minhour")) hMin = parseInt(jQuery(this).attr("minhour")); 843 var mN = ["' . __('January', WCPGSK_DOMAIN) . '", 844 "' . __('February', WCPGSK_DOMAIN) . '", 845 "' . __('March', WCPGSK_DOMAIN) . '", 846 "' . __('April', WCPGSK_DOMAIN) . '", 847 "' . __('May', WCPGSK_DOMAIN) . '", 848 "' . __('June', WCPGSK_DOMAIN) . '", 849 "' . __('July', WCPGSK_DOMAIN) . '", 850 "' . __('August', WCPGSK_DOMAIN) . '", 851 "' . __('September', WCPGSK_DOMAIN) . '", 852 "' . __('October', WCPGSK_DOMAIN) . '", 853 "' . __('November', WCPGSK_DOMAIN) . '", 854 "' . __('December', WCPGSK_DOMAIN) . '"]; 855 856 var mNS = ["' . __('Jan', WCPGSK_DOMAIN) . '", 857 "' . __('Feb', WCPGSK_DOMAIN) . '", 858 "' . __('Mar', WCPGSK_DOMAIN) . '", 859 "' . __('Apr', WCPGSK_DOMAIN) . '", 860 "' . __('May', WCPGSK_DOMAIN) . '", 861 "' . __('Jun', WCPGSK_DOMAIN) . '", 862 "' . __('Jul', WCPGSK_DOMAIN) . '", 863 "' . __('Aug', WCPGSK_DOMAIN) . '", 864 "' . __('Sep', WCPGSK_DOMAIN) . '", 865 "' . __('Oct', WCPGSK_DOMAIN) . '", 866 "' . __('Nov', WCPGSK_DOMAIN) . '", 867 "' . __('Dec', WCPGSK_DOMAIN) . '"]; 868 869 var dN = ["' . __('Sunday', WCPGSK_DOMAIN) . '", 870 "' . __('Monday', WCPGSK_DOMAIN) . '", 871 "' . __('Tuesday', WCPGSK_DOMAIN) . '", 872 "' . __('Wednesday', WCPGSK_DOMAIN) . '", 873 "' . __('Thursday', WCPGSK_DOMAIN) . '", 874 "' . __('Friday', WCPGSK_DOMAIN) . '", 875 "' . __('Saturday', WCPGSK_DOMAIN) . '"]; 876 877 var dNS = ["' . __('Sun', WCPGSK_DOMAIN) . '", 878 "' . __('Mon', WCPGSK_DOMAIN) . '", 879 "' . __('Tue', WCPGSK_DOMAIN) . '", 880 "' . __('Wed', WCPGSK_DOMAIN) . '", 881 "' . __('Thu', WCPGSK_DOMAIN) . '", 882 "' . __('Fri', WCPGSK_DOMAIN) . '", 883 "' . __('Sat', WCPGSK_DOMAIN) . '"]; 953 884 954 jQuery(this).timepicker({ 955 timeFormat: "HH:mm", 956 hourMax: hMax, 957 hourMin: hMin, 958 stepHour: parseInt(jQuery(this).attr("hoursteps")), 959 stepMinute: parseInt(jQuery(this).attr("minutesteps")), 960 addSliderAccess: true, 961 sliderAccessArgs: { touchonly: false }, 962 timeText: "' . __('Time', WCPGSK_DOMAIN) . '", 963 hourText: "' . __('Hour', WCPGSK_DOMAIN) . '", 964 minuteText: "' . __('Minute', WCPGSK_DOMAIN) . '", 965 currentText: cTT, 966 closeText: cT, 967 timeOnlyTitle: "' . __('Choose Time', WCPGSK_DOMAIN) . '" 968 }); 969 }); 970 971 jQuery("input[display=\'number\']").each(function() { 972 var $this = this; 973 jQuery(this).after("<div id=\'slider_" + jQuery(this).attr("id") + "\'></div>"); 974 975 if (jQuery($this).attr("numpres") == "true") { 976 jQuery("#slider_" + jQuery($this).attr("id")).slider({ 977 range: true, 978 min: parseInt(jQuery($this).attr("minvalue")), 979 max: parseInt(jQuery($this).attr("maxvalue")), 980 step: parseInt(jQuery($this).attr("numstep")), 981 values: [ parseInt(jQuery($this).val()), parseInt(jQuery($this).attr("rangemax")) ], 982 slide: function( event, ui ) { 983 jQuery( $this ).val( ui.values[0] + " - " + ui.values[1]); 984 } 985 }); 986 } 987 else { 988 jQuery("#slider_" + jQuery($this).attr("id")).slider({ 989 range: jQuery($this).attr("numpres"), 990 min: parseInt(jQuery($this).attr("minvalue")), 991 max: parseInt(jQuery($this).attr("maxvalue")), 992 step: parseInt(jQuery($this).attr("numstep")), 993 value: parseInt(jQuery($this).val()), 994 slide: function( event, ui ) { 995 jQuery( $this ).val( ui.value ); 996 } 997 }).sliderAccess({ touchonly : false }); 998 } 999 }); 1000 1001 jQuery("select[presentation=\'radio\']").each(function(i, select){ 1002 var $select = jQuery(select); 1003 $select.find("option").each(function(j, option){ 1004 var $option = jQuery(option); 1005 // Create a radio: 1006 if ($option.val() != null && $option.val() != "") { 1007 var $radio = jQuery("<input type=\'radio\' />"); 1008 // Set name and value: 1009 $radio.attr("name", $select.attr("name")).attr("value", $option.val()).attr("class", "radio").attr("style","width:10%"); 1010 // Set checked if the option was selected 1011 if ($option.attr("selected") != null && $option.attr("selected") == "selected" && $select.attr("hasselected") != null && $select.attr("hasselected") == "true" ) $radio.attr("checked", "checked"); 1012 //$radio.text($option.text()); 1013 // Insert radio before select box: 1014 $select.before($radio); 1015 // Insert a label: 1016 $select.before( 1017 jQuery("<span />").attr("for", $select.attr("name")).text($option.text()) 1018 ); 1019 // Insert a <br />: 1020 $select.before("<br/>"); 885 886 887 jQuery("input[display=\'date\']").each(function(i, cal) { 888 var minD = "' . $options['checkoutform']['mindate'] . '"; 889 var maxD = "' . $options['checkoutform']['maxdate'] . '"; 890 if (jQuery(this).attr("mindays")) minD = jQuery(this).attr("mindays"); 891 if (jQuery(this).attr("maxdays")) maxD = jQuery(this).attr("maxdays"); 892 893 var dateF = "dd/mm/yy"; 894 if (jQuery(this).attr("dateformat")) dateF = jQuery(this).attr("dateformat"); 895 var exDays = ""; 896 var exDates = ""; 897 var exWeekend = "0"; 898 if (jQuery(this).attr("daysexcluded")) exDays = jQuery(this).attr("daysexcluded"); 899 if (jQuery(this).attr("datesexcluded")) exDates = jQuery(this).attr("datesexcluded"); 900 if (jQuery(this).attr("exweekend")) exWeekend = jQuery(this).attr("exweekend"); 901 902 903 if ( exDays != null && exDays != "" ) exDays = jQuery.map(exDays.split(","), jQuery.trim); 904 if ( exDates != null && exDates != "" ) exDates = jQuery.map(exDates.split(","), jQuery.trim); 905 jQuery(this).datepicker({ 906 changeMonth: true, 907 changeYear: true, 908 yearRange: "-100:+100", 909 beforeShow: function() { 910 if ((selDate = jQuery(this).val()).length > 0) 911 { 912 iYear = selDate.substring(selDate.length - 4, selDate.length); 913 iMonth = jQuery.inArray(selDate.substring(0, selDate.length - 5), 914 jQuery(this).datepicker("option", "monthNames")); 915 jQuery(this).datepicker("option", "defaultDate", new Date(iYear, iMonth, 1)); 916 jQuery(this).datepicker("setDate", new Date(iYear, iMonth, 1)); 917 } 918 }, 919 beforeShowDay: function(date) { 920 show = true; 921 if ( exWeekend == "1" ) { 922 show = jQuery.datepicker.noWeekends(date)[0]; 923 } 924 if ( show && exDays != null && exDays != "" && exDays.length > 0 ) { 925 926 if ( jQuery.inArray( date.getDay().toString(), exDays ) !== -1 ) show = false; 927 } 928 if ( show && exDates != null && exDates != "" && exDates.length > 0 ) { 929 checkDate = jQuery.datepicker.formatDate(dateF, date); 930 if ( jQuery.inArray( checkDate.toString(), exDates ) !== -1 ) show = false; 931 } 932 return [show, "", (!show) ? "' . __('Date excluded', WCPGSK_DOMAIN) . '" : ""]; 933 }, 934 dateFormat: dateF, 935 minDate: minD, 936 maxDate: maxD, 937 dayNamesShort: dNS, 938 dayNames: dN, 939 monthNamesShort: mNS, 940 monthNames: mN, 941 closeText: cT, 942 prevText: pT, 943 nextText: nT, 944 currentText: cTD, 945 firstDay: 1 946 }); 947 }); 948 949 jQuery("input[display=\'time\']").each(function() { 950 var hMax = 23; 951 var hMin = 0; 952 if (jQuery(this).attr("maxhour")) hMax = parseInt(jQuery(this).attr("maxhour")); 953 if (jQuery(this).attr("minhour")) hMin = parseInt(jQuery(this).attr("minhour")); 954 955 jQuery(this).timepicker({ 956 timeFormat: "HH:mm", 957 hourMax: hMax, 958 hourMin: hMin, 959 stepHour: parseInt(jQuery(this).attr("hoursteps")), 960 stepMinute: parseInt(jQuery(this).attr("minutesteps")), 961 addSliderAccess: true, 962 sliderAccessArgs: { touchonly: false }, 963 timeText: "' . __('Time', WCPGSK_DOMAIN) . '", 964 hourText: "' . __('Hour', WCPGSK_DOMAIN) . '", 965 minuteText: "' . __('Minute', WCPGSK_DOMAIN) . '", 966 currentText: cTT, 967 closeText: cT, 968 timeOnlyTitle: "' . __('Choose Time', WCPGSK_DOMAIN) . '" 969 }); 970 }); 971 972 jQuery("input[display=\'number\']").each(function() { 973 var $this = this; 974 jQuery(this).after("<div id=\'slider_" + jQuery(this).attr("id") + "\'></div>"); 975 976 if (jQuery($this).attr("numpres") == "true") { 977 jQuery("#slider_" + jQuery($this).attr("id")).slider({ 978 range: true, 979 min: parseInt(jQuery($this).attr("minvalue")), 980 max: parseInt(jQuery($this).attr("maxvalue")), 981 step: parseInt(jQuery($this).attr("numstep")), 982 values: [ parseInt(jQuery($this).val()), parseInt(jQuery($this).attr("rangemax")) ], 983 slide: function( event, ui ) { 984 jQuery( $this ).val( ui.values[0] + " - " + ui.values[1]); 985 } 986 }); 987 } 988 else { 989 jQuery("#slider_" + jQuery($this).attr("id")).slider({ 990 range: jQuery($this).attr("numpres"), 991 min: parseInt(jQuery($this).attr("minvalue")), 992 max: parseInt(jQuery($this).attr("maxvalue")), 993 step: parseInt(jQuery($this).attr("numstep")), 994 value: parseInt(jQuery($this).val()), 995 slide: function( event, ui ) { 996 jQuery( $this ).val( ui.value ); 997 } 998 }).sliderAccess({ touchonly : false }); 1021 999 } 1022 1000 }); 1023 $select.remove(); 1001 1002 jQuery("select[presentation=\'radio\']").each(function(i, select){ 1003 var $select = jQuery(select); 1004 $select.find("option").each(function(j, option){ 1005 var $option = jQuery(option); 1006 // Create a radio: 1007 if ($option.val() != null && $option.val() != "") { 1008 var $radio = jQuery("<input type=\'radio\' />"); 1009 // Set name and value: 1010 $radio.attr("name", $select.attr("name")).attr("value", $option.val()).attr("class", "radio").attr("style","width:10%"); 1011 // Set checked if the option was selected 1012 if ($option.attr("selected") != null && $option.attr("selected") == "selected" && $select.attr("hasselected") != null && $select.attr("hasselected") == "true" ) $radio.attr("checked", "checked"); 1013 //$radio.text($option.text()); 1014 // Insert radio before select box: 1015 $select.before($radio); 1016 // Insert a label: 1017 $select.before( 1018 jQuery("<span />").attr("for", $select.attr("name")).text($option.text()) 1019 ); 1020 // Insert a <br />: 1021 $select.before("<br/>"); 1022 } 1023 }); 1024 $select.remove(); 1025 }); 1026 1027 jQuery("select[presentation=\'checkbox\']").each(function(i, select){ 1028 var $select = jQuery(select); 1029 $select.find("option").each(function(j, option){ 1030 var $option = jQuery(option); 1031 // Create a radio: 1032 if ($option.val() != null && $option.val() != "") { 1033 var $radio = jQuery("<input type=\'checkbox\' />"); 1034 // Set name and value: 1035 $radio.attr("name", $select.attr("name") + "[" + j + "]").attr("value", $option.val()).attr("class", "checkbox").attr("style","width:10%"); 1036 // Set checked if the option was selected 1037 if ($option.attr("selected") != null && $option.attr("selected") == "selected" && $select.attr("hasselected") != null && $select.attr("hasselected") == "true" ) $radio.attr("checked", "checked"); 1038 //$radio.text($option.text()); 1039 // Insert radio before select box: 1040 $select.before($radio); 1041 // Insert a label: 1042 $select.before( 1043 jQuery("<span />").attr("for", $select.attr("name")).text($option.text()) 1044 ); 1045 $select.before("<br/>"); 1046 } 1047 }); 1048 $select.remove(); 1049 }); 1050 jQuery("select[multiple=\'multiple\']").each(function(i, select){ 1051 var $select = jQuery(select); 1052 $select.attr("name", $select.attr("name") + "[]"); 1053 }); 1054 1024 1055 }); 1025 1026 jQuery("select[presentation=\'checkbox\']").each(function(i, select){ 1027 var $select = jQuery(select); 1028 $select.find("option").each(function(j, option){ 1029 var $option = jQuery(option); 1030 // Create a radio: 1031 if ($option.val() != null && $option.val() != "") { 1032 var $radio = jQuery("<input type=\'checkbox\' />"); 1033 // Set name and value: 1034 $radio.attr("name", $select.attr("name") + "[" + j + "]").attr("value", $option.val()).attr("class", "checkbox").attr("style","width:10%"); 1035 // Set checked if the option was selected 1036 if ($option.attr("selected") != null && $option.attr("selected") == "selected" && $select.attr("hasselected") != null && $select.attr("hasselected") == "true" ) $radio.attr("checked", "checked"); 1037 //$radio.text($option.text()); 1038 // Insert radio before select box: 1039 $select.before($radio); 1040 // Insert a label: 1041 $select.before( 1042 jQuery("<span />").attr("for", $select.attr("name")).text($option.text()) 1043 ); 1044 $select.before("<br/>"); 1045 } 1046 }); 1047 $select.remove(); 1048 }); 1049 jQuery("select[multiple=\'multiple\']").each(function(i, select){ 1050 var $select = jQuery(select); 1051 $select.attr("name", $select.attr("name") + "[]"); 1052 }); 1053 1054 }); 1055 </script><!--unit test after checkout end-->'; 1056 //load our user scripts from db... 1057 $wcpgsk_checkoutjs = get_option('wcpgsk_checkoutjs'); 1058 if ( !empty($wcpgsk_checkoutjs) ) : 1059 echo '<script language="javascript">'; 1060 echo $wcpgsk_checkoutjs; 1061 echo '</script>'; 1062 endif; 1063 1056 </script><!--unit test after checkout end-->'; 1057 //load our user scripts from db... 1058 $wcpgsk_checkoutjs = get_option('wcpgsk_checkoutjs'); 1059 if ( !empty($wcpgsk_checkoutjs) ) : 1060 echo '<script language="javascript">'; 1061 echo $wcpgsk_checkoutjs; 1062 echo '</script>'; 1063 endif; 1064 endif; 1064 1065 } 1065 1066 -
woocommerce-poor-guys-swiss-knife/trunk/woocommerce-poor-guys-swiss-knife.php
r972884 r976205 8 8 * Author: Uli Hake 9 9 * Author URI: http://takebarcelona.com/authorship/uli-hake 10 * Version: 1.9. 610 * Version: 1.9.7 11 11 * @package WordPress 12 12 * @subpackage WooCommerce Poor Guys Swiss Knife … … 106 106 //load into our global 107 107 $wcpgsk = new WCPGSK_Main( __FILE__ ); 108 $wcpgsk->version = '1.9. 6';108 $wcpgsk->version = '1.9.7'; 109 109 $wcpgsk->wcpgsk_hook_woocommerce_filters(); 110 110
Note: See TracChangeset
for help on using the changeset viewer.