WP eCommerce - Version 3.7.6

Version Description

Download this release

Release Info

Developer jghazally
Plugin Icon 128x128 WP eCommerce
Version 3.7.6
Comparing to
See all releases

Code changes from version 3.7.6RC4 to 3.7.6

admin-form-functions.php CHANGED
@@ -585,7 +585,7 @@ function setting_button(){
585
  return $output;
586
  }
587
 
588
- function wpsc_right_now() {
589
  global $wpdb,$nzshpcrt_imagesize_info;
590
  $year = date("Y");
591
  $month = date("m");
@@ -624,10 +624,9 @@ function wpsc_right_now() {
624
 
625
  $replace_values[":theme:"] = get_option('wpsc_selected_theme');
626
  $replace_values[":versionnumber:"] = WPSC_PRESENTABLE_VERSION;
627
-
628
  if (function_exists('add_object_page')) {
629
  $output="";
630
- $output.="<div id='dashboard_right_now' class='postbox'>";
631
  $output.=" <h3 class='hndle'>";
632
  $output.=" <span>".__('Current Month', 'wpsc')."</span>";
633
  $output.=" <br class='clear'/>";
585
  return $output;
586
  }
587
 
588
+ function wpsc_right_now($hidden = '') {
589
  global $wpdb,$nzshpcrt_imagesize_info;
590
  $year = date("Y");
591
  $month = date("m");
624
 
625
  $replace_values[":theme:"] = get_option('wpsc_selected_theme');
626
  $replace_values[":versionnumber:"] = WPSC_PRESENTABLE_VERSION;
 
627
  if (function_exists('add_object_page')) {
628
  $output="";
629
+ $output.="<div id='dashboard_right_now' class='postbox ".((array_search('dashboard_right_now', $hidden) !== false) ? 'closed' : '')."'>";
630
  $output.=" <h3 class='hndle'>";
631
  $output.=" <span>".__('Current Month', 'wpsc')."</span>";
632
  $output.=" <br class='clear'/>";
currency_list.php CHANGED
@@ -84,7 +84,7 @@ INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (82, 'Czech Rep.', 'CZ', 'Czec
84
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (83, 'Cyprus', 'CY', 'Cyprus Pound', '', '', 'CYP', '0', '0','europe','1');
85
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (84, 'Cuba', 'CU', 'Cuban Peso', '', '', 'CUP', '0', '0','northamerica','1');
86
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (85, 'Croatia', 'HR', 'Croatian Kuna', '', '', 'HRK', '0', '0','europe','1');
87
- INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (86, 'Costa Rica', 'CR', 'Costa Rican Colon', '', '', 'CRC', '0', '0','southamrica','1');
88
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (87, 'Cook Islands', 'CK', 'New Zealand Dollar', '$', '&#036;', 'NZD', '0', '0' ,'asiapacific','1');
89
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (88, 'Congo', 'CG', 'CFA Franc BEAC', '', '', 'XAF', '0', '0','africa','1');
90
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (89, 'Comoros', 'KM', 'Comoros Franc', '', '', 'KMF', '0', '0','africa','1');
@@ -240,4 +240,4 @@ INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (238, 'Yemen', 'YE', 'Yemeni R
240
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (239, 'Yugoslavia', 'YU', 'Yugoslav New Dinar', '', '', 'YUN', '0', '0','europe','1');
241
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (240, 'Zambia', 'ZM', 'Zambian Kwacha', '', '', 'ZMK', '0', '0','africa','1');
242
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (241, 'Zimbabwe', 'ZW', 'Zimbabwe Dollar', '$', '&#036;', 'ZWD', '0', '0','africa','1');
243
- INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (242, 'Deutschland', 'DE', 'Euro', '€', '&#8364;', 'EUR', '0', '0','europe','1');";
84
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (83, 'Cyprus', 'CY', 'Cyprus Pound', '', '', 'CYP', '0', '0','europe','1');
85
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (84, 'Cuba', 'CU', 'Cuban Peso', '', '', 'CUP', '0', '0','northamerica','1');
86
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (85, 'Croatia', 'HR', 'Croatian Kuna', '', '', 'HRK', '0', '0','europe','1');
87
+ INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (86, 'Costa Rica', 'CR', 'Costa Rican Colon', '', '', 'CRC', '0', '0','southamerica','1');
88
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (87, 'Cook Islands', 'CK', 'New Zealand Dollar', '$', '&#036;', 'NZD', '0', '0' ,'asiapacific','1');
89
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (88, 'Congo', 'CG', 'CFA Franc BEAC', '', '', 'XAF', '0', '0','africa','1');
90
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (89, 'Comoros', 'KM', 'Comoros Franc', '', '', 'KMF', '0', '0','africa','1');
240
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (239, 'Yugoslavia', 'YU', 'Yugoslav New Dinar', '', '', 'YUN', '0', '0','europe','1');
241
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (240, 'Zambia', 'ZM', 'Zambian Kwacha', '', '', 'ZMK', '0', '0','africa','1');
242
  INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (241, 'Zimbabwe', 'ZW', 'Zimbabwe Dollar', '$', '&#036;', 'ZWD', '0', '0','africa','1');
243
+ INSERT INTO `".WPSC_TABLE_CURRENCY_LIST."` VALUES (242, 'Deutschland', 'DE', 'Euro', '€', '&#8364;', 'EUR', '0', '0','europe','1');";
install_and_update.php CHANGED
@@ -391,6 +391,7 @@ function wpsc_check_and_copy_files() {
391
  $wpsc_dirs['categories']['old'] = ABSPATH."{$upload_path}/category_images/";
392
  $wpsc_dirs['categories']['new'] = WPSC_CATEGORY_DIR;
393
  $incomplete_file_transfer = false;
 
394
  foreach($wpsc_dirs as $wpsc_dir) {
395
  if(is_dir($wpsc_dir['old'])) {
396
  $files_in_dir = glob($wpsc_dir['old']."*");
@@ -434,6 +435,7 @@ function wpsc_create_upload_directories() {
434
  WPSC_UPGRADES_DIR,
435
  WPSC_THEMES_PATH,
436
  );
 
437
  foreach ($folders as $folder) {
438
  wp_mkdir_p($folder);
439
  @ chmod( $folder, 0775 );
391
  $wpsc_dirs['categories']['old'] = ABSPATH."{$upload_path}/category_images/";
392
  $wpsc_dirs['categories']['new'] = WPSC_CATEGORY_DIR;
393
  $incomplete_file_transfer = false;
394
+ exit('called');
395
  foreach($wpsc_dirs as $wpsc_dir) {
396
  if(is_dir($wpsc_dir['old'])) {
397
  $files_in_dir = glob($wpsc_dir['old']."*");
435
  WPSC_UPGRADES_DIR,
436
  WPSC_THEMES_PATH,
437
  );
438
+ // exit('<pre>'.print_r($folders, true).'</pre>');
439
  foreach ($folders as $folder) {
440
  wp_mkdir_p($folder);
441
  @ chmod( $folder, 0775 );
merchants/paypal_multiple.php CHANGED
@@ -162,6 +162,7 @@ function gateway_paypal_multiple($seperator, $sessionid) {
162
  $data['invoice'] = $sessionid;
163
 
164
  // User details
 
165
  if($_POST['collected_data'][get_option('paypal_form_first_name')] != '') {
166
  $data['first_name'] = urlencode($_POST['collected_data'][get_option('paypal_form_first_name')]);
167
  }
162
  $data['invoice'] = $sessionid;
163
 
164
  // User details
165
+
166
  if($_POST['collected_data'][get_option('paypal_form_first_name')] != '') {
167
  $data['first_name'] = urlencode($_POST['collected_data'][get_option('paypal_form_first_name')]);
168
  }
merchants/paypal_pro.php CHANGED
@@ -21,14 +21,14 @@ if(in_array('paypal_pro',(array)get_option('custom_gateway_options'))) {
21
 
22
  $gateway_checkout_form_fields[$nzshpcrt_gateways[$num]['internalname']] = "
23
  <tr %s>
24
- <td>Credit Card Number *</td>
25
  <td>
26
  <input type='text' value='' name='card_number' />
27
  <p class='validation-error'>%s</p>
28
  </td>
29
  </tr>
30
  <tr %s>
31
- <td>Credit Card Expiry *</td>
32
  <td>
33
  <select class='wpsc_ccBox' name='expiry[month]'>
34
  ".$months."
@@ -52,13 +52,13 @@ if(in_array('paypal_pro',(array)get_option('custom_gateway_options'))) {
52
  </td>
53
  </tr>
54
  <tr %s>
55
- <td>CVV *</td>
56
  <td><input type='text' size='4' value='' maxlength='4' name='card_code' />
57
  <p class='validation-error'>%s</p>
58
  </td>
59
  </tr>
60
  <tr %s>
61
- <td>Card Type *</td>
62
  <td>
63
  <select class='wpsc_ccBox' name='cctype'>
64
  <option value='Visa'>Visa</option>
21
 
22
  $gateway_checkout_form_fields[$nzshpcrt_gateways[$num]['internalname']] = "
23
  <tr %s>
24
+ <td>Credit Card Number: *</td>
25
  <td>
26
  <input type='text' value='' name='card_number' />
27
  <p class='validation-error'>%s</p>
28
  </td>
29
  </tr>
30
  <tr %s>
31
+ <td>Credit Card Expiry: *</td>
32
  <td>
33
  <select class='wpsc_ccBox' name='expiry[month]'>
34
  ".$months."
52
  </td>
53
  </tr>
54
  <tr %s>
55
+ <td>CVV: *</td>
56
  <td><input type='text' size='4' value='' maxlength='4' name='card_code' />
57
  <p class='validation-error'>%s</p>
58
  </td>
59
  </tr>
60
  <tr %s>
61
+ <td>Card Type: *</td>
62
  <td>
63
  <select class='wpsc_ccBox' name='cctype'>
64
  <option value='Visa'>Visa</option>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.instinct.co.nz/e-commerce
4
  Tags: e-commerce, shop, cart, dropshop, ajax, web2.0, paypal, authorize, exchange, stock control, ecommerce
5
  Requires at least: 2.7
6
  Tested up to: 2.9
7
- Stable tag: 3.7.5.3
8
 
9
  WP e-Commerce is a Web 2.0 application designed with usability, aesthetics, and presentation in mind.
10
 
4
  Tags: e-commerce, shop, cart, dropshop, ajax, web2.0, paypal, authorize, exchange, stock control, ecommerce
5
  Requires at least: 2.7
6
  Tested up to: 2.9
7
+ Stable tag: 3.7.6
8
 
9
  WP e-Commerce is a Web 2.0 application designed with usability, aesthetics, and presentation in mind.
10
 
themes/default/grid_view.php CHANGED
@@ -23,7 +23,7 @@ $image_height = get_option('product_image_height');
23
  <?php if(wpsc_display_categories()): ?>
24
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
25
  <div class='wpsc_categories wpsc_category_grid'>
26
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> 1)); ?>
27
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
28
  <?php wpsc_print_category_image(45, 45); ?>
29
  </a>
@@ -33,7 +33,7 @@ $image_height = get_option('product_image_height');
33
  </div>
34
  <?php else:?>
35
  <ul class='wpsc_categories'>
36
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
37
  <li>
38
  <?php wpsc_print_category_image(32, 32); ?>
39
 
@@ -87,10 +87,10 @@ $image_height = get_option('product_image_height');
87
 
88
 
89
  <?php if(wpsc_the_product_thumbnail()) :?>
90
- <div class="item_image">
91
- <a href="<?php echo wpsc_the_product_permalink(); ?>" style='background-image: url(<?php echo wpsc_the_product_thumbnail(); ?>);'>
92
  </a>
93
- </div>
94
  <?php else: ?>
95
  <div class="item_no_image">
96
  <a href="<?php echo wpsc_the_product_permalink(); ?>">
23
  <?php if(wpsc_display_categories()): ?>
24
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
25
  <div class='wpsc_categories wpsc_category_grid'>
26
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> 1)); ?>
27
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
28
  <?php wpsc_print_category_image(45, 45); ?>
29
  </a>
33
  </div>
34
  <?php else:?>
35
  <ul class='wpsc_categories'>
36
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
37
  <li>
38
  <?php wpsc_print_category_image(32, 32); ?>
39
 
87
 
88
 
89
  <?php if(wpsc_the_product_thumbnail()) :?>
90
+ <a href="<?php echo wpsc_the_product_permalink(); ?>">
91
+ <img class="product_image" id="product_image_<?php echo wpsc_the_product_id(); ?>" alt="<?php echo wpsc_the_product_title(); ?>" title="<?php echo wpsc_the_product_title(); ?>" src="<?php echo wpsc_the_product_thumbnail(); ?>" />
92
  </a>
93
+
94
  <?php else: ?>
95
  <div class="item_no_image">
96
  <a href="<?php echo wpsc_the_product_permalink(); ?>">
themes/default/list_view.php CHANGED
@@ -21,7 +21,7 @@ global $wpsc_query, $wpdb;
21
  <?php if(wpsc_display_categories()): ?>
22
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
23
  <div class='wpsc_categories wpsc_category_grid'>
24
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> 1)); ?>
25
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
26
  <?php wpsc_print_category_image(45, 45); ?>
27
  </a>
@@ -31,7 +31,7 @@ global $wpsc_query, $wpdb;
31
  </div>
32
  <?php else:?>
33
  <ul class='wpsc_categories'>
34
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
35
  <li>
36
  <?php wpsc_print_category_image(32, 32); ?>
37
 
21
  <?php if(wpsc_display_categories()): ?>
22
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
23
  <div class='wpsc_categories wpsc_category_grid'>
24
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> 1)); ?>
25
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
26
  <?php wpsc_print_category_image(45, 45); ?>
27
  </a>
31
  </div>
32
  <?php else:?>
33
  <ul class='wpsc_categories'>
34
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
35
  <li>
36
  <?php wpsc_print_category_image(32, 32); ?>
37
 
themes/default/shopping_cart_page.php CHANGED
@@ -282,7 +282,7 @@ if(wpsc_cart_item_count() > 0) :
282
  <tr <?php echo wpsc_the_checkout_item_error_class();?>>
283
  <td>
284
  <label for='<?php echo wpsc_checkout_form_element_id(); ?>'>
285
- <?php echo wpsc_checkout_form_name();?>:
286
  </label>
287
  </td>
288
  <td>
282
  <tr <?php echo wpsc_the_checkout_item_error_class();?>>
283
  <td>
284
  <label for='<?php echo wpsc_checkout_form_element_id(); ?>'>
285
+ <?php echo wpsc_checkout_form_name();?>
286
  </label>
287
  </td>
288
  <td>
themes/iShop/grid_view.php CHANGED
@@ -23,7 +23,7 @@ $image_height = get_option('product_image_height');
23
  <?php if(wpsc_display_categories()): ?>
24
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
25
  <div class='wpsc_categories wpsc_category_grid'>
26
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> 1)); ?>
27
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
28
  <?php wpsc_print_category_image(45, 45); ?>
29
  </a>
@@ -33,7 +33,7 @@ $image_height = get_option('product_image_height');
33
  </div>
34
  <?php else:?>
35
  <ul class='wpsc_categories'>
36
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
37
  <li>
38
  <?php wpsc_print_category_image(32, 32); ?>
39
 
23
  <?php if(wpsc_display_categories()): ?>
24
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
25
  <div class='wpsc_categories wpsc_category_grid'>
26
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> 1)); ?>
27
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
28
  <?php wpsc_print_category_image(45, 45); ?>
29
  </a>
33
  </div>
34
  <?php else:?>
35
  <ul class='wpsc_categories'>
36
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
37
  <li>
38
  <?php wpsc_print_category_image(32, 32); ?>
39
 
themes/iShop/list_view.php CHANGED
@@ -21,7 +21,7 @@ global $wpsc_query, $wpdb;
21
  <?php if(wpsc_display_categories()): ?>
22
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
23
  <div class='wpsc_categories wpsc_category_grid'>
24
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> 1)); ?>
25
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
26
  <?php wpsc_print_category_image(45, 45); ?>
27
  </a>
@@ -31,7 +31,7 @@ global $wpsc_query, $wpdb;
31
  </div>
32
  <?php else:?>
33
  <ul class='wpsc_categories'>
34
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
35
  <li>
36
  <?php wpsc_print_category_image(32, 32); ?>
37
 
21
  <?php if(wpsc_display_categories()): ?>
22
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
23
  <div class='wpsc_categories wpsc_category_grid'>
24
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> 1)); ?>
25
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
26
  <?php wpsc_print_category_image(45, 45); ?>
