WP eCommerce - Version 3.7.6.1

Version Description

Download this release

Release Info

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

Code changes from version 3.7.6 to 3.7.6.1

edit-profile.php CHANGED
@@ -78,7 +78,7 @@ if($_POST['collected_data'] != null) {
78
  <?php
79
  echo " <div class='user-profile-links'><a href='".get_option('user_account_url')."'>Purchase History</a> | <a href='".get_option('user_account_url').$seperator."edit_profile=true'>Your Details</a> | <a href='".get_option('user_account_url').$seperator."downloads=true'>Your Downloads</a></div><br />";
80
  ?>
81
- <form method='POST'>
82
  <?php
83
  if($changes_saved == true) {
84
  echo __('Thanks, your changes have been saved.', 'wpsc');
@@ -189,4 +189,5 @@ foreach($form_data as $form_field)
189
  </td>
190
  </tr>
191
  </table>
192
- </form>
 
78
  <?php
79
  echo " <div class='user-profile-links'><a href='".get_option('user_account_url')."'>Purchase History</a> | <a href='".get_option('user_account_url').$seperator."edit_profile=true'>Your Details</a> | <a href='".get_option('user_account_url').$seperator."downloads=true'>Your Downloads</a></div><br />";
80
  ?>
81
+ <form method='post' action=''>
82
  <?php
83
  if($changes_saved == true) {
84
  echo __('Thanks, your changes have been saved.', 'wpsc');
189
  </td>
190
  </tr>
191
  </table>
192
+ </form>
193
+ </div>
merchants/paypal_multiple.php CHANGED
@@ -221,6 +221,8 @@ function gateway_paypal_multiple($seperator, $sessionid) {
221
  $data['upload'] = '1';
222
  $data['cmd'] = "_ext-enter";
223
  $data['redirect_cmd'] = "_cart";
 
 
224
  $datacount = count($data);
225
  $num = 0;
226
  foreach($data as $key=>$value) {
@@ -641,4 +643,4 @@ $output .= "
641
 
642
 
643
  add_action('init', 'nzshpcrt_paypal_ipn');
644
- ?>
221
  $data['upload'] = '1';
222
  $data['cmd'] = "_ext-enter";
223
  $data['redirect_cmd'] = "_cart";
224
+ $data = apply_filters('wpsc_paypal_standard_post_data',$data);
225
+
226
  $datacount = count($data);
227
  $num = 0;
228
  foreach($data as $key=>$value) {
643
 
644
 
645
  add_action('init', 'nzshpcrt_paypal_ipn');
646
+ ?>
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.6
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.1
8
 
9
  WP e-Commerce is a Web 2.0 application designed with usability, aesthetics, and presentation in mind.
10
 
themes/default/default.css CHANGED
@@ -95,7 +95,7 @@ div.wpsc_listen_button{
95
  }
96
 
97
  div.wpsc_description{
98
- /* clear: both; */
99
  }
100
 
101
  table.shoppingcart{
95
  }
96
 
97
  div.wpsc_description{
98
+ clear: both;
99
  }
100
 
101
  table.shoppingcart{
themes/default/products_page.php CHANGED
@@ -211,11 +211,11 @@ global $wpsc_query, $wpdb;
211
 
212
  <?php else : ?>
213
  <?php if(wpsc_product_on_special()) : ?>
214
- <span class='oldprice'><?php echo __('Price', 'wpsc'); ?>: <?php echo wpsc_product_normal_price(); ?></span><br />
215
  <?php endif; ?>
216
- <span id="product_price_<?php echo wpsc_the_product_id(); ?>" class="pricedisplay"><?php echo wpsc_the_product_price(); ?></span><?php echo __('Price', 'wpsc'); ?>: <br/>
217
  <?php if(get_option('display_pnp') == 1) : ?>
218
- <span class="pricedisplay"><?php echo wpsc_product_postage_and_packaging(); ?></span><?php echo __('P&amp;P', 'wpsc'); ?>: <br />
219
  <?php endif; ?>
220
  <?php endif; ?>
221
  </div>
211
 
212
  <?php else : ?>
213
  <?php if(wpsc_product_on_special()) : ?>
214
+ <span class='oldprice'><?php echo __('Price', 'wpsc'); ?>: <?php echo wpsc_product_normal_price(get_option('wpsc_hide_decimals')); ?></span><br />
215
  <?php endif; ?>
216
+ <span id="product_price_<?php echo wpsc_the_product_id(); ?>" class="pricedisplay"><?php echo wpsc_the_product_price(get_option('wpsc_hide_decimals')); ?></span><?php echo __('Price', 'wpsc'); ?>: <br/>
217
  <?php if(get_option('display_pnp') == 1) : ?>
218
+ <span class="pricedisplay"><?php echo wpsc_product_postage_and_packaging(get_option('wpsc_hide_decimals')); ?></span><?php echo __('P&amp;P', 'wpsc'); ?>: <br />
219
  <?php endif; ?>
220
  <?php endif; ?>
221
  </div>
themes/iShop/products_page.php CHANGED
@@ -209,11 +209,11 @@ global $wpsc_query, $wpdb;
209
 
210
  <?php else : ?>
211
  <?php if(wpsc_product_on_special()) : ?>
212
- <span class='oldprice'><?php echo __('Price', 'wpsc'); ?>: <?php echo wpsc_product_normal_price(); ?></span><br />
213
  <?php endif; ?>
214
- <span id="product_price_<?php echo wpsc_the_product_id(); ?>" class="pricedisplay"><?php echo wpsc_the_product_price(); ?></span><?php echo __('Price', 'wpsc'); ?>:<br/>
215
  <?php if(get_option('display_pnp') == 1) : ?>
216
- <span class="pricedisplay"><?php echo wpsc_product_postage_and_packaging(); ?></span><?php echo __('P&amp;P', 'wpsc'); ?>: <br />
217
  <?php endif; ?>
218
  <?php endif; ?>
219
  </div>
209
 
210
  <?php else : ?>
211
  <?php if(wpsc_product_on_special()) : ?>
212
+ <span class='oldprice'><?php echo __('Price', 'wpsc'); ?>: <?php echo wpsc_product_normal_price(get_option('wpsc_hide_decimals')); ?></span><br />
213
  <?php endif; ?>
214
+ <span id="product_price_<?php echo wpsc_the_product_id(); ?>" class="pricedisplay"><?php echo wpsc_the_product_price(get_option('wpsc_hide_decimals')); ?></span><?php echo __('Price', 'wpsc'); ?>:<br/>
215
  <?php if(get_option('display_pnp') == 1) : ?>
216
+ <span class="pricedisplay"><?php echo wpsc_product_postage_and_packaging(get_option('wpsc_hide_decimals')); ?></span><?php echo __('P&amp;P', 'wpsc'); ?>: <br />
217
  <?php endif; ?>
218
  <?php endif; ?>
219
  </div>
themes/marketplace/products_page.php CHANGED
@@ -213,11 +213,11 @@ global $wpsc_query, $wpdb;
213
 
214
  <?php else : ?>
215
  <?php if(wpsc_product_on_special()) : ?>
216
- <span class='oldprice'><?php echo __('Price', 'wpsc'); ?>: <?php echo wpsc_product_normal_price(); ?></span><br />
217
  <?php endif; ?>
218
- <span id="product_price_<?php echo wpsc_the_product_id(); ?>" class="pricedisplay"><?php echo wpsc_the_product_price(); ?></span><?php echo __('Price', 'wpsc'); ?>:<br/>
219
  <?php if(get_option('display_pnp') == 1) : ?>
220
- <span class="pricedisplay"><?php echo wpsc_product_postage_and_packaging(); ?></span><?php echo __('P&amp;P', 'wpsc'); ?>: <br />
221
  <?php endif; ?>
222
  <?php endif; ?>
223
  </div>
213
 
214
  <?php else : ?>
215
  <?php if(wpsc_product_on_special()) : ?>
216
+ <span class='oldprice'><?php echo __('Price', 'wpsc'); ?>: <?php echo wpsc_product_normal_price(get_option('wpsc_hide_decimals')); ?></span><br />
217
  <?php endif; ?>
218
+ <span id="product_price_<?php echo wpsc_the_product_id(); ?>" class="pricedisplay"><?php echo wpsc_the_product_price(get_option('wpsc_hide_decimals')); ?></span><?php echo __('Price', 'wpsc'); ?>:<br/>
219
  <?php if(get_option('display_pnp') == 1) : ?>
220
+ <span class="pricedisplay"><?php echo wpsc_product_postage_and_packaging(get_option('wpsc_hide_decimals')); ?></span><?php echo __('P&amp;P', 'wpsc'); ?>: <br />
221
  <?php endif; ?>
222
  <?php endif; ?>
223
  </div>
transaction_results.php CHANGED
@@ -62,6 +62,6 @@ if($_SESSION['wpsc_previous_selected_gateway'] == 'paypal_certified'){
62
  }
63
  if($sessionid != ''){
64
  //exit('<pre>'.print_r($sessionid, true).'</pre>');
65
- transaction_results($sessionid, true);
66
  }
67
  ?>
62
  }
63
  if($sessionid != ''){
64
  //exit('<pre>'.print_r($sessionid, true).'</pre>');
65
+ //transaction_results($sessionid, true);
66
  }
67
  ?>
user-downloads.php CHANGED
@@ -67,5 +67,8 @@ if(count($files) > 0) {
67
  <?php
68
  } else {
69
  echo __('You have not purchased any downloadable products yet.', 'wpsc');
70
- }
 
 
 
71
  ?>
67
  <?php
68
  } else {
69
  echo __('You have not purchased any downloadable products yet.', 'wpsc');
70
+ }?>
71
+ </div>
72
+ <?php
73
+
74
  ?>
user-log.php CHANGED
@@ -393,7 +393,6 @@ $date_list[0]['end'] = $end_timestamp;
393
  echo " </td>\n\r";
394
  echo "</tr>\n\r";
395
  }
396
- echo "</tr>";
397
  }
398
  else
399
  {
@@ -443,4 +442,4 @@ $date_list[0]['end'] = $end_timestamp;
443
  }
444
  ?>
445
  </div>
446
- <?php } ?>
393
  echo " </td>\n\r";
394
  echo "</tr>\n\r";
395
  }
 
396
  }
