Version Description
= 3.7.6.5 = Fixes issue with deprecated WPSC_TXT constants being undefined and displaying in front end of site. All users encountering this issue are advised to upgrade. Also Fixed the gateway issue where DPS or Authorize do not show up on the Payments Option Page even after activating Gold Cart.
= 3.7.6.4 = Fixes product/category permalink problems introduced in v3.7.6.3. All users that upgraded to 3.7.6.3 are encouraged to upgrade as soon as possible.
Download this release
Release Info
Developer | jghazally |
Plugin | WP eCommerce |
Version | 3.7.6.6 |
Comparing to | |
See all releases |
Code changes from version 3.7.6.5 to 3.7.6.6
- admin-form-functions.php +1 -1
- admin.js +4 -3
- display-coupons.php +2 -2
- image_processing.php +0 -1
- merchants/paypal-standard.merchant.php +0 -1
- updates/database_template.php +1 -1
- wp-shopping-cart.php +1 -2
- wpsc-admin/ajax-and-init.php +13 -16
- wpsc-admin/includes/settings-pages/checkout.php +1 -4
- wpsc-admin/js/admin.js +1 -1
- wpsc-includes/checkout.class.php +40 -23
- wpsc-includes/misc.functions.php +3 -2
admin-form-functions.php
CHANGED
@@ -332,7 +332,7 @@ $conditions = unserialize($coupon['condition']);
|
|
332 |
$end_timestamp = strtotime($coupon['expiry']);
|
333 |
$id = $coupon['id'];
|
334 |
$output = '';
|
335 |
-
$output .= "<form
|
336 |
$output .= " <input type='hidden' value='true' name='is_edit_coupon' />\n\r";
|
337 |
$output .= "<table class='add-coupon'>\n\r";
|
338 |
$output .= " <tr>\n\r";
|
332 |
$end_timestamp = strtotime($coupon['expiry']);
|
333 |
$id = $coupon['id'];
|
334 |
$output = '';
|
335 |
+
$output .= "<form name='edit_coupon' id='".$coupon['coupon_code']."' method='post' action=''>\n\r";
|
336 |
$output .= " <input type='hidden' value='true' name='is_edit_coupon' />\n\r";
|
337 |
$output .= "<table class='add-coupon'>\n\r";
|
338 |
$output .= " <tr>\n\r";
|
admin.js
CHANGED
@@ -593,13 +593,14 @@ jQuery(window).load( function () {
|
|
593 |
/* Coupon edit functionality */
|
594 |
jQuery('.modify_coupon').hide();
|
595 |
jQuery('.wpsc_edit_coupon').click(function(){
|
596 |
-
id = jQuery(this).attr('
|
|
|
597 |
if(jQuery('#'+id).hasClass('displaynone')){
|
598 |
-
jQuery('#'+id).
|
599 |
jQuery('#'+id).removeClass('displaynone');
|
600 |
}else{
|
601 |
jQuery('#'+id).addClass('displaynone');
|
602 |
-
jQuery('#'+id).
|
603 |
}
|
604 |
|
605 |
});
|
593 |
/* Coupon edit functionality */
|
594 |
jQuery('.modify_coupon').hide();
|
595 |
jQuery('.wpsc_edit_coupon').click(function(){
|
596 |
+
id = jQuery(this).attr('rel');
|
597 |
+
id = 'coupon_box_'+id;
|
598 |
if(jQuery('#'+id).hasClass('displaynone')){
|
599 |
+
jQuery('#'+id).show();
|
600 |
jQuery('#'+id).removeClass('displaynone');
|
601 |
}else{
|
602 |
jQuery('#'+id).addClass('displaynone');
|
603 |
+
jQuery('#'+id).hide();
|
604 |
}
|
605 |
|
606 |
});
|
display-coupons.php
CHANGED
@@ -447,14 +447,14 @@ foreach((array)$coupon_data as $coupon) {
|
|
447 |
|
448 |
|
449 |
echo " <td>\n\r";
|
450 |
-
echo "<a title='".$coupon['coupon_code']."' href='
|
451 |
echo " </td>\n\r";
|
452 |
|
453 |
echo " </tr>\n\r";
|
454 |
echo " <tr>\n\r";
|
455 |
echo " <td colspan='7' style='padding-left:0px;'>\n\r";
|
456 |
// $status_style = "style='display: block;'";
|
457 |
-
echo " <div id='coupon_box_".$coupon['id']."' class='modify_coupon' >\n\r";
|
458 |
coupon_edit_form($coupon);
|
459 |
echo " </div>\n\r";
|
460 |
echo " </td>\n\r";
|
447 |
|
448 |
|
449 |
echo " <td>\n\r";
|
450 |
+
echo "<a title='".$coupon['coupon_code']."' href='#' rel='".$coupon['id']."' class='wpsc_edit_coupon' >".__('Edit', 'wpsc')."</a>";
|
451 |
echo " </td>\n\r";
|
452 |
|
453 |
echo " </tr>\n\r";
|
454 |
echo " <tr>\n\r";
|
455 |
echo " <td colspan='7' style='padding-left:0px;'>\n\r";
|
456 |
// $status_style = "style='display: block;'";
|
457 |
+
echo " <div id='coupon_box_".$coupon['id']."' class='displaynone modify_coupon' >\n\r";
|
458 |
coupon_edit_form($coupon);
|
459 |
echo " </div>\n\r";
|
460 |
echo " </td>\n\r";
|
image_processing.php
CHANGED
@@ -100,7 +100,6 @@ global $wpdb;
|
|
100 |
// Final thumbnail cropped from the center out.
|
101 |
//ImageCopyResampled( $dst_img, $temp_img, 0, 0, $w1, $h1, $width, $height, $width, $height );
|
102 |
ImageCopy( $dst_img, $temp_img, $w1, $h1, 0, 0, $temp_w, $temp_h );
|
103 |
-
//mail('thomas.howard@gmail.com','lolwut',"ImageCopy( $dst_img, $temp_img, $w1, $h1, 0, 0, $temp_w, $temp_h );");
|
104 |
|
105 |
$image_quality = wpsc_image_quality();
|
106 |
|
100 |
// Final thumbnail cropped from the center out.
|
101 |
//ImageCopyResampled( $dst_img, $temp_img, 0, 0, $w1, $h1, $width, $height, $width, $height );
|
102 |
ImageCopy( $dst_img, $temp_img, $w1, $h1, 0, 0, $temp_w, $temp_h );
|
|
|
103 |
|
104 |
$image_quality = wpsc_image_quality();
|
105 |
|
merchants/paypal-standard.merchant.php
CHANGED
@@ -309,7 +309,6 @@ class wpsc_merchant_paypal_standard extends wpsc_merchant {
|
|
309 |
".print_r($this->cart_items, true)."
|
310 |
{$altered_count}
|
311 |
";
|
312 |
-
//mail('thomas.howard@gmail.com', "IPN Debugging", $message);
|
313 |
}
|
314 |
|
315 |
|
309 |
".print_r($this->cart_items, true)."
|
310 |
{$altered_count}
|
311 |
";
|
|
|
312 |
}
|
313 |
|
314 |
|
updates/database_template.php
CHANGED
@@ -82,7 +82,7 @@ $wpsc_database_template[$table_name]['columns']['default'] = "varchar(128) NOT N
|
|
82 |
$wpsc_database_template[$table_name]['columns']['active'] = "varchar(1) NOT NULL DEFAULT '1' ";
|
83 |
$wpsc_database_template[$table_name]['columns']['order'] = "int(10) unsigned NOT NULL DEFAULT '0' ";
|
84 |
$wpsc_database_template[$table_name]['columns']['unique_name'] = "varchar(255) NOT NULL DEFAULT '' ";
|
85 |
-
$wpsc_database_template[$table_name]['columns']['options'] = "
|
86 |
$wpsc_database_template[$table_name]['columns']['checkout_set'] = "VARCHAR( 64 ) NOT NULL DEFAULT '0'";
|
87 |
|
88 |
$wpsc_database_template[$table_name]['indexes']['PRIMARY'] = "PRIMARY KEY ( `id` )";
|
82 |
$wpsc_database_template[$table_name]['columns']['active'] = "varchar(1) NOT NULL DEFAULT '1' ";
|
83 |
$wpsc_database_template[$table_name]['columns']['order'] = "int(10) unsigned NOT NULL DEFAULT '0' ";
|
84 |
$wpsc_database_template[$table_name]['columns']['unique_name'] = "varchar(255) NOT NULL DEFAULT '' ";
|
85 |
+
$wpsc_database_template[$table_name]['columns']['options'] = "longtext NOT NULL DEFAULT '' ";
|
86 |
$wpsc_database_template[$table_name]['columns']['checkout_set'] = "VARCHAR( 64 ) NOT NULL DEFAULT '0'";
|
87 |
|
88 |
$wpsc_database_template[$table_name]['indexes']['PRIMARY'] = "PRIMARY KEY ( `id` )";
|
wp-shopping-cart.php
CHANGED
@@ -536,5 +536,4 @@ if ( is_admin() ) {
|
|
536 |
}
|
537 |
|
538 |
|
539 |
-
|
540 |
-
?>
|
536 |
}
|
537 |
|
538 |
|
539 |
+
?>
|
|
wpsc-admin/ajax-and-init.php
CHANGED
@@ -1894,8 +1894,12 @@ function wpsc_check_form_options(){
|
|
1894 |
// exit($sql);
|
1895 |
$options = $wpdb->get_var($sql);
|
1896 |
if($options != ''){
|
1897 |
-
|
1898 |
$options = maybe_unserialize($options);
|
|
|
|
|
|
|
|
|
1899 |
$output = "<tr class='wpsc_grey'><td></td><td colspan='5'>Please Save your changes before trying to Order your Checkout Forms again.</td></tr>\r\n<tr class='wpsc_grey'><td></td><th>Label</th><th >Value</th><td colspan='3'><a href='' class='wpsc_add_new_checkout_option' title='form_options[".$id."]'>+ New Layer</a></td></tr>";
|
1900 |
|
1901 |
foreach((array)$options as $key=>$value){
|
@@ -1931,26 +1935,19 @@ function wpsc_checkout_settings(){
|
|
1931 |
update_option('wpsc_checkout_form_sets', $checkout_sets);
|
1932 |
}
|
1933 |
|
1934 |
-
// echo "<pre>".print_r($_POST,true)."</pre>";
|
1935 |
-
// if(!isset($_POST['wpsc_checkout_set_filter'])){
|
1936 |
-
//exit('<pre>'.print_r($_POST,true).'</pre>');
|
1937 |
-
// Save checkout options
|
1938 |
$options = array();
|
1939 |
if(is_array($_POST['wpsc_checkout_option_label'])){
|
1940 |
-
|
1941 |
foreach($_POST['wpsc_checkout_option_label'] as $form_id=> $values){
|
1942 |
-
|
1943 |
foreach((array)$values as $key => $form_option){
|
1944 |
-
$
|
|
|
|
|
1945 |
}
|
|
|
|
|
|
|
1946 |
}
|
1947 |
-
|
1948 |
-
// exit('<pre>'.print_r($options,true).'</pre>');
|
1949 |
-
|
1950 |
-
$options = serialize($options);
|
1951 |
-
|
1952 |
-
$sql = "UPDATE `".WPSC_TABLE_CHECKOUT_FORMS."` SET `options`='".$options."' WHERE id=".$form_id;
|
1953 |
-
$wpdb->query($sql);
|
1954 |
|
1955 |
}
|
1956 |
|
@@ -2162,7 +2159,7 @@ function wpsc_mass_resize_thumbnails() {
|
|
2162 |
}
|
2163 |
//$wpdb->query("DELETE FROM `".WPSC_TABLE_PRODUCT_IMAGES."` WHERE `product_id` IN('0')");
|
2164 |
|
2165 |
-
|
2166 |
$sendback = wp_get_referer();
|
2167 |
$sendback = add_query_arg('tab', $_SESSION['wpsc_settings_curr_page'], remove_query_arg('tab', $sendback));
|
2168 |
wp_redirect($sendback);
|
1894 |
// exit($sql);
|
1895 |
$options = $wpdb->get_var($sql);
|
1896 |
if($options != ''){
|
1897 |
+
|
1898 |
$options = maybe_unserialize($options);
|
1899 |
+
if(!is_array($options)){
|
1900 |
+
$options = unserialize($options);
|
1901 |
+
}
|
1902 |
+
//exit('<pre>'.print_r($options,true).'</pre>');
|
1903 |
$output = "<tr class='wpsc_grey'><td></td><td colspan='5'>Please Save your changes before trying to Order your Checkout Forms again.</td></tr>\r\n<tr class='wpsc_grey'><td></td><th>Label</th><th >Value</th><td colspan='3'><a href='' class='wpsc_add_new_checkout_option' title='form_options[".$id."]'>+ New Layer</a></td></tr>";
|
1904 |
|
1905 |
foreach((array)$options as $key=>$value){
|
1935 |
update_option('wpsc_checkout_form_sets', $checkout_sets);
|
1936 |
}
|
1937 |
|
|
|
|
|
|
|
|
|
1938 |
$options = array();
|
1939 |
if(is_array($_POST['wpsc_checkout_option_label'])){
|
1940 |
+
|
1941 |
foreach($_POST['wpsc_checkout_option_label'] as $form_id=> $values){
|
|
|
1942 |
foreach((array)$values as $key => $form_option){
|
1943 |
+
$form_option = str_ireplace("'", "",$form_option);
|
1944 |
+
$form_val = str_ireplace("'", "",sanitize_title($_POST['wpsc_checkout_option_value'][$form_id][$key]));
|
1945 |
+
$options[$form_option] = $form_val;
|
1946 |
}
|
1947 |
+
$options = serialize($options);
|
1948 |
+
$sql = "UPDATE `".WPSC_TABLE_CHECKOUT_FORMS."` SET `options`='".$options."' WHERE id=".$form_id;
|
1949 |
+
$wpdb->query($sql);
|
1950 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1951 |
|
1952 |
}
|
1953 |
|
2159 |
}
|
2160 |
//$wpdb->query("DELETE FROM `".WPSC_TABLE_PRODUCT_IMAGES."` WHERE `product_id` IN('0')");
|
2161 |
|
2162 |
+
$_SESSION['wpsc_thumbnails_resized'] = true;
|
2163 |
$sendback = wp_get_referer();
|
2164 |
$sendback = add_query_arg('tab', $_SESSION['wpsc_settings_curr_page'], remove_query_arg('tab', $sendback));
|
2165 |
wp_redirect($sendback);
|
wpsc-admin/includes/settings-pages/checkout.php
CHANGED
@@ -205,13 +205,10 @@ $form_types = get_option('wpsc_checkout_form_fields');
|
|
205 |
|
206 |
<tbody id='wpsc_checkout_list_body'>
|
207 |
<?php
|
208 |
-
|
209 |
echo "<tr id='checkout_".$form_field['id']."' class='checkout_form_field'>\n\r";
|
210 |
echo '<td class="drag"><a href="" onclick="return false;" title="Click and Drag to Order Checkout Fields"><img src="'.WPSC_URL.'/images/roll-over-drag.jpg" alt="roll-over-drag" /></a></td>';
|
211 |
echo "<td class='namecol'><input type='text' name='form_name[".$form_field['id']."]' value='".htmlentities(stripslashes($form_field['name']), ENT_QUOTES, "UTF-8")."' /></td>";
|
212 |
-
|
213 |
-
//echo "<td class='namecol'><input type='text' name='form_name[".$form_field['id']."]' value='".$form_field['name']."' /></td>";
|
214 |
-
|
215 |
echo " <td class='typecol'>";
|
216 |
echo "<select class='wpsc_checkout_selectboxes' name='form_type[".$form_field['id']."]'>";
|
217 |
foreach($form_types as $form_type_name => $form_type) {
|
205 |
|
206 |
<tbody id='wpsc_checkout_list_body'>
|
207 |
<?php
|
208 |
+
foreach((array)$form_data as $form_field) {
|
209 |
echo "<tr id='checkout_".$form_field['id']."' class='checkout_form_field'>\n\r";
|
210 |
echo '<td class="drag"><a href="" onclick="return false;" title="Click and Drag to Order Checkout Fields"><img src="'.WPSC_URL.'/images/roll-over-drag.jpg" alt="roll-over-drag" /></a></td>';
|
211 |
echo "<td class='namecol'><input type='text' name='form_name[".$form_field['id']."]' value='".htmlentities(stripslashes($form_field['name']), ENT_QUOTES, "UTF-8")."' /></td>";
|
|
|
|
|
|
|
212 |
echo " <td class='typecol'>";
|
213 |
echo "<select class='wpsc_checkout_selectboxes' name='form_type[".$form_field['id']."]'>";
|
214 |
foreach($form_types as $form_type_name => $form_type) {
|
wpsc-admin/js/admin.js
CHANGED
@@ -51,7 +51,7 @@ jQuery(document).ready( function () {
|
|
51 |
jQuery(this).click(function(event){
|
52 |
form_id = jQuery(this).attr('title');
|
53 |
id = form_id.replace('form_options', '');
|
54 |
-
output = "<tr class='wpsc_grey'><td></td><td><input type='text' value='' name='wpsc_checkout_option_label
|
55 |
jQuery(this).parent().parent('tr').after(output);
|
56 |
event.preventDefault();
|
57 |
});
|
51 |
jQuery(this).click(function(event){
|
52 |
form_id = jQuery(this).attr('title');
|
53 |
id = form_id.replace('form_options', '');
|
54 |
+
output = "<tr class='wpsc_grey'><td></td><td><input type='text' value='' name='wpsc_checkout_option_label"+id+"[]' /></td><td colspan='4'><input type='text' value='' name='wpsc_checkout_option_value"+id+"[]' /> <a class='wpsc_delete_option' href='' ><img src='"+WPSC_URL+"/images/trash.gif' alt='"+TXT_WPSC_DELETE+"' title='"+TXT_WPSC_DELETE+"' /></a></td></tr>";
|
55 |
jQuery(this).parent().parent('tr').after(output);
|
56 |
event.preventDefault();
|
57 |
});
|
wpsc-includes/checkout.class.php
CHANGED
@@ -327,23 +327,22 @@ class wpsc_checkout {
|
|
327 |
global $wpdb;
|
328 |
$this->checkout_items = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_CHECKOUT_FORMS."` WHERE `active` = '1' AND `checkout_set`='".$checkout_set."' ORDER BY `order`;");
|
329 |
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
//
|
347 |
if(function_exists('wpsc_get_ticket_checkout_set')){
|
348 |
$sql = "SELECT * FROM `".WPSC_TABLE_CHECKOUT_FORMS."` WHERE `active` = '1' AND `checkout_set`='".wpsc_get_ticket_checkout_set()."' ORDER BY `order`;";
|
349 |
$this->additional_fields = $wpdb->get_results($sql);
|
@@ -404,14 +403,27 @@ class wpsc_checkout {
|
|
404 |
*/
|
405 |
function form_field() {
|
406 |
global $wpdb, $user_ID;
|
407 |
-
|
408 |
-
//exit('<pre>'.print_r($_SESSION['wpsc_checkout_saved_values'], true).'</pre>');
|
409 |
|
410 |
if((count($_SESSION['wpsc_checkout_saved_values']) <= 0) && ($user_ID > 0)) {
|
411 |
//$_SESSION['wpsc_checkout_saved_values'] = get_usermeta($user_ID, 'wpshpcrt_usr_profile');
|
412 |
}
|
413 |
-
|
414 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
415 |
$an_array = '';
|
416 |
if(function_exists('wpsc_get_ticket_checkout_set')){
|
417 |
if($this->checkout_item->checkout_set == wpsc_get_ticket_checkout_set()){
|
@@ -461,11 +473,16 @@ class wpsc_checkout {
|
|
461 |
$output .= "<option value='-1'>Select an Option</option>";
|
462 |
foreach((array)$options as $label => $value){
|
463 |
$value = str_replace(' ', '',$value);
|
464 |
-
$
|
|
|
|
|
|
|
|
|
|
|
465 |
}
|
466 |
$output .="</select>";
|
467 |
}
|
468 |
-
|
469 |
break;
|
470 |
case "radio":
|
471 |
$options = $this->get_checkout_options($this->checkout_item->id);
|
327 |
global $wpdb;
|
328 |
$this->checkout_items = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_CHECKOUT_FORMS."` WHERE `active` = '1' AND `checkout_set`='".$checkout_set."' ORDER BY `order`;");
|
329 |
|
330 |
+
$category_list = wpsc_cart_item_categories(true);
|
331 |
+
$additional_form_list = array();
|
332 |
+
foreach($category_list as $category_id) {
|
333 |
+
$additional_form_list[] = wpsc_get_categorymeta($category_id, 'use_additonal_form_set');
|
334 |
+
}
|
335 |
+
if(function_exists('wpsc_get_ticket_checkout_set')){
|
336 |
+
|
337 |
+
$checkout_form_fields_id = array_search(wpsc_get_ticket_checkout_set(),$additional_form_list);
|
338 |
+
unset($additional_form_list[$checkout_form_fields_id]);
|
339 |
+
}
|
340 |
+
|
341 |
+
if(count($additional_form_list) > 0) {
|
342 |
+
$this->category_checkout_items = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_CHECKOUT_FORMS."` WHERE `active` = '1' AND `checkout_set` IN ('".implode("','", $additional_form_list)."') ORDER BY `checkout_set`, `order`;");
|
343 |
+
$this->checkout_items = array_merge((array)$this->checkout_items,(array)$this->category_checkout_items);
|
344 |
+
}
|
345 |
+
|
|
|
346 |
if(function_exists('wpsc_get_ticket_checkout_set')){
|
347 |
$sql = "SELECT * FROM `".WPSC_TABLE_CHECKOUT_FORMS."` WHERE `active` = '1' AND `checkout_set`='".wpsc_get_ticket_checkout_set()."' ORDER BY `order`;";
|
348 |
$this->additional_fields = $wpdb->get_results($sql);
|
403 |
*/
|
404 |
function form_field() {
|
405 |
global $wpdb, $user_ID;
|
406 |
+
// exit('<pre>'.print_r($_SESSION['wpsc_checkout_saved_values'], true).'</pre>');
|
|
|
407 |
|
408 |
if((count($_SESSION['wpsc_checkout_saved_values']) <= 0) && ($user_ID > 0)) {
|
409 |
//$_SESSION['wpsc_checkout_saved_values'] = get_usermeta($user_ID, 'wpshpcrt_usr_profile');
|
410 |
}
|
411 |
+
if(is_array($_SESSION['wpsc_checkout_saved_values'][$this->checkout_item->id])){
|
412 |
+
if(function_exists('wpsc_get_ticket_checkout_set')){
|
413 |
+
if($this->checkout_item->checkout_set == wpsc_get_ticket_checkout_set()){
|
414 |
+
if(!isset($_SESSION['wpsc_tickets_saved_values_count'])){
|
415 |
+
$_SESSION['wpsc_tickets_saved_values_count'] = 0;
|
416 |
+
$count = $_SESSION['wpsc_tickets_saved_values_count'];
|
417 |
+
}else{
|
418 |
+
$count = $_SESSION['wpsc_tickets_saved_values_count']-1;
|
419 |
+
}
|
420 |
+
$saved_form_data = htmlentities(stripslashes($_SESSION['wpsc_checkout_saved_values'][$this->checkout_item->id][$count]), ENT_QUOTES, 'UTF-8');
|
421 |
+
}
|
422 |
+
}
|
423 |
+
}else{
|
424 |
+
$saved_form_data = htmlentities(stripslashes($_SESSION['wpsc_checkout_saved_values'][$this->checkout_item->id]), ENT_QUOTES, 'UTF-8');
|
425 |
+
}
|
426 |
+
//make sure tickets are arrays for multiple ticket holders
|
427 |
$an_array = '';
|
428 |
if(function_exists('wpsc_get_ticket_checkout_set')){
|
429 |
if($this->checkout_item->checkout_set == wpsc_get_ticket_checkout_set()){
|
473 |
$output .= "<option value='-1'>Select an Option</option>";
|
474 |
foreach((array)$options as $label => $value){
|
475 |
$value = str_replace(' ', '',$value);
|
476 |
+
if($saved_form_data == $value){
|
477 |
+
$selected = 'selected="selected"';
|
478 |
+
}else{
|
479 |
+
$selected = '';
|
480 |
+
}
|
481 |
+
$output .="<option ".$selected. " value='".$value."'>".$label."</option>\n\r";
|
482 |
}
|
483 |
$output .="</select>";
|
484 |
}
|
485 |
+
|
486 |
break;
|
487 |
case "radio":
|
488 |
$options = $this->get_checkout_options($this->checkout_item->id);
|
wpsc-includes/misc.functions.php
CHANGED
@@ -762,14 +762,15 @@ function wpsc_readfile_chunked($filename, $retbytes = true) {
|
|
762 |
|
763 |
function wpsc_clear_stock_claims( ) {
|
764 |
global $wpdb;
|
765 |
-
|
766 |
/// Delete the old claims on stock
|
767 |
$old_claimed_stock_timestamp = mktime((date('H') - 1), date('i'), date('s'), date('m'), date('d'), date('Y'));
|
768 |
$old_claimed_stock_datetime = date("Y-m-d H:i:s", $old_claimed_stock_timestamp);
|
769 |
$wpdb->query("DELETE FROM `".WPSC_TABLE_CLAIMED_STOCK."` WHERE `last_activity` < '{$old_claimed_stock_datetime}' AND `cart_submitted` IN ('0')");
|
|
|
770 |
}
|
771 |
add_action('wpsc_daily_cron_tasks', 'wpsc_clear_stock_claims');
|
772 |
-
|
773 |
/**
|
774 |
* Description Check PHP version to Compare
|
775 |
* @access public
|
762 |
|
763 |
function wpsc_clear_stock_claims( ) {
|
764 |
global $wpdb;
|
765 |
+
|
766 |
/// Delete the old claims on stock
|
767 |
$old_claimed_stock_timestamp = mktime((date('H') - 1), date('i'), date('s'), date('m'), date('d'), date('Y'));
|
768 |
$old_claimed_stock_datetime = date("Y-m-d H:i:s", $old_claimed_stock_timestamp);
|
769 |
$wpdb->query("DELETE FROM `".WPSC_TABLE_CLAIMED_STOCK."` WHERE `last_activity` < '{$old_claimed_stock_datetime}' AND `cart_submitted` IN ('0')");
|
770 |
+
// wp_mail('jghazally@gmail.com', 'test hourly cron1', 'wpsc_clear_stock_claims ran'."DELETE FROM `".WPSC_TABLE_CLAIMED_STOCK."` WHERE `last_activity` < '{$old_claimed_stock_datetime}' AND `cart_submitted` IN ('0')");
|
771 |
}
|
772 |
add_action('wpsc_daily_cron_tasks', 'wpsc_clear_stock_claims');
|
773 |
+
add_action('wpsc_hourly_cron_tasks', 'wpsc_clear_stock_claims');
|
774 |
/**
|
775 |
* Description Check PHP version to Compare
|
776 |
* @access public
|