27
  </a>
31
  </div>
32
  <?php else:?>
33
  <ul class='wpsc_categories'>
34
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
35
  <li>
36
  <?php wpsc_print_category_image(32, 32); ?>
37
 
themes/iShop/shopping_cart_page.php CHANGED
@@ -253,7 +253,7 @@ if(wpsc_cart_item_count() > 0) :
253
  <tr <?php echo wpsc_the_checkout_item_error_class();?>>
254
  <td>
255
  <label for='<?php echo wpsc_checkout_form_element_id(); ?>'>
256
- <?php echo wpsc_checkout_form_name();?>:
257
  </label>
258
  </td>
259
  <td>
253
  <tr <?php echo wpsc_the_checkout_item_error_class();?>>
254
  <td>
255
  <label for='<?php echo wpsc_checkout_form_element_id(); ?>'>
256
+ <?php echo wpsc_checkout_form_name();?>
257
  </label>
258
  </td>
259
  <td>
themes/marketplace/grid_view.php CHANGED
@@ -23,7 +23,7 @@ $image_height = get_option('product_image_height');
23
  <?php if(wpsc_display_categories()): ?>
24
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
25
  <div class='wpsc_categories wpsc_category_grid'>
26
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> 1)); ?>
27
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
28
  <?php wpsc_print_category_image(45, 45); ?>