397
  else
398
  {
442
  }
443
  ?>
444
  </div>
445
+ <?php } ?>
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
7
  Author: Instinct
8
  Author URI: http://www.getshopped.org
9
  */
@@ -16,7 +16,7 @@ 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);
@@ -291,7 +291,13 @@ $shipping_directory = WPSC_FILE_PATH.'/shipping';
291
  $nzshpcrt_shipping_list = wpsc_list_dir($shipping_directory);
292
  foreach($nzshpcrt_shipping_list as $nzshpcrt_shipping) {
293
  if(stristr( $nzshpcrt_shipping , '.php' )) {
294
- require(WPSC_FILE_PATH."/shipping/".$nzshpcrt_shipping);
 
 
 
 
 
 
295
  }
296
  }
297
  $wpsc_shipping_modules = apply_filters('wpsc_shipping_modules',$wpsc_shipping_modules);
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.1
7
  Author: Instinct
8
  Author URI: http://www.getshopped.org
9
  */
16
  define('WPSC_VERSION', '3.7');
17
  define('WPSC_MINOR_VERSION', '51');
18
 
19
+ define('WPSC_PRESENTABLE_VERSION', '3.7.6.1');
20
 
21
  define('WPSC_DEBUG', false);
22
  define('WPSC_GATEWAY_DEBUG', false);
