Changeset 1308754
- Timestamp:
- 12/15/2015 05:43:47 AM (10 years ago)
- Location:
- shopp/trunk
- Files:
-
- 31 edited
-
Shopp.php (modified) (1 diff)
-
api/theme/customer.php (modified) (3 diffs)
-
api/theme/storefront.php (modified) (1 diff)
-
core/flow/Admin.php (modified) (2 diffs)
-
core/flow/Order.php (modified) (3 diffs)
-
core/flow/Warehouse.php (modified) (5 diffs)
-
core/library/Core.php (modified) (1 diff)
-
core/library/DB.php (modified) (1 diff)
-
core/library/Lookup.php (modified) (3 diffs)
-
core/library/Session.php (modified) (1 diff)
-
core/library/Version.php (modified) (2 diffs)
-
core/model/Collection.php (modified) (7 diffs)
-
core/model/Item.php (modified) (1 diff)
-
core/model/Product.php (modified) (5 diffs)
-
core/model/Purchase.php (modified) (2 diffs)
-
core/ui/behaviors/address.js (modified) (1 diff)
-
core/ui/behaviors/address.min.js (modified) (1 diff)
-
core/ui/categories/categories.php (modified) (2 diffs)
-
core/ui/customers/customers.php (modified) (2 diffs)
-
core/ui/discounts/discounts.php (modified) (2 diffs)
-
core/ui/orders/order.php (modified) (1 diff)
-
core/ui/orders/orders.php (modified) (1 diff)
-
core/ui/products/inventory.php (modified) (2 diffs)
-
core/ui/products/products.php (modified) (2 diffs)
-
core/ui/settings/images.php (modified) (2 diffs)
-
core/ui/styles/admin.css (modified) (6 diffs)
-
core/ui/widgets/tagcloud.php (modified) (1 diff)
-
gateways/PayPal/PayPalStandard.php (modified) (1 diff)
-
readme.md (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
services/image.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shopp/trunk/Shopp.php
r1122729 r1308754 4 4 * Plugin URI: http://shopplugin.com 5 5 * Description: An ecommerce framework for WordPress. 6 * Version: 1.3. 96 * Version: 1.3.10 7 7 * Author: Ingenesis Limited 8 8 * Author URI: http://ingenesis.net 9 9 * Requires at least: 3.5 10 * Tested up to: 4. 110 * Tested up to: 4.4 11 11 * 12 12 * Portions created by Ingenesis Limited are Copyright © 2008-2014 by Ingenesis Limited -
shopp/trunk/api/theme/customer.php
r1122729 r1308754 1771 1771 $Address = self::AddressObject($options['address']); 1772 1772 if ( ! property_exists($Address, $options['property']) ) $options['property'] = 'address'; 1773 $options['value'] = $Address->{$options['property']};1773 if ( ! isset($options['value']) ) $options['value'] = $Address->{$options['property']}; 1774 1774 extract($options, EXTR_SKIP); 1775 1775 … … 1800 1800 $options['address'] = self::valid_address($options['address']); 1801 1801 $Address = self::AddressObject($options['address']); 1802 $options['value'] = $Address->country;1802 if ( ! isset($options['value']) ) $options['value'] = $Address->country; 1803 1803 $options['selected'] = $options['value']; 1804 1804 $options['id'] = "{$options['address']}-country"; … … 1851 1851 $options['address'] = self::valid_address($options['address']); 1852 1852 $Address = self::AddressObject($options['address']); 1853 $options['value'] = $Address->state;1853 if ( ! isset($options['value']) ) $options['value'] = $Address->state; 1854 1854 $options['selected'] = $options['value']; 1855 1855 $options['id'] = "{$options['address']}-state"; -
shopp/trunk/api/theme/storefront.php
r1122729 r1308754 1389 1389 1390 1390 if ( empty($tags) ) return false; 1391 1392 if ( ! empty($exclude) ) { 1393 $excludes = explode(',', $exclude); 1394 1395 foreach ( $tags as $key => $tag ) { 1396 if ( in_array($tag->name, $excludes) ) 1397 unset($tags[ $key ]); 1398 } 1399 } 1391 1400 1392 1401 $min = $max = false; -
shopp/trunk/core/flow/Admin.php
r1023860 r1308754 1098 1098 $screen = convert_to_screen( $screen ); 1099 1099 1100 $this-> _screen = $screen;1100 $this->screen = $this->_screen = $screen; 1101 1101 1102 1102 if ( !empty( $columns ) ) { … … 1158 1158 } 1159 1159 1160 public function page_navigation ( $which ) { 1161 return call_user_func_array( array( $this, 'pagination' ), func_get_args() ); 1162 } 1163 1160 1164 } -
shopp/trunk/core/flow/Order.php
r1122729 r1308754 399 399 public function auth ( $Purchase ) { 400 400 401 add_action('shopp_authed_order_event', array($this, 'accounts')); 401 402 add_action('shopp_authed_order_event', array($this, 'notify')); 402 add_action('shopp_authed_order_event', array($this, 'accounts'));403 403 add_action('shopp_authed_order_event', array($this, 'success')); 404 404 … … 420 420 public function sale ( $Purchase ) { 421 421 422 add_action('shopp_captured_order_event', array($this, 'accounts')); 422 423 add_action('shopp_captured_order_event', array($this, 'notify')); 423 add_action('shopp_captured_order_event', array($this, 'accounts'));424 424 add_action('shopp_captured_order_event', array($this, 'success')); 425 425 … … 540 540 541 541 add_action( 'shopp_order_event', array($Purchase, 'notifications') ); 542 } elseif ( 'voided' == $Purchase->txnstatus ) 543 $this->invoice($Purchase); // Re-invoice cancelled orders that are still in-progress @see #1930 542 } elseif ( 'voided' == $Purchase->txnstatus ) { 543 $this->invoice($Purchase); // Re-invoice cancelled orders that are still in-progress @see #1930 544 } elseif ( $Purchase->did('invoiced') ) { 545 // Reset the order status to invoiced without invoicing it again @see #3301 546 $Purchase->txnstatus = 'invoiced'; 547 $Purchase->save(); 548 } 544 549 545 550 $this->process($Purchase); -
shopp/trunk/core/flow/Warehouse.php
r1122729 r1308754 165 165 } break; 166 166 } 167 wp_cache_delete( 'shopp_product_subcounts' ); 167 168 // Gracefully invalidate Shopp object caching 169 Shopp::cache_invalidate(); 170 168 171 $redirect = add_query_arg( $_GET, $adminurl ); 169 172 $redirect = remove_query_arg( array('action','selected','delete_all'), $redirect ); … … 172 175 173 176 if ($duplicate) { 177 // Gracefully invalidate Shopp object caching 178 Shopp::cache_invalidate(); 179 174 180 $Product = new ShoppProduct($duplicate); 175 181 $Product->duplicate(); … … 189 195 190 196 if ($save) { 191 wp_cache_delete('shopp_product_subcounts'); 197 198 // Gracefully invalidate Shopp object caching 199 Shopp::cache_invalidate(); 200 192 201 $this->save($Shopp->Product); 193 202 $this->notice( sprintf(__('%s has been saved.','Shopp'),'<strong>'.stripslashes($Shopp->Product->name).'</strong>') ); … … 421 430 422 431 // Get sub-screen counts 423 $subcounts = wp_cache_get('shopp_product_subcounts','shopp_admin');432 $subcounts = Shopp::cache_get('shopp_product_subcounts','shopp_admin'); 424 433 if ( $subcounts ) { 425 434 foreach ($subcounts as $name => $total) … … 446 455 $subcounts[ $name ] = $subquery['total']; 447 456 } 448 wp_cache_set('shopp_product_subcounts', $subcounts, 'shopp_admin');457 Shopp::cache_set('shopp_product_subcounts', $subcounts, 'shopp_admin'); 449 458 } 450 459 -
shopp/trunk/core/library/Core.php
r1122729 r1308754 2321 2321 2322 2322 } 2323 2324 /** 2325 * Keyed wrapper for wp_cache_set 2326 * 2327 * @author Clifton Griffin 2328 * @since 1.4 2329 * 2330 * @param mixed $key 2331 * @param mixed $data 2332 * @param mixed $group (default: null) 2333 * @param mixed $expire (default: null) 2334 * 2335 * @return True 2336 */ 2337 public static function cache_set ( $key, $data, $group = null, $expire = null ) { 2338 // Allows us to gracefully expire cache when required 2339 $ns_key = wp_cache_get( 'shopp_cache_key' ); 2340 2341 // If cache key doesn't exist, create it 2342 if ( $ns_key === false ) { 2343 $ns_key = 1; 2344 wp_cache_set( 'shopp_cache_key', $ns_key ); 2345 } 2346 2347 return wp_cache_set($key . $ns_key, $data, $group, $expire); 2348 } 2349 2350 /** 2351 * Keyed wrapper for wp_cache_get function. 2352 * 2353 * @author Clifton Griffin 2354 * @since 1.4 2355 * 2356 * @param mixed $key 2357 * @param mixed $group (default: null) 2358 * @param mixed $force (default: null) 2359 * @param mixed $found (default: null) 2360 * 2361 * @return False on failure to retrieve contents or the cache contents on success 2362 */ 2363 public static function cache_get ( $key, $group = null, $force = null, $found = null ) { 2364 // Seed request for cache 2365 $ns_key = wp_cache_get( 'shopp_cache_key' ); 2366 2367 return wp_cache_get( $key . $ns_key, $group, $force, $found ); 2368 } 2369 2370 /** 2371 * Increment the cache key to gracefully invalidate Shopp specific caches 2372 * 2373 * @author Clifton Griffin 2374 * @since 1.4 2375 * 2376 * @return void 2377 */ 2378 public static function cache_invalidate() { 2379 wp_cache_incr( 'shopp_cache_key' ); 2380 2381 do_action('shopp_cache_invalidate'); 2382 } 2323 2383 2324 2384 } // End abstract class ShoppCore -
shopp/trunk/core/library/DB.php
r1023860 r1308754 1165 1165 1166 1166 // Update record 1167 unset($data['id']); 1167 1168 $dataset = ShoppDatabaseObject::dataset($data); 1168 1169 sDB::query("UPDATE $this->_table SET $dataset WHERE $this->_key='$id'"); -
shopp/trunk/core/library/Lookup.php
r1020997 r1308754 256 256 $_['QA'] = array('name'=>__('Qatar','Shopp'),'currency'=>array('code'=>'QAR','format'=>'####,## ر.ق'),'units'=>'metric','region'=>4); 257 257 $_['RE'] = array('name'=>__('Réunion','Shopp'),'currency'=>array('code'=>'','format'=>'# ###,## €'),'units'=>'metric','region'=>5); 258 $_['RO'] = array('name'=>__('Romania','Shopp'),'currency'=>array('code'=>'RO L','format'=>'#.###,## lei'),'units'=>'metric','region'=>3);258 $_['RO'] = array('name'=>__('Romania','Shopp'),'currency'=>array('code'=>'RON','format'=>'#.###,## lei'),'units'=>'metric','region'=>3); 259 259 $_['RU'] = array('name'=>__('Russia','Shopp'),'currency'=>array('code'=>'RUB','format'=>'# ###,## руб'),'units'=>'metric','region'=>6); 260 260 $_['RW'] = array('name'=>__('Rwanda','Shopp'),'currency'=>array('code'=>'RWF','format'=>'RF #.###'),'units'=>'metric','region'=>5); … … 302 302 $_['TT'] = array('name'=>__('Trinidad and Tobago','Shopp'),'currency'=>array('code'=>'TTD','format'=>'TT$#,###.##'),'units'=>'metric','region'=>2); 303 303 $_['TN'] = array('name'=>__('Tunisia','Shopp'),'currency'=>array('code'=>'TND','format'=>'####,### د.ت'),'units'=>'metric','region'=>5); 304 $_['TR'] = array('name'=>__('Turkey','Shopp'),'currency'=>array('code'=>'TR L','format'=>'#.###,## TL'),'units'=>'metric','region'=>6);304 $_['TR'] = array('name'=>__('Turkey','Shopp'),'currency'=>array('code'=>'TRY','format'=>'#.###,## TL'),'units'=>'metric','region'=>6); 305 305 $_['TM'] = array('name'=>__('Turkmenistan','Shopp'),'currency'=>array('code'=>'TMT','format'=>'#,###.## m'),'units'=>'metric','region'=>6); 306 306 $_['TC'] = array('name'=>__('Turks and Caicos Islands','Shopp'),'currency'=>array('code'=>'USD','format'=>'$#,###.##'),'units'=>'metric','region'=>1); … … 309 309 $_['UA'] = array('name'=>__('Ukraine','Shopp'),'currency'=>array('code'=>'UAH','format'=>'# ###,## ₴'),'units'=>'metric','region'=>3); 310 310 $_['AE'] = array('name'=>__('United Arab Emirates','Shopp'),'currency'=>array('code'=>'AED','format'=>'Dhs. #,###.##'),'units'=>'metric','region'=>4); 311 $_['UY'] = array('name'=>__('Uruguay','Shopp'),'currency'=>array('code'=>'UY P','format'=>'$#,###.##'),'units'=>'metric','region'=>2);311 $_['UY'] = array('name'=>__('Uruguay','Shopp'),'currency'=>array('code'=>'UYU','format'=>'$#,###.##'),'units'=>'metric','region'=>2); 312 312 $_['UZ'] = array('name'=>__('Uzbekistan','Shopp'),'currency'=>array('code'=>'UZS','format'=>'$#,###.##'),'units'=>'metric','region'=>6); 313 313 $_['VU'] = array('name'=>__('Vanuatu','Shopp'),'currency'=>array('code'=>'VUV','format'=>'$#,###.##'),'units'=>'metric','region'=>7); 314 314 $_['VA'] = array('name'=>__('Vatican City','Shopp'),'currency'=>array('code'=>'EUR','format'=>'€#,###.##'),'units'=>'metric','region'=>3); 315 315 $_['VN'] = array('name'=>__('Vietnam','Shopp'),'currency'=>array('code'=>'VND','format'=>'#.###,## ₫'),'units'=>'metric','region'=>6); 316 $_['VE'] = array('name'=>__('Venezuela','Shopp'),'currency'=>array('code'=>'V UB','format'=>'Bs. #,###.##'),'units'=>'metric','region'=>2);316 $_['VE'] = array('name'=>__('Venezuela','Shopp'),'currency'=>array('code'=>'VEF','format'=>'Bs. #,###.##'),'units'=>'metric','region'=>2); 317 317 $_['WF'] = array('name'=>__('Wallis and Futuna','Shopp'),'currency'=>array('code'=>'XPF','format'=>'#,###.##F'),'units'=>'metric','region'=>7); 318 318 $_['EH'] = array('name'=>__('Western Sahara','Shopp'),'currency'=>array('code'=>'MAD','format'=>'#.###,## درهم'),'units'=>'metric','region'=>5); -
shopp/trunk/core/library/Session.php
r1122729 r1308754 60 60 $this->trim(); // Cleanup stale sessions 61 61 62 if ( $this->open() ) // Reopen an existing session 63 add_action('shutdown', array($this, 'save')); // Save on shutdown 64 else $this->cook(); // Cook a new session cookie 62 if ( ! $this->open() ) // Reopen an existing session 63 $this->cook(); // Cook a new session cookie 64 65 add_action('shutdown', array($this, 'save')); // Save on shutdown 65 66 66 67 shopp_debug('Session started ' . str_repeat('-', 64)); -
shopp/trunk/core/library/Version.php
r1122729 r1308754 22 22 23 23 /** @type int PATCH The maintenance patch version number */ 24 const PATCH = 9;24 const PATCH = 10; 25 25 26 26 /** @type string PRERELEASE The prerelease designation (dev, beta, RC1) */ … … 28 28 29 29 /** @type string CODENAME The release project code name */ 30 const CODENAME = ' Cydonia';30 const CODENAME = 'Ares'; 31 31 32 32 /** @type int DB The database schema version */ -
shopp/trunk/core/model/Collection.php
r1122729 r1308754 198 198 199 199 $cachehash = 'collection_alphanav_' . md5($alphaquery); 200 $cached = wp_cache_get($cachehash, 'shopp_collection');200 $cached = Shopp::cache_get($cachehash, 'shopp_collection_alphanav'); 201 201 if ($cached) { // Load from object cache, if available 202 202 $this->alpha = $cached; … … 205 205 $expire = apply_filters('shopp_collection_cache_expire', 43200); 206 206 $alpha = sDB::query($alphaquery, 'array', array($this, 'alphatable')); 207 wp_cache_set($cachehash, $alpha, 'shopp_collection_alphanav'); 207 208 Shopp::cache_set($cachehash, $alpha, 'shopp_collection_alphanav', $expire); 208 209 } 209 210 … … 222 223 // Load from cached results if available, or run the query and cache the results 223 224 $cachehash = 'collection_' . md5($query); 224 $cached = wp_cache_get($cachehash, 'shopp_collection');225 $cached = Shopp::cache_get($cachehash, 'shopp_collection'); 225 226 if ( $cached ) { 226 227 $this->products = $cached->products; … … 240 241 if ($limited && false === strpos($limit, ',')) $cache->total = $this->total = min($limit, $this->total); 241 242 242 wp_cache_set($cachehash,$cache,'shopp_collection');243 Shopp::cache_set($cachehash,$cache,'shopp_collection', $expire); 243 244 } 244 245 if ( false === $this->products ) $this->products = array(); … … 783 784 } 784 785 786 public function filter( $filter ) { 787 sanitize_term( $this, $this->taxon, $filter ); 788 } 789 785 790 } 786 791 … … 956 961 // Support cache accelleration 957 962 $cachehash = 'collection_facet_' . md5($query); 958 $cached = wp_cache_get($cachehash, 'shopp_collection_facet');963 $cached = Shopp::cache_get($cachehash, 'shopp_collection_facet'); 959 964 if ( $cached ) $set = $cached; 960 965 else { 961 966 $set = sDB::query($query, 'array', 'col', 'parent'); 962 wp_cache_set($cachehash, $set, 'shopp_collection_facet');967 Shopp::cache_set($cachehash, $set, 'shopp_collection_facet'); 963 968 } 964 969 … … 2098 2103 2099 2104 $cachehash = 'alsobought_' . md5($query); 2100 $cached = wp_cache_get($cachehash, 'shopp_collection_alsobought');2105 $cached = Shopp::cache_get($cachehash, 'shopp_collection_alsobought'); 2101 2106 if ( $cached ) $matches = $cached; 2102 2107 else { 2103 2108 $matches = sDB::query($query, 'array', 'col', 'p2'); 2104 wp_cache_set($cachehash, $matches, 'shopp_collection_alsobought');2109 Shopp::cache_set($cachehash, $matches, 'shopp_collection_alsobought', 14400); //Expires in 4 hours 2105 2110 } 2106 2111 -
shopp/trunk/core/model/Item.php
r1122729 r1308754 664 664 **/ 665 665 public function instock ( $qty = false ) { 666 if ( ! shopp_setting_enabled('inventory') ) return true;666 if ( ! shopp_setting_enabled('inventory') || shopp_setting_enabled('backorders') ) return true; 667 667 668 668 if ( ! $this->inventory ) { -
shopp/trunk/core/model/Product.php
r1122729 r1308754 107 107 if ( empty($this->id)) return; 108 108 do_action('save_post', $this->id, get_post($this->id)); 109 if( function_exists('clean_post_cache') ) 110 clean_post_cache($this->id); 109 111 } 110 112 … … 1029 1031 $id = $this->id; 1030 1032 if (empty($id)) return false; 1031 1033 1034 if ( false === has_action('shopp_product_delete',array($this,'deletepost'))) 1035 add_action('shopp_product_delete',array($this,'deletepost')); 1036 do_action_ref_array('shopp_product_delete',array($this)); 1037 1032 1038 // Delete assignment to taxonomies (categories, tags, custom taxonomies) 1033 1039 wp_delete_object_term_relationships($id, get_object_taxonomies(ShoppProduct::$posttype)); … … 1069 1075 1070 1076 } 1077 1078 /** 1079 * Provides compatibility with other plugins that handle custom post types 1080 * 1081 * @author Jonathan Davis 1082 * @since 1.2 1083 * 1084 * @return void 1085 **/ 1086 public function deletepost () { 1087 if ( empty($this->id)) return; 1088 do_action('delete_post', $this->id); 1089 if( function_exists('clean_post_cache') ) 1090 clean_post_cache($this->id); 1091 } 1071 1092 1072 1093 /** … … 1081 1102 $id = $this->{$this->_key}; 1082 1103 sDB::query("UPDATE $this->_table SET post_status='trash' WHERE ID='$id'"); 1104 if ( false === has_action('shopp_product_trashed',array($this,'trashpost'))) 1105 add_action('shopp_product_trashed',array($this,'trashpost')); 1106 do_action_ref_array('shopp_product_trashed',array($this)); 1107 } 1108 1109 /** 1110 * Provides compatibility with other plugins that handle custom post types 1111 * 1112 * @author Jonathan Davis 1113 * @since 1.2 1114 * 1115 * @return void 1116 **/ 1117 public function trashpost () { 1118 if ( empty($this->id)) return; 1119 do_action('wp_trash_post', $this->id); 1120 if( function_exists('clean_post_cache') ) 1121 clean_post_cache($this->id); 1083 1122 } 1084 1123 … … 1221 1260 1222 1261 foreach ( $ids as $id ) { // Recount taxonomy counts #2968 1223 $laststatus = get_post_status($id); 1224 $Post = new StdClass; 1225 $Post->ID = $id; 1226 $Post->post_type = ShoppProduct::$posttype; 1227 wp_transition_post_status($status, $laststatus, $Post); 1262 $Post = get_post($id); 1263 switch ($status) { 1264 case 'trash': 1265 do_action('wp_trash_post', $id); 1266 break; 1267 default: 1268 do_action('save_post', $id, $Post); 1269 break; 1270 } 1271 if( function_exists('clean_post_cache') ) 1272 clean_post_cache($id); 1273 1274 wp_transition_post_status($status, $Product->status, $Post); 1228 1275 } 1229 1276 -
shopp/trunk/core/model/Purchase.php
r1122729 r1308754 319 319 $Purchase = $Event->order(); 320 320 if ( ! $Purchase->stocked ) return true; // no inventory in purchase 321 321 322 322 $prices = array(); 323 323 $allocated = array(); … … 374 374 375 375 $Event->unstocked($allocated); 376 377 // If out of stock products should be hidden from catalog, 378 // go ahead and invalidate the cache after unstock 379 if ( ! Shopp::str_true( shopp_setting('outofstock_catalog') ) ) 380 Shopp::cache_invalidate(); 376 381 } 377 382 -
shopp/trunk/core/ui/behaviors/address.js
r1122729 r1308754 56 56 $(this).attr('data-last', $(this).val()); 57 57 }; 58 59 // Handle changes to the firstname and lastname fields 60 $('#firstname,#lastname').each(keepLastValue).change(function () { 61 var namefield = $(this); // Reference to the modified field 62 lastfirstname = $('#firstname').attr('data-last'), 63 lastlastname = $('#lastname').attr('data-last'), 64 firstlast = ( ( $('#firstname').val() ).trim() + " " + ( $('#lastname').val() ).trim() ).trim(); 65 66 namefield.val( (namefield.val()).trim() ); 67 68 // Update the billing name and shipping name 69 $('#billing-name,#shipping-name').each(function() { 70 var value = $(this).val(); 71 72 if ( value.trim().length == 0 ) { 73 // Empty billing or shipping name 74 $('#billing-name,#shipping-name').val(firstlast); 75 } else if ( '' != value && ( $('#firstname').val() == value || $('#lastname').val() == value ) ) { 76 // Only one name entered (so far), add the other name 77 $(this).val(firstlast); 78 } else if ( 'firstname' == namefield.attr('id') && value.indexOf(lastlastname) != -1 ) { 79 // firstname changed & last lastname matched 80 $(this).val( value.replace(lastfirstname, namefield.val()).trim() ); 81 } else if ( 'lastname' == namefield.attr('id') && value.indexOf(lastfirstname) != -1 ) { 82 // lastname changed & last firstname matched 83 $(this).val( value.replace(lastlastname, namefield.val()).trim() ); 84 } 85 86 }); 87 88 }).change(keepLastValue); 58 59 // When first and last name are changed, pre-fill billing name and shipping name if empty 60 $('#firstname,#lastname').change( function() { 61 // If other name field is empty, bail 62 var other_field_id = $(this).attr('id') == 'firstname' ? 'lastname' : 'firstname'; 63 if ( ! $('#' + other_field_id).val().trim() || ! $(this).val().trim() ) return; 64 65 // Otherwise, proceed with setting billing and shipping name 66 $('#billing-name,#shipping-name').filter(function() { 67 return ( this.value === '' ); 68 }).val(new String($('#firstname').val()+" "+$('#lastname').val()).trim()); 69 } ); 89 70 90 71 // Update state/province -
shopp/trunk/core/ui/behaviors/address.min.js
r1122729 r1308754 4 4 * Licensed under the GPLv3 {@see license.txt} 5 5 */ 6 (function($){jQuery.fn.upstate=function(){if(typeof regions==="undefined"){return}$(this).change(function(e,init){var $this=$(this),prefix=$this.attr("id").split("-")[0],country=$this.val(),state=$this.parents().find("#"+prefix+"-state"),menu=$this.parents().find("#"+prefix+"-state-menu"),options='<option value=""></option>';if(menu.length==0){return true}if(menu.hasClass("hidden")){menu.removeClass("hidden").hide()}if(regions[country]||(init&&menu.find("option").length>1)){state.setDisabled(true).addClass("_important").hide();if(regions[country]){$.each(regions[country],function(value,label){options+='<option value="'+value+'">'+label+"</option>"});if(!init){menu.empty().append(options).setDisabled(false).show().focus()}if(menu.hasClass("auto-required")){menu.addClass("required")}}else{if(menu.hasClass("auto-required")){menu.removeClass("required")}}menu.setDisabled(false).show();$("label[for="+state.attr("id")+"]").attr("for",menu.attr("id"))}else{menu.empty().setDisabled(true).hide();state.setDisabled(false).show().removeClass("_important");$("label[for="+menu.attr("id")+"]").attr("for",state.attr("id"));if(!init){state.val("").focus()}}}).trigger("change",[true]);return $(this)}})(jQuery);jQuery(document).ready(function($){var sameaddr=$(".sameaddress"),shipFields=$("#shipping-address-fields"),billFields=$("#billing-address-fields"),keepLastValue=function(){$(this).attr("data-last",$(this).val())};$("#firstname,#lastname").each(keepLastValue).change(function(){var namefield=$(this);lastfirstname=$("#firstname").attr("data-last"),lastlastname=$("#lastname").attr("data-last"),firstlast=(($("#firstname").val()).trim()+" "+($("#lastname").val()).trim()).trim();namefield.val((namefield.val()).trim());$("#billing-name,#shipping-name").each(function(){var value=$(this).val();if(value.trim().length==0){$("#billing-name,#shipping-name").val(firstlast)}else{if(""!=value&&($("#firstname").val()==value||$("#lastname").val()==value)){$(this).val(firstlast)}else{if("firstname"==namefield.attr("id")&&value.indexOf(lastlastname)!=-1){$(this).val(value.replace(lastfirstname,namefield.val()).trim())}else{if("lastname"==namefield.attr("id")&&value.indexOf(lastfirstname)!=-1){$(this).val(value.replace(lastlastname,namefield.val()).trim())}}}}})}).change(keepLastValue);$("#billing-country,#shipping-country").upstate();sameaddr.change(function(e,init){var refocus=false,bc=$("#billing-country"),sc=$("#shipping-country"),prime="billing"==sameaddr.val()?shipFields:billFields,alt="shipping"==sameaddr.val()?shipFields:billFields;if(sameaddr.is(":checked")){prime.removeClass("half");alt.hide().find(".required").setDisabled(true)}else{prime.addClass("half");alt.show().find(".disabled:not(._important)").setDisabled(false);if(!init){refocus=true}}if(bc.is(":visible")){bc.trigger("change.localemenu",[init])}if(sc.is(":visible")){sc.trigger("change.localemenu",[init])}if(refocus){alt.find("input:first").focus()}}).trigger("change",[true]).click(function(){$(this).change()})}); 6 (function(b){jQuery.fn.upstate=function(){if("undefined"!==typeof regions)return b(this).change(function(g,e){var a=b(this),h=a.attr("id").split("-")[0],d=a.val(),c=a.parents().find("#"+h+"-state"),a=a.parents().find("#"+h+"-state-menu"),f='<option value=""></option>';if(0==a.length)return!0;a.hasClass("hidden")&&a.removeClass("hidden").hide();regions[d]||e&&1<a.find("option").length?(c.setDisabled(!0).addClass("_important").hide(),regions[d]?(b.each(regions[d],function(b,a){f+='<option value="'+ 7 b+'">'+a+"</option>"}),e||a.empty().append(f).setDisabled(!1).show().focus(),a.hasClass("auto-required")&&a.addClass("required")):a.hasClass("auto-required")&&a.removeClass("required"),a.setDisabled(!1).show(),b("label[for="+c.attr("id")+"]").attr("for",a.attr("id"))):(a.empty().setDisabled(!0).hide(),c.setDisabled(!1).show().removeClass("_important"),b("label[for="+a.attr("id")+"]").attr("for",c.attr("id")),e||c.val("").focus())}).trigger("change",[!0]),b(this)}})(jQuery); 8 jQuery(document).ready(function(b){var g=b(".sameaddress"),e=b("#shipping-address-fields"),a=b("#billing-address-fields");b("#firstname,#lastname").change(function(){var a="firstname"==b(this).attr("id")?"lastname":"firstname";b("#"+a).val().trim()&&b(this).val().trim()&&b("#billing-name,#shipping-name").filter(function(){return""===this.value}).val((new String(b("#firstname").val()+" "+b("#lastname").val())).trim())});b("#billing-country,#shipping-country").upstate();g.change(function(h,d){var c= 9 !1,f=b("#billing-country"),l=b("#shipping-country"),m="billing"==g.val()?e:a,k="shipping"==g.val()?e:a;g.is(":checked")?(m.removeClass("half"),k.hide().find(".required").setDisabled(!0)):(m.addClass("half"),k.show().find(".disabled:not(._important)").setDisabled(!1),d||(c=!0));f.is(":visible")&&f.trigger("change.localemenu",[d]);l.is(":visible")&&l.trigger("change.localemenu",[d]);c&&k.find("input:first").focus()}).trigger("change",[!0]).click(function(){b(this).change()})}); -
shopp/trunk/core/ui/categories/categories.php
r831831 r1308754 27 27 </div> 28 28 29 <?php $ListTable->pag ination( 'top' ); ?>29 <?php $ListTable->page_navigation( 'top' ); ?> 30 30 </div> 31 31 … … 135 135 </table> 136 136 </form> 137 <div class="tablenav"><?php $ListTable->pag ination( 'bottom' ); ?></div>137 <div class="tablenav"><?php $ListTable->page_navigation( 'bottom' ); ?></div> 138 138 </div> 139 139 -
shopp/trunk/core/ui/customers/customers.php
r821385 r1308754 34 34 </div> 35 35 36 <?php $ListTable->pag ination('top'); ?>36 <?php $ListTable->page_navigation('top'); ?> 37 37 <div class="clear"></div> 38 38 </div> … … 108 108 <?php endif; ?> 109 109 110 <?php $ListTable->pag ination('bottom'); ?>110 <?php $ListTable->page_navigation('bottom'); ?> 111 111 112 112 <div class="clear"></div> -
shopp/trunk/core/ui/discounts/discounts.php
r821385 r1308754 39 39 </div> 40 40 41 <?php $ListTable->pag ination('top'); ?>41 <?php $ListTable->page_navigation('top'); ?> 42 42 <div class="clear"></div> 43 43 </div> … … 107 107 </form> 108 108 <div class="tablenav"> 109 <?php $ListTable->pag ination('bottom'); ?>109 <?php $ListTable->page_navigation('bottom'); ?> 110 110 <div class="clear"></div> 111 111 </div> -
shopp/trunk/core/ui/orders/order.php
r1122729 r1308754 188 188 $Image = reset($Product->images); 189 189 190 if ( ! empty($Image) ) { 190 if ( ! empty($Image) ) { 191 191 $image_id = apply_filters('shopp_order_item_image_id', $Image->id, $Item, $Product); ?> 192 192 <img src="?siid=<?php echo $image_id ?>&<?php echo $Image->resizing(38, 0, 1) ?>" width="38" height="38" class="alignleft" /> 193 193 <?php 194 194 } 195 echo apply_filters('shopp_purchased_item_name', $itemname ); ?>195 echo apply_filters('shopp_purchased_item_name', $itemname, $Item); ?> 196 196 </a> 197 197 <div class="row-actions"> -
shopp/trunk/core/ui/orders/orders.php
r1122729 r1308754 47 47 </div> 48 48 49 <?php $ListTable->pag ination('top'); ?>49 <?php $ListTable->page_navigation('top'); ?> 50 50 51 51 <div class="clear"></div> -
shopp/trunk/core/ui/products/inventory.php
r1020997 r1308754 27 27 </div> 28 28 29 <?php $ListTable->pag ination('top'); ?>29 <?php $ListTable->page_navigation('top'); ?> 30 30 31 31 <br class="clear" /> … … 74 74 </form> 75 75 <div class="tablenav"> 76 <?php $ListTable->pag ination( 'bottom' ); ?>76 <?php $ListTable->page_navigation( 'bottom' ); ?> 77 77 <br class="clear" /> 78 78 </div> -
shopp/trunk/core/ui/products/products.php
r1023860 r1308754 41 41 <?php endif; ?> 42 42 43 <?php $ListTable->pag ination('top'); ?>43 <?php $ListTable->page_navigation('top'); ?> 44 44 45 45 <br class="clear" /> … … 236 236 </form> 237 237 <div class="tablenav bottom"> 238 <?php $ListTable->pag ination( 'bottom' ); ?>238 <?php $ListTable->page_navigation( 'bottom' ); ?> 239 239 <br class="clear" /> 240 240 </div> -
shopp/trunk/core/ui/settings/images.php
r970959 r1308754 70 70 </div> 71 71 72 <?php $ListTable->pag ination('top'); ?>72 <?php $ListTable->page_navigation('top'); ?> 73 73 74 74 <br class="clear" /> … … 149 149 </form> 150 150 <div class="tablenav bottom"> 151 <?php $ListTable->pag ination( 'bottom' ); ?>151 <?php $ListTable->page_navigation( 'bottom' ); ?> 152 152 <br class="clear" /> 153 153 </div> -
shopp/trunk/core/ui/styles/admin.css
r970959 r1308754 27 27 .shopp .inline-fields span { float: left; padding: 0 5px 0 0; display: inline-block; text-align: left; } 28 28 29 .shopp .checkbox { display: inline-block; position: relative; color: #464646; text-shadow: rgba(255,255,255,1) 0 1px 0; width: 10px; height: 10px; margin-top: 3px; border: 1px solid #a9a9a9;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; background: #fff url(data:image/gif;base64,R0lGODlhBQAGAJEAAPLy8vn5+ezs7AAAACH5BAAAAAAALAAAAAAFAAYAAAIHjA2Zwu3/CgA7) repeat-x scroll left bottom; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=1px, Color='#ececec'); -ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=1px, Color='#ececec')";-moz-box-shadow: 0 1px 1px #ececec; -webkit-box-shadow: 0 2px 3px #ececec; box-shadow: 0 1px 1px #ececec; overflow: visible; }29 .shopp .checkbox { display: inline-block; position: relative; color: #464646; text-shadow: rgba(255,255,255,1) 0 1px 0; width: 10px; height: 10px; margin-top: 3px; border: 1px solid #a9a9a9;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; background: #fff url(data:image/gif;base64,R0lGODlhBQAGAJEAAPLy8vn5+ezs7AAAACH5BAAAAAAALAAAAAAFAAYAAAIHjA2Zwu3/CgA7) repeat-x scroll left bottom; -moz-box-shadow: 0 1px 1px #ececec; -webkit-box-shadow: 0 2px 3px #ececec; box-shadow: 0 1px 1px #ececec; overflow: visible; } 30 30 .shopp .checkbox.checked:before { font-family:'shopp-icons'; font-size: 13px; content: "\E00B"; line-height: 13px; position: relative; top: -3px; } 31 31 … … 80 80 h2 a.add-new { font-style: normal; margin: 0px 6px; position: relative; top: -3px; font-family:'Lucida Grande',Verdana,Arial,'Bitstream Vera Sans',sans-serif;text-transform:none;} 81 81 .row-actions { visibility:hidden;padding:2px 0 0; } 82 tr:hover .row-actions, 46464682 tr:hover .row-actions, 83 83 div.comment-item:hover .row-actions { visibility:visible; } 84 84 … … 176 176 #chart .tickLabel { font-size: 1.3em; } 177 177 #map { width: 100%; height: 500px; margin: 2em 0; } 178 .jvectormap-label { position:absolute;display:none;border:1px solid #dfdfdf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background:#fff;color:white;color:#444;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:3px; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=1px, OffY=2px, Color='#777'); -ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=1px, OffY=2px, Color='#777')";-moz-box-shadow: 1px 2px 3px #777; -webkit-box-shadow: 1px 2px 3px #777; box-shadow: 1px 2px 3px #777; }179 .jvectormap-zoomin,.jvectormap-zoomout { position:absolute;left:10px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background:#fff;padding:3px;color:white;width:10px;height:10px;cursor:pointer;line-height:10px;text-align:center; border:1px solid #dfdfdf;color:#444; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=1px, OffY=2px, Color='#777'); -ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=1px, OffY=2px, Color='#777')";-moz-box-shadow: 1px 2px 3px #777; -webkit-box-shadow: 1px 2px 3px #777; box-shadow: 1px 2px 3px #777; }178 .jvectormap-label { position:absolute;display:none;border:1px solid #dfdfdf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background:#fff;color:white;color:#444;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:3px; -moz-box-shadow: 1px 2px 3px #777; -webkit-box-shadow: 1px 2px 3px #777; box-shadow: 1px 2px 3px #777; } 179 .jvectormap-zoomin,.jvectormap-zoomout { position:absolute;left:10px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background:#fff;padding:3px;color:white;width:10px;height:10px;cursor:pointer;line-height:10px;text-align:center; border:1px solid #dfdfdf;color:#444; -moz-box-shadow: 1px 2px 3px #777; -webkit-box-shadow: 1px 2px 3px #777; box-shadow: 1px 2px 3px #777; } 180 180 .jvectormap-zoomin { top:10px; } 181 181 .jvectormap-zoomout { top:30px; } … … 216 216 #membership .subpanel.stage > .label { background: url('../icons/bluebar.png') repeat-x; color: #fff; text-shadow: #2d4a63 0 -1px 0; -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -khtml-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; -khtml-border-top-right-radius: 3px; border-top-right-radius: 3px; border: 1px solid #365978; border-bottom: none; } 217 217 218 #membership .stage { filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=2px, Color='#999'); -ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=2px, Color='#999')";-moz-box-shadow: 0 2px 3px #999; -webkit-box-shadow: 0 2px 3px #999; box-shadow: 0 2px 3px #999; }218 #membership .stage { -moz-box-shadow: 0 2px 3px #999; -webkit-box-shadow: 0 2px 3px #999; box-shadow: 0 2px 3px #999; } 219 219 220 220 .membership.search-select-results { width: 300px; } … … 315 315 #shopp-activation-nag .dismiss { color:#ccc; margin-right:8px; } 316 316 #shopp-activation-nag .dismiss:hover { color:#aaa; } 317 #shopp-activation-nag .button { float: left; margin: 8px 20px 0 0; button}317 #shopp-activation-nag .button { float: left; margin: 8px 20px 0 0; } 318 318 #shopp-activation-nag big { display:block; } 319 319 … … 731 731 .calendar { display:none; } 732 732 .calendar-wrap { display:inline;position:relative;overflow:visible; } 733 .calendar { position:absolute;z-index:10;top:18px;left:0;width:185px;background:white;border:1px solid #dfdfdf;padding:5px;font-size:11px; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=0, Color='#fff');-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=0, Color='#fff')";-moz-box-shadow: 0 0 1px #fff;-webkit-box-shadow: 0 0 1px #fff;box-shadow: 0 0 1px #fff;}733 .calendar { position:absolute;z-index:10;top:18px;left:0;width:185px;background:white;border:1px solid #dfdfdf;padding:5px;font-size:11px;-moz-box-shadow: 0 0 1px #fff;-webkit-box-shadow: 0 0 1px #fff;box-shadow: 0 0 1px #fff;} 734 734 .calendar h3 { width:100%;margin:0;text-align:center; } 735 735 .calendar span.back { display:block;position:absolute;left:5px;top:5px;padding:0 10px;cursor:pointer; } -
shopp/trunk/core/ui/widgets/tagcloud.php
r821385 r1308754 41 41 ?> 42 42 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title'); ?></label> 43 <input type="text" name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $options['title']; ?>"></p> 43 <input type="text" name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $options['title']; ?>"> 44 </p> 45 <p> 46 <label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e( 'Exclude' ); ?></label> <input type="text" value="<?php echo $options['exclude']; ?>" name="<?php echo $this->get_field_name('exclude'); ?>" id="<?php echo $this->get_field_id('exclude'); ?>" class="widefat" /> 47 <br /> 48 <small><?php _e( 'Tags, separated by commas.', 'Shopp' ); ?></small> 49 </p> 44 50 <?php 45 51 } -
shopp/trunk/gateways/PayPal/PayPalStandard.php
r1020997 r1308754 630 630 631 631 status_header( '200' ); 632 die( 'OK');632 exit(); 633 633 } 634 634 -
shopp/trunk/readme.md
r930519 r1308754 1 <span class="float-right"> 2 [](http://ci.shopp.net/projects/2?ref=master) 3 </span> 1 [](https://travis-ci.org/ingenesis/shopp) 4 2 5 3  -
shopp/trunk/readme.txt
r1122729 r1308754 4 4 Tags: ecommerce, e-commerce, wordpress ecommerce, shopp, shop, shopping, cart, store, storefront, sales, sell, catalog, checkout, accounts, secure, variations, variants, reports, downloads, digital, downloadable, inventory, stock, shipping, taxes, shipped, addons, widgets, shortcodes 5 5 Requires at least: 3.5 6 Tested up to: 4. 1.16 Tested up to: 4.4 7 7 Stable tag: trunk 8 8 License: GPLv3 or later -
shopp/trunk/services/image.php
r930519 r1308754 148 148 149 149 $cache = 'image_' . $this->request . ($this->valid ? '_' . $this->valid : ''); 150 $cached = wp_cache_get($cache, 'shopp_image');150 $cached = Shopp::cache_get($cache, 'shopp_image'); 151 151 if ( $cached ) return ($this->Image = $cached); 152 152 … … 155 155 if ( max($this->width, $this->height) > 0 ) $this->loadsized(); 156 156 157 wp_cache_set($cache, $this->Image, 'shopp_image');157 Shopp::cache_set($cache, $this->Image, 'shopp_image'); 158 158 159 159 do_action('shopp_imageserver_load', $this->Image);
Note: See TracChangeset
for help on using the changeset viewer.