29
  </a>
@@ -33,7 +33,7 @@ $image_height = get_option('product_image_height');
33
  </div>
34
  <?php else:?>
35
  <ul class='wpsc_categories'>
36
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
37
  <li>
38
  <?php wpsc_print_category_image(32, 32); ?>
39
 
23
  <?php if(wpsc_display_categories()): ?>
24
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
25
  <div class='wpsc_categories wpsc_category_grid'>
26
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> 1)); ?>
27
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
28
  <?php wpsc_print_category_image(45, 45); ?>
29
  </a>
33
  </div>
34
  <?php else:?>
35
  <ul class='wpsc_categories'>
36
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
37
  <li>
38
  <?php wpsc_print_category_image(32, 32); ?>
39
 
themes/marketplace/list_view.php CHANGED
@@ -21,7 +21,7 @@ global $wpsc_query, $wpdb;
21
  <?php if(wpsc_display_categories()): ?>
22
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
23
  <div class='wpsc_categories wpsc_category_grid'>
24
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> 1)); ?>
25
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
26
  <?php wpsc_print_category_image(45, 45); ?>
27
  </a>
@@ -31,7 +31,7 @@ global $wpsc_query, $wpdb;
31
  </div>
32
  <?php else:?>
33
  <ul class='wpsc_categories'>
34
- <?php wpsc_start_category_query(array('category_group'=> 1, 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
35
  <li>
36
  <?php wpsc_print_category_image(32, 32); ?>
37
 
21
  <?php if(wpsc_display_categories()): ?>
22
  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
23
  <div class='wpsc_categories wpsc_category_grid'>
24
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> 1)); ?>
25
  <a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
26
  <?php wpsc_print_category_image(45, 45); ?>
27
  </a>
31
  </div>
32
  <?php else:?>
33
  <ul class='wpsc_categories'>
34
+ <?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> get_option('show_category_thumbnails'))); ?>
35
  <li>
36
  <?php wpsc_print_category_image(32, 32); ?>
37
 
themes/marketplace/shopping_cart_page.php CHANGED
@@ -251,7 +251,7 @@ if(wpsc_cart_item_count() > 0) :
251
  <tr <?php echo wpsc_the_checkout_item_error_class();?>>
252
  <td>
253
  <label for='<?php echo wpsc_checkout_form_element_id(); ?>'>
254
- <?php echo wpsc_checkout_form_name();?>:
255
  </label>
256
  </td>
257
  <td>