291
  $nzshpcrt_shipping_list = wpsc_list_dir($shipping_directory);
292
  foreach($nzshpcrt_shipping_list as $nzshpcrt_shipping) {
293
  if(stristr( $nzshpcrt_shipping , '.php' )) {
294
+ if($nzshpcrt_shipping == 'ups.php'){
295
+ if (phpMinV('5')){
296
+ require(WPSC_FILE_PATH."/shipping/".$nzshpcrt_shipping);
297
+ }
298
+ }else{
299
+ require(WPSC_FILE_PATH."/shipping/".$nzshpcrt_shipping);
300
+ }
301
  }
302
  }
303
  $wpsc_shipping_modules = apply_filters('wpsc_shipping_modules',$wpsc_shipping_modules);
wpsc-admin/ajax-and-init.php CHANGED
@@ -1329,7 +1329,7 @@ function wpsc_purchlog_edit_status($purchlog_id='', $purchlog_status='') {
1329
  if(($purchlog_status > $log_data['processed']) && ($log_data['processed'] <= 2)) {
1330
  transaction_results($log_data['sessionid'],false);
1331
  }
1332
- exit("1");
1333
  }
1334
 
1335
  if($_REQUEST['wpsc_admin_action'] == 'purchlog_edit_status') {
@@ -1344,11 +1344,11 @@ function wpsc_save_product_order() {
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;
1329
  if(($purchlog_status > $log_data['processed']) && ($log_data['processed'] <= 2)) {
1330
  transaction_results($log_data['sessionid'],false);
1331
  }
1332
+ // exit("1");
1333
  }
1334
 
1335
  if($_REQUEST['wpsc_admin_action'] == 'purchlog_edit_status') {
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/includes/settings-pages/shipping.php CHANGED
@@ -193,6 +193,7 @@ function selectgateway() {
193
 
194
  <p>
195
  <?php echo __('To enable shipping in WP e-Commerce you must select which shipping methods you want to enable on your site', 'wpsc'); ?>
 
196
  </p>
197
  <br />
198
  <p>
193
 
194
  <p>
195
  <?php echo __('To enable shipping in WP e-Commerce you must select which shipping methods you want to enable on your site', 'wpsc'); ?>
196
+ <?php if (!phpMinV('5')){ echo __('<br /><strong>UPS has been deactivated because you are running PHP4, please upgrade to PHP5 to enable UPS.</strong>','wpsc'); } ?>
197
  </p>
198
  <br />
199
  <p>
wpsc-includes/cart.class.php CHANGED
@@ -595,7 +595,7 @@ class wpsc_cart {
595
  }
596
  $this->update_location();
597
  $this->get_tax_rate();
598
- $this->unique_id = sha1(uniqid(rand(), true));
599
 
600
  $this->get_shipping_method();
601
  }
@@ -1048,6 +1048,7 @@ class wpsc_cart {
1048
  $this->subtotal = null;
1049
  $this->total_price = null;
1050
  $this->uses_shipping = null;
 
1051
  $this->get_shipping_option();
1052
  }
1053
 
@@ -1961,4 +1962,4 @@ class wpsc_cart_item {
1961
  }
1962
 
1963
  }
1964
- ?>
595
  }
596
  $this->update_location();
597
  $this->get_tax_rate();
598
+ $this->unique_id = sha1(uniqid(rand(),true));
599
 
600
  $this->get_shipping_method();
601
  }
1048
  $this->subtotal = null;
1049
  $this->total_price = null;
1050
  $this->uses_shipping = null;
1051
+ $this->shipping_quotes = null;
1052
  $this->get_shipping_option();
1053
  }
1054
 
1962
  }
1963
 
1964
  }
1965
+ ?>
wpsc-includes/display.functions.php CHANGED
@@ -169,7 +169,7 @@ function wpsc_product_url($product_id, $category_id = null, $escape = true) {
169
  }
170
 
171
 
172
-
173
  if((($wp_rewrite->rules != null) && ($wp_rewrite != null)) || (get_option('rewrite_rules') != null)) {
174
  $url_name = get_product_meta($product_id, 'url_name', true);
175
  $url_name = htmlentities(stripslashes($url_name), ENT_QUOTES, 'UTF-8');
169
  }
170
 
171
 
172
+ // exit('<pre>'.print_r($wp_query, true).'</pre>');
173
  if((($wp_rewrite->rules != null) && ($wp_rewrite != null)) || (get_option('rewrite_rules') != null)) {
174
  $url_name = get_product_meta($product_id, 'url_name', true);
175
  $url_name = htmlentities(stripslashes($url_name), ENT_QUOTES, 'UTF-8');
wpsc-includes/install_and_update.functions.php CHANGED
@@ -437,7 +437,9 @@ function wpsc_create_upload_directories() {
437
  foreach ($folders as $folder) {
438
  wp_mkdir_p($folder);
439
  @ chmod( $folder, 0775 );
 
440
  }
 
441
  //wpsc_copy_themes_to_uploads();
442
  }
443
 
437
  foreach ($folders as $folder) {
438
  wp_mkdir_p($folder);
439
  @ chmod( $folder, 0775 );
440
+ // echo 'Folder:'.$folder.' Creation attempted';
441
  }
442
+
443
  //wpsc_copy_themes_to_uploads();
444
  }