251
  <tr <?php echo wpsc_the_checkout_item_error_class();?>>
252
  <td>
253
  <label for='<?php echo wpsc_checkout_form_element_id(); ?>'>
254
+ <?php echo wpsc_checkout_form_name();?>
255
  </label>
256
  </td>
257
  <td>
transaction_results.php CHANGED
@@ -40,10 +40,12 @@ if($_REQUEST['eway']=='1') {
40
  if($_SESSION['wpsc_previous_selected_gateway'] == 'paypal_certified'){
41
  echo $_SESSION['paypalExpressMessage'];
42
 
 
43
  } elseif($sessionid == ''){
44
  _e('Sorry your transaction was not accepted.<br /><a href='.get_option("shopping_cart_url").'>Click here to go back to checkout page.</a>');
45
 
46
  }else{
 
47
  if($_SESSION['wpsc_previous_selected_gateway']== 'dps') {
48
  $sessionid = decrypt_dps_response();
49
  //exit($sessionid);
@@ -58,4 +60,8 @@ if($_SESSION['wpsc_previous_selected_gateway'] == 'paypal_certified'){
58
  echo transaction_results($sessionid, true);
59
  }
60
  }
 
 
 
 
61
  ?>
40
  if($_SESSION['wpsc_previous_selected_gateway'] == 'paypal_certified'){
41
  echo $_SESSION['paypalExpressMessage'];
42
 
43
+
44
  } elseif($sessionid == ''){
45
  _e('Sorry your transaction was not accepted.<br /><a href='.get_option("shopping_cart_url").'>Click here to go back to checkout page.</a>');
46
 
47
  }else{
48
+
49
  if($_SESSION['wpsc_previous_selected_gateway']== 'dps') {
50
  $sessionid = decrypt_dps_response();
51
  //exit($sessionid);
60
  echo transaction_results($sessionid, true);
61
  }
62
  }
63
+ if($sessionid != ''){
64
+ //exit('<pre>'.print_r($sessionid, true).'</pre>');
65
+ transaction_results($sessionid, true);
66
+ }
67
  ?>
wp-shopping-cart.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name:WP Shopping Cart
4
  Plugin URI: http://www.getshopped.org
5
  Description: A plugin that provides a WordPress Shopping Cart. Visit the <a href='http://getshopped.org/forums'>getshopped forums</a> for support.
6
- Version: 3.7.6 RC 4
7
  Author: Instinct
8
  Author URI: http://www.getshopped.org
9
  */
@@ -14,9 +14,9 @@ Author URI: http://www.getshopped.org
14
  // this is to make sure it sets up the table name constants correctly on activation
15
  global $wpdb;
16
  define('WPSC_VERSION', '3.7');
17
- define('WPSC_MINOR_VERSION', '50');
18
 
19
- define('WPSC_PRESENTABLE_VERSION', '3.7.6 RC 4');
20
 
21
  define('WPSC_DEBUG', false);
22
  define('WPSC_GATEWAY_DEBUG', false);
3
  Plugin Name:WP Shopping Cart
4
  Plugin URI: http://www.getshopped.org
5
  Description: A plugin that provides a WordPress Shopping Cart. Visit the <a href='http://getshopped.org/forums'>getshopped forums</a> for support.
6
+ Version: 3.7.6
7
  Author: Instinct
8
  Author URI: http://www.getshopped.org
9
  */
14
  // this is to make sure it sets up the table name constants correctly on activation
15
  global $wpdb;
16
  define('WPSC_VERSION', '3.7');
17
+ define('WPSC_MINOR_VERSION', '51');
18
 
19
+ define('WPSC_PRESENTABLE_VERSION', '3.7.6');
20
 
21
  define('WPSC_DEBUG', false);
22
  define('WPSC_GATEWAY_DEBUG', false);
wpsc-admin/admin.php CHANGED
@@ -755,6 +755,12 @@ function wpsc_admin_4months_widget_rightnow() {
755
  echo "</div>";
756
  }
757
  }
 
 
 
 
 
 
758
 
759
  if( IS_WP27 ) {
760
  add_action('wp_dashboard_setup','wpsc_dashboard_4months_widget_setup');
755
  echo "</div>";
756
  }
757
  }
758
+ function wpsc_getshopped_news_meta_box(){
759
+ $rss = fetch_feed('http://getshopped.org/category/community-plugins/feed/');
760
+ $args = array('show_author' => 1, 'show_date' => 1, 'show_summary' => 1, 'items'=>3 );
761
+ wp_widget_rss_output($rss, $args);
762
+ }
763
+
764
 