445
 
wpsc-includes/merchant.class.php CHANGED
@@ -115,18 +115,28 @@ class wpsc_merchant {
115
  'billing' => array(),
116
  'shipping' => array()
117
  );
 
118
  foreach((array)$collected_form_data as $collected_form_row) {
119
  $address_data_set = 'billing';
120
  $address_key = array_search($collected_form_row['unique_name'], $address_keys['billing']);
121
- if($address_key === null) {
122
  $address_data_set = 'shipping';
 
123
  $address_key = array_search($collected_form_row['unique_name'], $address_keys['shipping']);
124
  }
125
  if($address_key == null) {
126
  continue;
127
  }
128
- $address_data[$address_data_set][$address_key] = $collected_form_row['value'];
 
 
 
 
 
 
 
129
  }
 
130
  if(count($address_data['shipping']) < 1) {
131
  $address_data['shipping'] = $address_data['billing'];
132
  }
115
  'billing' => array(),
116
  'shipping' => array()
117
  );
118
+
119
  foreach((array)$collected_form_data as $collected_form_row) {
120
  $address_data_set = 'billing';
121
  $address_key = array_search($collected_form_row['unique_name'], $address_keys['billing']);
122
+ if($address_key == null) {
123
  $address_data_set = 'shipping';
124
+ // exit('<pre>'.print_r($collected_form_row,true).'</pre>');
125
  $address_key = array_search($collected_form_row['unique_name'], $address_keys['shipping']);
126
  }
127
  if($address_key == null) {
128
  continue;
129
  }
130
+ if($address_key == 'billingcountry' || $address_key == 'shippingcountry'){
131
+ $country = maybe_unserialize($collected_form_row['value']);
132
+ $address_data[$address_data_set][$address_key] =$country[0];
133
+ }elseif($collected_form_row['unique_name'] == 'shippingstate'){
134
+ $address_data[$address_data_set][$address_key] = wpsc_get_state_by_id($collected_form_row['value'], 'code');
135
+ }else{
136
+ $address_data[$address_data_set][$address_key] = $collected_form_row['value'];
137
+ }
138
  }
139
+ // exit('<pre>'.print_r($address_data,true).'</pre>');
140
  if(count($address_data['shipping']) < 1) {
141
  $address_data['shipping'] = $address_data['billing'];
142
  }
wpsc-includes/misc.functions.php CHANGED
@@ -121,15 +121,20 @@ add_filter('single_post_title','wpsc_post_title_seo');
121
  */