765
  if( IS_WP27 ) {
766
  add_action('wp_dashboard_setup','wpsc_dashboard_4months_widget_setup');
wpsc-admin/ajax-and-init.php CHANGED
@@ -1340,14 +1340,15 @@ SELECT DISTINCT `products`.*, `category`.`category_id`,`order`.`order`, IF(ISNUL
1340
  */
1341
  function wpsc_save_product_order() {
1342
  global $wpdb;
1343
- if(is_numeric($_POST['category_id'])) {
1344
  $category_id = absint($_POST['category_id']);
1345
  $products = $_POST['product'];
1346
  $order=1;
 
1347
  foreach($products as $product_id) {
1348
  $product_id = absint($product_id);
1349
  $wpdb->query("REPLACE INTO `".WPSC_TABLE_PRODUCT_ORDER."`(`category_id`, `product_id`, `order`) VALUES ('{$category_id}', '{$product_id}', '{$order}' )");
1350
- //echo "/* REPLACE INTO `".WPSC_TABLE_PRODUCT_ORDER."`(`category_id`, `product_id`, `order`) VALUES ('{$category_id}', '{$product_id}', '$order' ) */\n\r";
1351
  $order++;
1352
  }
1353
  $success = true;
1340
  */
1341
  function wpsc_save_product_order() {
1342
  global $wpdb;
1343
+ if(is_numeric($_POST['category_id']) ) {
1344
  $category_id = absint($_POST['category_id']);
1345
  $products = $_POST['product'];
1346
  $order=1;
1347
+ echo '/*<pre>'.print_r($products,true).'</pre>*/';
1348
  foreach($products as $product_id) {
1349
  $product_id = absint($product_id);
1350
  $wpdb->query("REPLACE INTO `".WPSC_TABLE_PRODUCT_ORDER."`(`category_id`, `product_id`, `order`) VALUES ('{$category_id}', '{$product_id}', '{$order}' )");
1351
+ echo "/* REPLACE INTO `".WPSC_TABLE_PRODUCT_ORDER."`(`category_id`, `product_id`, `order`) VALUES ('{$category_id}', '{$product_id}', '$order' ) */\n\r";
1352
  $order++;
1353
  }
1354
  $success = true;
wpsc-admin/display-items.page.php CHANGED
@@ -196,6 +196,7 @@ function wpsc_admin_products_list($category_id = 0) {
196
  $is_sortable = true;
197
  } else {
198
  $itempp = 10;
 
199
  if ($_GET['pageno']!='all') {
200
  if($_GET['pageno'] > 0) {
201
  $page = absint($_GET['pageno']);
@@ -204,11 +205,19 @@ function wpsc_admin_products_list($category_id = 0) {
204
  }
205
  $start = (int)($page * $itempp) - $itempp;
206
  $sql = "SELECT DISTINCT * FROM `".WPSC_TABLE_PRODUCT_LIST."` AS `products` WHERE `products`.`active`='1' $search_sql ORDER BY `products`.`date_added` DESC LIMIT $start,$itempp";
 
 
 
 
207
  } else {
208
- $sql = "SELECT DISTINCT * FROM `".WPSC_TABLE_PRODUCT_LIST."` AS `products` WHERE `products`.`active`='1' $search_sql ORDER BY `products`.`date_added`";
 
209
  }
 
210
  }
 
211
  $product_list = $wpdb->get_results($sql,ARRAY_A);
 
212
  $num_products = $wpdb->get_var("SELECT COUNT(DISTINCT `products`.`id`) FROM `".WPSC_TABLE_PRODUCT_LIST."` AS `products` WHERE `products`.`active`='1' $search_sql");
213
 
214
  if (isset($itempp)) {
@@ -235,12 +244,13 @@ function wpsc_admin_products_list($category_id = 0) {
235
 
236
 
237
 
238
-
239
  <div class="tablenav-pages">
240
  <?php
241
  echo $page_links;
242
  ?>
243
  </div>
 
244
 
245
  <div class="alignleft actions">
246
  <form action="admin.php" method="get">
@@ -310,12 +320,17 @@ function wpsc_admin_products_list($category_id = 0) {
310
  $product_name = htmlentities(stripslashes($product['name']), ENT_QUOTES, 'UTF-8');
311
  }
312
 
313
-
314
  $category_html = '';
 
315
  $category_list = $wpdb->get_results("SELECT `".WPSC_TABLE_PRODUCT_CATEGORIES."`.`id`,`".WPSC_TABLE_PRODUCT_CATEGORIES."`.`name` FROM `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."` , `".WPSC_TABLE_PRODUCT_CATEGORIES."` WHERE `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."`.`product_id` IN ('".$product['id']."') AND `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."`.`category_id` = `".WPSC_TABLE_PRODUCT_CATEGORIES."`.`id` AND `".WPSC_TABLE_PRODUCT_CATEGORIES."`.`active` IN('1')",ARRAY_A);
 
 
 
316
  $i = 0;
317
  foreach((array)$category_list as $category_row) {
318
  if($i > 0) {
 
319
  $category_html .= "<br />";
320
  }
321
 
@@ -324,7 +339,11 @@ function wpsc_admin_products_list($category_id = 0) {
324
  $i++;
325
  }
326
 
327
-
 
 
 
 
328
  ?>
329
  <tr class="product-edit <?php echo ( wpsc_publish_status($product['id']) ) ? ' wpsc_published' : ' wpsc_not_published'; ?>" id="product-<?php echo $product['id']?>" >
330
  <th class="check-column" scope="row">
196
  $is_sortable = true;
197
  } else {
198
  $itempp = 10;
199
+
200
  if ($_GET['pageno']!='all') {
201
  if($_GET['pageno'] > 0) {
202
  $page = absint($_GET['pageno']);
205
  }
206
  $start = (int)($page * $itempp) - $itempp;
207
  $sql = "SELECT DISTINCT * FROM `".WPSC_TABLE_PRODUCT_LIST."` AS `products` WHERE `products`.`active`='1' $search_sql ORDER BY `products`.`date_added` DESC LIMIT $start,$itempp";
208
+ if(get_option('wpsc_sort_by') == 'dragndrop'){
209
+ $sql = "SELECT DISTINCT * FROM `".WPSC_TABLE_PRODUCT_LIST."` AS `products` LEFT JOIN `".WPSC_TABLE_PRODUCT_ORDER."` AS `order` ON `products`.`id`= `order`.`product_id` WHERE `products`.`active`='1' AND `order`.`category_id`='0' $search_sql ORDER BY `order`.`order`";
210
+ }
211
+
212
  } else {
213
+ $sql = "SELECT DISTINCT * FROM `".WPSC_TABLE_PRODUCT_LIST."` AS `products` WHERE `products`.`active`='1' $search_sql ORDER BY `products`.`date_added`";
214
+
215
  }
216
+
217
  }
218
+ // exit($sql);
219
  $product_list = $wpdb->get_results($sql,ARRAY_A);
220
+ //exit('<pre>'.print_r($product_list, true).'</pre>');
221
  $num_products = $wpdb->get_var("SELECT COUNT(DISTINCT `products`.`id`) FROM `".WPSC_TABLE_PRODUCT_LIST."` AS `products` WHERE `products`.`active`='1' $search_sql");
222
 
223
  if (isset($itempp)) {
244
 
245
 
246
 
247
+ <?php if(get_option('wpsc_sort_by') != 'dragndrop'){ ?>
248
  <div class="tablenav-pages">
249
  <?php
250
  echo $page_links;
251
  ?>
252
  </div>
253
+ <?php } ?>
254
 
255
  <div class="alignleft actions">
256
  <form action="admin.php" method="get">
320
  $product_name = htmlentities(stripslashes($product['name']), ENT_QUOTES, 'UTF-8');
321
  }
322
 
323
+
324
  $category_html = '';
325
+ if(get_option('wpsc_sort_by') != 'dragndrop'){
326
  $category_list = $wpdb->get_results("SELECT `".WPSC_TABLE_PRODUCT_CATEGORIES."`.`id`,`".WPSC_TABLE_PRODUCT_CATEGORIES."`.`name` FROM `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."` , `".WPSC_TABLE_PRODUCT_CATEGORIES."` WHERE `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."`.`product_id` IN ('".$product['id']."') AND `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."`.`category_id` = `".WPSC_TABLE_PRODUCT_CATEGORIES."`.`id` AND `".WPSC_TABLE_PRODUCT_CATEGORIES."`.`active` IN('1')",ARRAY_A);
327
+ }else{
328
+ $category_list = $wpdb->get_results("SELECT `".WPSC_TABLE_PRODUCT_CATEGORIES."`.`id`,`".WPSC_TABLE_PRODUCT_CATEGORIES."`.`name` FROM `".WPSC_TABLE_PRODUCT_CATEGORIES."` LEFT JOIN `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."` ON `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."`.`category_id`= `".WPSC_TABLE_PRODUCT_CATEGORIES."`.`id` WHERE `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."`.`product_id` IN ('".$product['product_id']."') AND `".WPSC_TABLE_PRODUCT_CATEGORIES."`.`active` IN('1')",ARRAY_A);
329
+ }
330
  $i = 0;
331
  foreach((array)$category_list as $category_row) {
332
  if($i > 0) {
333
+
334
  $category_html .= "<br />";
335
  }
336
 
339
  $i++;
340
  }
341
 
342
+ if(get_option('wpsc_sort_by') == 'dragndrop'){
343
+ $product['id'] = $product['product_id'];
344
+ }
345
+
346
+
347
  ?>
348
  <tr class="product-edit <?php echo ( wpsc_publish_status($product['id']) ) ? ' wpsc_published' : ' wpsc_not_published'; ?>" id="product-<?php echo $product['id']?>" >
349
  <th class="check-column" scope="row">
wpsc-admin/display-sales-logs.php CHANGED
@@ -50,7 +50,14 @@ if(!isset($purchlogs)){
50
  ///// start of update message section //////
51
 
52
  //$fixpage = get_option('siteurl').'/wp-admin/admin.php?page='.WPSC_FOLDER.'/wpsc-admin/purchlogs_upgrade.php';
53
-
 
 
 
 
 
 
 
54
  $fixpage = get_option('siteurl').'/wp-admin/admin.php?page=wpsc-sales-logs&amp;subpage=upgrade-purchase-logs';
55
  if (isset($_GET['skipped']) || isset($_GET['updated']) || isset($_GET['deleted']) || isset($_GET['locked']) ) { ?>
56
  <div id="message" class="updated fade"><p>
@@ -81,11 +88,16 @@ if(!isset($purchlogs)){
81
  <div class='error' style='padding:8px;line-spacing:8px;'><span ><?php _e('When upgrading the Wp-E-Commerce Plugin from 3.6.* to 3.7 it is required that you associate your checkout form fields with the new Purchase Logs system. To do so please '); ?> <a href='<?php echo $fixpage; ?>'>Click Here</a></span></div>
82
  <?php }
83
  ///// end of update message section //////?>
 
 
 
84
  <div id='dashboard-widgets' style='min-width: 825px;'>
85
  <!--
86
  <div class='inner-sidebar'>
87
  <div class='meta-box-sortables'>
88
  <?php
 
 
89
  //if(IS_WP27){
90
  // display_ecomm_rss_feed();
91
  //}
@@ -96,12 +108,30 @@ if(!isset($purchlogs)){
96
  <?php /* end of sidebar start of main column */ ?>
97
  <div id='post-body' class='has-sidebar metabox-holder' style='width:95%;'>
98
  <div id='dashboard-widgets-main-content-wpsc' class='has-sidebar-content'>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
- <?php
101
  if(function_exists('wpsc_right_now')) {
102
- echo wpsc_right_now();
103
  }
104
-
105
  ?>
106
  </div><br />
107
  <div id='wpsc_purchlog_searchbox'>
50
  ///// start of update message section //////
51
 
52
  //$fixpage = get_option('siteurl').'/wp-admin/admin.php?page='.WPSC_FOLDER.'/wpsc-admin/purchlogs_upgrade.php';
53
+ $current_user = wp_get_current_user();
54
+
55
+ // we put the closed postboxes array into the product data to propagate it to each form without having it global.
56
+ $dashboard_data['closed_postboxes'] = (array)get_usermeta( $current_user->ID, 'closedpostboxes_store_page_wpscsalelogs');
57
+ // exit('<pre>'.print_r($dashboard_data,true).'</pre>');
58
+ // $dashboard_data['hidden_postboxes'] = (array)get_usermeta( $current_user->ID, 'metaboxhidden_store_page_wpsc-edit-products');
59
+
60
+
61
  $fixpage = get_option('siteurl').'/wp-admin/admin.php?page=wpsc-sales-logs&amp;subpage=upgrade-purchase-logs';
62
  if (isset($_GET['skipped']) || isset($_GET['updated']) || isset($_GET['deleted']) || isset($_GET['locked']) ) { ?>
63
  <div id="message" class="updated fade"><p>
88
  <div class='error' style='padding:8px;line-spacing:8px;'><span ><?php _e('When upgrading the Wp-E-Commerce Plugin from 3.6.* to 3.7 it is required that you associate your checkout form fields with the new Purchase Logs system. To do so please '); ?> <a href='<?php echo $fixpage; ?>'>Click Here</a></span></div>
89
  <?php }
90
  ///// end of update message section //////?>
91
+
92
+
93
+
94
  <div id='dashboard-widgets' style='min-width: 825px;'>
95
  <!--
96
  <div class='inner-sidebar'>
97
  <div class='meta-box-sortables'>
98
  <?php
99
+
100
+
101
  //if(IS_WP27){
102
  // display_ecomm_rss_feed();
103
  //}
108
  <?php /* end of sidebar start of main column */ ?>
109
  <div id='post-body' class='has-sidebar metabox-holder' style='width:95%;'>
110
  <div id='dashboard-widgets-main-content-wpsc' class='has-sidebar-content'>
111
+ <div class='postbox <?php echo ((array_search('wpsc_getshopped_news', $dashboard_data['closed_postboxes']) !== false) ? 'closed' : ''); ?>' id="wpsc_getshopped_news">
112
+ <h3 class='hndle'>
113
+ <span><?php _e('GetShopped News', 'wpsc'); ?></span>
114
+ <br class='clear'/>
115
+ </h3>
116
+
117
+ <div class='inside'>
118
+ <?php
119
+ // exit('Data:<pre>'.print_r($dashboard_data,true).'</pre>');
120
+ $rss = fetch_feed('http://getshopped.org/category/wp-e-commerce-plugin/');
121
+ $args = array('show_author' => 1, 'show_date' => 1, 'show_summary' => 1, 'items'=>3 );
122
+ wp_widget_rss_output($rss, $args);
123
+ ?>
124
+ </div>
125
+ </div>
126
+ <?php
127
+ // add_meta_box("wpsc_getshopped_news", __('GetShopped News', 'wpsc'), "wpsc_getshopped_news_meta_box", "wpsc");
128
+ // do_meta_boxes('wpsc','advanced',null);
129
 
130
+
131
  if(function_exists('wpsc_right_now')) {
132
+ echo wpsc_right_now($dashboard_data['closed_postboxes'] );
133
  }
134
+ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
135
  ?>
136
  </div><br />
137
  <div id='wpsc_purchlog_searchbox'>
wpsc-admin/includes/settings-pages/presentation.php CHANGED
@@ -438,6 +438,10 @@ global $wpdb;
438
  $wpsc_sort_by2 = "selected ='selected'";
439
  break;
440
 
 
 
 
 
441
  case 'id':
442
  default:
443
  $wpsc_sort_by3 = "selected ='selected'";
@@ -452,9 +456,10 @@ global $wpdb;
452
  <select name='wpsc_options[wpsc_sort_by]'>
453
  <option <?php echo $wpsc_sort_by1; ?> value='name'><?php echo __('Name', 'wpsc');?></option>
454
  <option <?php echo $wpsc_sort_by2; ?> value='price'><?php echo __('Price', 'wpsc');?></option>
 
455
  <option <?php echo $wpsc_sort_by3; ?> value='id'><?php echo __('Time Uploaded', 'wpsc');?></option>
456
  </select><br />
457
- <?php _e('If you have used the drag-drop interface on the edit-products page to order your products then you must use the Time Uploaded option.','wpsc'); ?>
458
  </td>
459
  </tr>
460
  <tr>
438
  $wpsc_sort_by2 = "selected ='selected'";
439
  break;
440
 
441
+ case 'dragndrop':
442
+ $wpsc_sort_by4 = "selected='selected'";
443
+ break;
444
+
445
  case 'id':
446
  default:
447
  $wpsc_sort_by3 = "selected ='selected'";
456
  <select name='wpsc_options[wpsc_sort_by]'>
457
  <option <?php echo $wpsc_sort_by1; ?> value='name'><?php echo __('Name', 'wpsc');?></option>
458
  <option <?php echo $wpsc_sort_by2; ?> value='price'><?php echo __('Price', 'wpsc');?></option>
459
+ <option <?php echo $wpsc_sort_by4; ?> value='dragndrop'><?php echo __('Drag &amp; Drop', 'wpsc');?></option>
460
  <option <?php echo $wpsc_sort_by3; ?> value='id'><?php echo __('Time Uploaded', 'wpsc');?></option>
461
  </select><br />
462
+ <?php _e('If you have used the drag-drop interface on the edit-products page to order your products then you must use the Drag &amp; Drop option.','wpsc'); ?>
463
  </td>
464
  </tr>
465
  <tr>
wpsc-admin/js/admin.js CHANGED
@@ -195,6 +195,7 @@ jQuery(document).ready( function () {
195
  axis: 'y',
196
  containment: 'table#wpsc_checkout_list',
197
  placeholder: 'checkout-placeholder',
 
198
 
199
  });
200
  jQuery(this).bind('sortupdate', function(event, ui) {
@@ -433,10 +434,19 @@ jQuery(document).ready( function () {
433
  wpsc_save_postboxes_state('store_page_wpsc-edit-products', '#poststuff');
434
  });
435
  });
 
 
 
 
 
 
 
 
 
 
 
436
 
437
 
438
-
439
-
440
  jQuery('a.add_new_form_set').livequery(function(){
441
  jQuery(this).click( function() {
442
  jQuery(".add_new_form_set_forms").toggle();
@@ -465,8 +475,7 @@ jQuery(document).ready( function () {
465
  postboxes.save_state('store_page_wpsc-edit-products');
466
  });
467
  });
468
-
469
-
470
  // postbox sorting
471
  jQuery('.meta-box-sortables').livequery(function(){
472
  jQuery(this).sortable({
@@ -848,9 +857,9 @@ function hideOptionElement(id, option) {
848
 
849
 
850
  function wpsc_save_postboxes_state(page, container) {
851
- //console.log(container);
852
  var closed = jQuery(container+' .postbox').filter('.closed').map(function() { return this.id; }).get().join(',');
853
- jQuery.post(postboxL10n.requestFile, {
854
  action: 'closed-postboxes',
855
  closed: closed,
856
  closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(),
195
  axis: 'y',
196
  containment: 'table#wpsc_checkout_list',
197
  placeholder: 'checkout-placeholder',
198
+ handle: '.drag',
199
 
200
  });
201
  jQuery(this).bind('sortupdate', function(event, ui) {
434
  wpsc_save_postboxes_state('store_page_wpsc-edit-products', '#poststuff');
435
  });
436
  });
437
+ jQuery('#dashboard-widgets .postbox h3').livequery(function(){
438
+ jQuery(this).click( function() {
439
+ jQuery(jQuery(this).parent('div.postbox')).toggleClass('closed');
440
+ if(jQuery(jQuery(this).parent('div.postbox')).hasClass('closed')) {
441
+ jQuery('a.togbox',this).html('+');
442
+ } else {
443
+ jQuery('a.togbox',this).html('&ndash;');
444
+ }
445
+ wpsc_save_postboxes_state('store_page_wpsc-sale-logs', '#dashboard-widgets-main-content-wpsc');
446
+ });
447
+ });
448
 
449
 
 
 
450
  jQuery('a.add_new_form_set').livequery(function(){
451
  jQuery(this).click( function() {
452
  jQuery(".add_new_form_set_forms").toggle();
475
  postboxes.save_state('store_page_wpsc-edit-products');
476
  });
477
  });
478
+
 
479
  // postbox sorting
480
  jQuery('.meta-box-sortables').livequery(function(){
481
  jQuery(this).sortable({
857
 
858
 
859
  function wpsc_save_postboxes_state(page, container) {
860
+ // console.log(container);
861
  var closed = jQuery(container+' .postbox').filter('.closed').map(function() { return this.id; }).get().join(',');
862
+ jQuery.post(ajaxurl, {
863
  action: 'closed-postboxes',
864
  closed: closed,
865
  closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(),
wpsc-includes/ajax.functions.php CHANGED
@@ -213,6 +213,7 @@ function wpsc_empty_cart() {
213
  });
214
  ";
215
  }
 
216
  exit();
217
  }
218
 
@@ -521,14 +522,16 @@ function wpsc_update_location() {
521
  }
522
 
523
  //exit();
524
- if($_GET['ajax'] == 'true') {
525
  exit();
526
  }
527
  }
528
 
529
  // execute on POST and GET
 
530
  if($_REQUEST['wpsc_ajax_actions'] == 'update_location') {
531
- add_action('init', 'wpsc_update_location');
 
532
  }
533
 
534
 
213
  });
214
  ";
215
  }
216
+
217
  exit();
218
  }
219
 
522
  }
523
 
524
  //exit();
525
+ if($_REQUEST['ajax'] == 'true') {
526
  exit();
527
  }
528
  }
529
 
530
  // execute on POST and GET
531
+
532
  if($_REQUEST['wpsc_ajax_actions'] == 'update_location') {
533
+ add_action('init', 'wpsc_update_location',110);
534
+
535
  }
536
 
537
 
wpsc-includes/checkout.class.php CHANGED
@@ -367,9 +367,9 @@ class wpsc_checkout {
367
 
368
  function form_name() {
369
  if($this->form_name_is_required() && ($this->checkout_item->type != 'heading')){
370
- return stripslashes($this->checkout_item->name).' * ';
371
  }else{
372
- return stripslashes($this->checkout_item->name);
373
  }
374
  }
375
 
367
 
368
  function form_name() {
369
  if($this->form_name_is_required() && ($this->checkout_item->type != 'heading')){
370
+ return stripslashes($this->checkout_item->name).': * ';
371
  }else{
372
+ return stripslashes($this->checkout_item->name).': ';
373
  }
374
  }
375
 
wpsc-includes/install_and_update.functions.php CHANGED
@@ -436,7 +436,7 @@ function wpsc_create_upload_directories() {
436
  );
437
  foreach ($folders as $folder) {
438
  wp_mkdir_p($folder);
439
- @ chmod( $folder, 0775 );
440
  }
441
  //wpsc_copy_themes_to_uploads();
442
  }
436
  );
437
  foreach ($folders as $folder) {
438
  wp_mkdir_p($folder);
439
+ @ chmod( $folder, 0775 );
440
  }
441
  //wpsc_copy_themes_to_uploads();
442
  }
wpsc-includes/wpsc_query.php CHANGED
@@ -1592,7 +1592,9 @@ class WPSC_Query {
1592
  $order_by = "`".WPSC_TABLE_PRODUCT_LIST."`.`name` $order";
1593
  } else if (get_option('wpsc_sort_by') == 'price') {
1594
  $order_by = "`".WPSC_TABLE_PRODUCT_LIST."`.`price` $order";
1595
- } else {
 
 
1596
  if( $order == 'ASC'){
1597
  $order = 'DESC';
1598
  }else{
@@ -1600,6 +1602,7 @@ class WPSC_Query {
1600
  }
1601
  $order_by = "`".WPSC_TABLE_PRODUCT_LIST."`.`id` $order";
1602
  }
 
1603
  $rowcount = $wpdb->get_var("SELECT COUNT( DISTINCT `".WPSC_TABLE_PRODUCT_LIST."`.`id`) AS `count` FROM `".WPSC_TABLE_PRODUCT_LIST."`,`".WPSC_TABLE_ITEM_CATEGORY_ASSOC."` WHERE `".WPSC_TABLE_PRODUCT_LIST."`.`publish`='1' AND `".WPSC_TABLE_PRODUCT_LIST."`.`active`='1' AND `".WPSC_TABLE_PRODUCT_LIST."`.`id` = `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."`.`product_id` $no_donations_sql $group_sql");
1604
 
1605
  if(!is_numeric($products_per_page) || ($products_per_page < 1)) { $products_per_page = $rowcount; }
@@ -1607,16 +1610,22 @@ class WPSC_Query {
1607
  $startnum = 0;
1608
  }
1609
 
1610
- $sql = "SELECT DISTINCT `".WPSC_TABLE_PRODUCT_LIST."`.* FROM `".WPSC_TABLE_PRODUCT_LIST."`,`".WPSC_TABLE_ITEM_CATEGORY_ASSOC."` WHERE `".WPSC_TABLE_PRODUCT_LIST."`.`publish`='1' AND `".WPSC_TABLE_PRODUCT_LIST."`.`active`='1' AND `".WPSC_TABLE_PRODUCT_LIST."`.`id` = `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."`.`product_id` $no_donations_sql $group_sql ORDER BY `".WPSC_TABLE_PRODUCT_LIST."`.`special`, $order_by LIMIT $startnum, $products_per_page";
 
 
 
 
 
 
1611
  }
1612
  }
1613
 
1614
-
1615
 
1616
  //echo "{$sql}";
1617
  $this->category = $this->query_vars['category_id'];
1618
  $this->products = $wpdb->get_results($sql,ARRAY_A);
1619
-
1620
  $this->total_product_count = $rowcount;
1621
 
1622
  if($rowcount > $products_per_page) {
1592
  $order_by = "`".WPSC_TABLE_PRODUCT_LIST."`.`name` $order";
1593
  } else if (get_option('wpsc_sort_by') == 'price') {
1594
  $order_by = "`".WPSC_TABLE_PRODUCT_LIST."`.`price` $order";
1595
+ } elseif(get_option('wpsc_sort_by') == 'dragndrop'){
1596
+ $order_by = "`".WPSC_TABLE_PRODUCT_ORDER."`.`order` ASC";
1597
+ }else {
1598
  if( $order == 'ASC'){
1599
  $order = 'DESC';
1600
  }else{
1602
  }
1603
  $order_by = "`".WPSC_TABLE_PRODUCT_LIST."`.`id` $order";
1604
  }
1605
+
1606
  $rowcount = $wpdb->get_var("SELECT COUNT( DISTINCT `".WPSC_TABLE_PRODUCT_LIST."`.`id`) AS `count` FROM `".WPSC_TABLE_PRODUCT_LIST."`,`".WPSC_TABLE_ITEM_CATEGORY_ASSOC."` WHERE `".WPSC_TABLE_PRODUCT_LIST."`.`publish`='1' AND `".WPSC_TABLE_PRODUCT_LIST."`.`active`='1' AND `".WPSC_TABLE_PRODUCT_LIST."`.`id` = `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."`.`product_id` $no_donations_sql $group_sql");
1607
 
1608
  if(!is_numeric($products_per_page) || ($products_per_page < 1)) { $products_per_page = $rowcount; }
1610
  $startnum = 0;
1611
  }
1612
 
1613
+ $sql = "SELECT DISTINCT `".WPSC_TABLE_PRODUCT_LIST."`.*, `".WPSC_TABLE_PRODUCT_ORDER."`.`order` FROM `".WPSC_TABLE_PRODUCT_LIST."`
1614
+ LEFT JOIN `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."` ON `".WPSC_TABLE_PRODUCT_LIST."`.`id` = `".WPSC_TABLE_ITEM_CATEGORY_ASSOC."`.`product_id`
1615
+ LEFT JOIN `".WPSC_TABLE_PRODUCT_ORDER."` ON `".WPSC_TABLE_PRODUCT_LIST."`.`id` = `".WPSC_TABLE_PRODUCT_ORDER."`.`product_id`
1616
+ WHERE `".WPSC_TABLE_PRODUCT_LIST."`.`publish`='1' AND `".WPSC_TABLE_PRODUCT_LIST."`.`active`='1' $no_donations_sql $group_sql ORDER BY `".WPSC_TABLE_PRODUCT_LIST."`.`special`, $order_by LIMIT $startnum, $products_per_page";
1617
+ if(get_option('wpsc_sort_by') == 'dragndrop'){
1618
+ $sql = "SELECT `products`.* FROM `".WPSC_TABLE_PRODUCT_LIST."` AS `products` LEFT JOIN `".WPSC_TABLE_PRODUCT_ORDER."` AS `order` ON `products`.`id`= `order`.`product_id` WHERE `products`.`active`='1' AND `order`.`category_id`='0' $search_sql ORDER BY `order`.`order`";
1619
+ }
1620
  }
1621
  }
1622
 
1623
+ //exit($sql);
1624
 
1625
  //echo "{$sql}";
1626
  $this->category = $this->query_vars['category_id'];
1627
  $this->products = $wpdb->get_results($sql,ARRAY_A);
1628
+ // exit('<pre>'.print_r($this->products,true).'</pre>');
1629
  $this->total_product_count = $rowcount;
1630
 
1631
  if($rowcount > $products_per_page) {