122
  function wpsc_change_canonical_url($url) {
123
  global $wpdb, $wpsc_query, $post;
124
- // exit('<pre>'.print_r($post,true).'</pre>');
125
- if(preg_match("/\[productspage\]/",$post->post_content)) {
126
  if(!is_numeric($_GET['product_id'])) {
127
  $product_id = $wpdb->get_var("SELECT `product_id` FROM `".WPSC_TABLE_PRODUCTMETA."` WHERE `meta_key` IN ( 'url_name' ) AND `meta_value` IN ( '".$wpsc_query->query_vars['product_url_name']."' ) ORDER BY `product_id` DESC LIMIT 1");
128
  } else {
129
  $product_id = absint($_GET['product_id']);
130
  }
131
-
 
132
  $url = wpsc_product_url($product_id);
 
 
 
 
133
  } else {
134
  if($wpsc_query->query_vars['category_id'] > 0) {
135
  $url = wpsc_category_url($wpsc_query->query_vars['category_id']);
@@ -153,6 +158,7 @@ add_filter('aioseop_canonical_url', 'wpsc_change_canonical_url');
153
 
154
  function wpsc_insert_canonical_url() {
155
  $wpsc_url = wpsc_change_canonical_url(null);
 
156
  echo "<link rel='canonical' href='$wpsc_url' />\n";
157
  }
158
 
@@ -745,4 +751,28 @@ function wpsc_clear_stock_claims( ) {
745
  $wpdb->query("DELETE FROM `".WPSC_TABLE_CLAIMED_STOCK."` WHERE `last_activity` < '{$old_claimed_stock_datetime}' AND `cart_submitted` IN ('0')");
746
  }
747
  add_action('wpsc_daily_cron_tasks', 'wpsc_clear_stock_claims');
748
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  */
122
  function wpsc_change_canonical_url($url) {
123
  global $wpdb, $wpsc_query, $post;
124
+ // exit('<pre>'.print_r($wpsc_query,true).'</pre>');
125
+ if(preg_match("/\[productspage\]/",$post->post_content) && $wpsc_query->query_vars['category_id'] == 0) {
126
  if(!is_numeric($_GET['product_id'])) {
127
  $product_id = $wpdb->get_var("SELECT `product_id` FROM `".WPSC_TABLE_PRODUCTMETA."` WHERE `meta_key` IN ( 'url_name' ) AND `meta_value` IN ( '".$wpsc_query->query_vars['product_url_name']."' ) ORDER BY `product_id` DESC LIMIT 1");
128
  } else {
129
  $product_id = absint($_GET['product_id']);
130
  }
131
+ //exit('prod id'.$product_id);
132
+ if($product_id > 0){
133
  $url = wpsc_product_url($product_id);
134
+ }else{
135
+ $url = get_option('product_list_url');
136
+ }
137
+
138
  } else {
139
  if($wpsc_query->query_vars['category_id'] > 0) {
140
  $url = wpsc_category_url($wpsc_query->query_vars['category_id']);
158
 
159
  function wpsc_insert_canonical_url() {
160
  $wpsc_url = wpsc_change_canonical_url(null);
161
+ // exit($wpsc_url);
162
  echo "<link rel='canonical' href='$wpsc_url' />\n";
163
  }
164
 
751
  $wpdb->query("DELETE FROM `".WPSC_TABLE_CLAIMED_STOCK."` WHERE `last_activity` < '{$old_claimed_stock_datetime}' AND `cart_submitted` IN ('0')");
752
  }
753
  add_action('wpsc_daily_cron_tasks', 'wpsc_clear_stock_claims');
754
+
755
+ /**
756
+ * Description Check PHP version to Compare
757
+ * @access public
758
+ *
759
+ * @param string of version to compare
760
+ * @return boolean true or false
761
+ */
762
+ function phpMinV($v)
763
+ {
764
+ $phpV = PHP_VERSION;
765
+
766
+ if ($phpV[0] >= $v[0]) {
767
+ if (empty($v[2]) || $v[2] == '*') {
768
+ return true;
769
+ } elseif ($phpV[2] >= $v[2]) {
770
+ if (empty($v[4]) || $v[4] == '*' || $phpV[4] >= $v[4]) {
771
+ return true;
772
+ }
773
+ }
774
+ }
775
+
776
+ return false;
777
+ }
778
+ ?>
wpsc-includes/productfeed.php CHANGED
@@ -108,9 +108,9 @@ function wpsc_generate_product_feed() {
108
  $purchase_link = wpsc_product_url($product['id']);
109
 
110
  $output .= " <item>\n\r";
111
- $output .= " <title><![CDATA[".htmlentities(stripslashes($product['name']), ENT_NOQUOTES, 'UTF-8')."]]></title>\n\r";
112
  $output .= " <link>$purchase_link</link>\n\r";
113
- $output .= " <description><![CDATA[".htmlentities(stripslashes($product['description']), ENT_NOQUOTES, 'UTF-8')."]]></description>\n\r";
114
  $output .= " <pubDate>".date("r")."</pubDate>\n\r";
115
  $output .= " <guid>$purchase_link</guid>\n\r";
116
 
@@ -156,7 +156,7 @@ function wpsc_generate_product_feed() {
156
  foreach ($google_elements as $gelement) {
157
 
158
  $output .= " <".$gelement['meta_key'].">";
159
- $output .= "<![CDATA[".htmlentities($gelement['meta_value'])."]]>";
160
  $output .= "</".$gelement['meta_key'].">\n\r";
161
 
162
  if ($gelement['meta_key'] == 'g:condition')
108
  $purchase_link = wpsc_product_url($product['id']);
109
 
110
  $output .= " <item>\n\r";
111
+ $output .= " <title><![CDATA[".stripslashes($product['name'])."]]></title>\n\r";
112
  $output .= " <link>$purchase_link</link>\n\r";
113
+ $output .= " <description><![CDATA[".stripslashes($product['description'])."]]></description>\n\r";
114
  $output .= " <pubDate>".date("r")."</pubDate>\n\r";
115
  $output .= " <guid>$purchase_link</guid>\n\r";
116
 
156
  foreach ($google_elements as $gelement) {
157
 
158
  $output .= " <".$gelement['meta_key'].">";
159
+ $output .= "<![CDATA[".$gelement['meta_value']."]]>";
160
  $output .= "</".$gelement['meta_key'].">\n\r";
161
 
162
  if ($gelement['meta_key'] == 'g:condition')
wpsc-includes/theme.functions.php CHANGED
@@ -182,7 +182,7 @@ function wpsc_enqueue_user_script_and_css() {
182
  wp_enqueue_style( 'wpsc-theme-css', $theme_url, false, $version_identifier, 'all');
183
  wp_enqueue_style( 'wpsc-theme-css-compatibility', WPSC_URL. '/themes/compatibility.css', false, $version_identifier, 'all');
184
  wp_enqueue_style( 'wpsc-product-rater', WPSC_URL.'/js/product_rater.css', false, $version_identifier, 'all');
185
- wp_enqueue_style( 'wp-e-commerce-dynamic', $siteurl."/index.php?wpsc_user_dynamic_css=true&category=$category_id" , false, $version_identifier, 'all' );
186
  wp_enqueue_style( 'wpsc-thickbox', WPSC_URL.'/js/thickbox.css', false, $version_identifier, 'all');
187
 
188
 
182
  wp_enqueue_style( 'wpsc-theme-css', $theme_url, false, $version_identifier, 'all');
183
  wp_enqueue_style( 'wpsc-theme-css-compatibility', WPSC_URL. '/themes/compatibility.css', false, $version_identifier, 'all');
184
  wp_enqueue_style( 'wpsc-product-rater', WPSC_URL.'/js/product_rater.css', false, $version_identifier, 'all');
185
+ wp_enqueue_style( 'wp-e-commerce-dynamic',$siteurl."/index.php?wpsc_user_dynamic_css=true&category=$category_id" , false, $version_identifier, 'all' );
186
  wp_enqueue_style( 'wpsc-thickbox', WPSC_URL.'/js/thickbox.css', false, $version_identifier, 'all');
187
 
188
 
wpsc-includes/wpsc_query.php CHANGED
@@ -1615,7 +1615,7 @@ class WPSC_Query {
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
  }
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 `products`.`publish`='1' AND `order`.`category_id`='0' $search_sql ORDER BY `order`.`order`";
1619
  }
1620
  }
1621
  }