Version Description
Download this release
Release Info
| Developer | jghazally |
| Plugin | |
| Version | 3.7.6RC4 |
| Comparing to | |
| See all releases | |
Code changes from version 3.7.6RC3 to 3.7.6RC4
- admin.js +3 -7
- js/wp-e-commerce.js +1 -1
- themes/default/shopping_cart_page.php +1 -1
- themes/iShop/shopping_cart_page.php +2 -4
- themes/marketplace/shopping_cart_page.php +2 -4
- wp-shopping-cart.php +3 -3
- wpsc-admin/display-items.page.php +1 -1
- wpsc-admin/includes/display-items-functions.php +6 -3
- wpsc-admin/includes/settings-pages/admin.php +6 -1
- wpsc-admin/includes/settings-pages/presentation.php +10 -10
- wpsc-admin/js/admin.js +1 -1
- wpsc-includes/ajax.functions.php +22 -12
- wpsc-includes/cart.class.php +13 -5
admin.js
CHANGED
|
@@ -235,12 +235,14 @@ jQuery("div.previewimage").hover(
|
|
| 235 |
}
|
| 236 |
);
|
| 237 |
|
| 238 |
-
jQuery("
|
| 239 |
function (e) {
|
|
|
|
| 240 |
jQuery("div#image_settings_box").hide();
|
| 241 |
}
|
| 242 |
);
|
| 243 |
|
|
|
|
| 244 |
jQuery("#table_rate_price").click(
|
| 245 |
function() {
|
| 246 |
if (this.checked) {
|
|
@@ -1061,12 +1063,6 @@ function enablebuttons(){
|
|
| 1061 |
}
|
| 1062 |
);
|
| 1063 |
|
| 1064 |
-
jQuery("a.closeimagesettings").click(
|
| 1065 |
-
function (e) {
|
| 1066 |
-
jQuery("div#image_settings_box").hide();
|
| 1067 |
-
}
|
| 1068 |
-
);
|
| 1069 |
-
|
| 1070 |
function imageorderresults(results) {
|
| 1071 |
eval(results);
|
| 1072 |
jQuery('#gallery_image_'+ser).append(output);
|
| 235 |
}
|
| 236 |
);
|
| 237 |
|
| 238 |
+
jQuery(".closeimagesettings").click(
|
| 239 |
function (e) {
|
| 240 |
+
alert('uhuh');
|
| 241 |
jQuery("div#image_settings_box").hide();
|
| 242 |
}
|
| 243 |
);
|
| 244 |
|
| 245 |
+
|
| 246 |
jQuery("#table_rate_price").click(
|
| 247 |
function() {
|
| 248 |
if (this.checked) {
|
| 1063 |
}
|
| 1064 |
);
|
| 1065 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1066 |
function imageorderresults(results) {
|
| 1067 |
eval(results);
|
| 1068 |
jQuery('#gallery_image_'+ser).append(output);
|
js/wp-e-commerce.js
CHANGED
|
@@ -73,7 +73,7 @@ jQuery(document).ready(function () {
|
|
| 73 |
jQuery("select#region").show();
|
| 74 |
shipName = jQuery('input.shipping_region').attr('name');
|
| 75 |
shipID = jQuery('input.shipping_region').attr('id');
|
| 76 |
-
jQuery('input.shipping_region').replaceWith('<input type="hidden" class="shipping_region" value="'+stateID+'" name="'+shipName+'" id="'+shipName+'"
|
| 77 |
jQuery("select#region :selected").html(state).attr('selected','selected');
|
| 78 |
jQuery('span.shipping_region_name').html(state);
|
| 79 |
}
|
| 73 |
jQuery("select#region").show();
|
| 74 |
shipName = jQuery('input.shipping_region').attr('name');
|
| 75 |
shipID = jQuery('input.shipping_region').attr('id');
|
| 76 |
+
jQuery('input.shipping_region').replaceWith('<input type="hidden" class="shipping_region" value="'+stateID+'" name="'+shipName+'" id="'+shipName+'" /><span class="shipping_region_name"></span>');
|
| 77 |
jQuery("select#region :selected").html(state).attr('selected','selected');
|
| 78 |
jQuery('span.shipping_region_name').html(state);
|
| 79 |
}
|
themes/default/shopping_cart_page.php
CHANGED
|
@@ -128,7 +128,7 @@ if(wpsc_cart_item_count() > 0) :
|
|
| 128 |
<?php if (!wpsc_have_shipping_quotes()) { continue; } // Don't display shipping method if it doesn't have at least one quote ?>
|
| 129 |
<tr><td class='shipping_header' colspan='5'><?php echo wpsc_shipping_method_name().__('- Choose a Shipping Rate', 'wpsc'); ?> </td></tr>
|
| 130 |
<?php while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote(); ?>
|
| 131 |
-
<tr
|
| 132 |
<td colspan='3'>
|
| 133 |
<label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_name(); ?></label>
|
| 134 |
</td>
|
| 128 |
<?php if (!wpsc_have_shipping_quotes()) { continue; } // Don't display shipping method if it doesn't have at least one quote ?>
|
| 129 |
<tr><td class='shipping_header' colspan='5'><?php echo wpsc_shipping_method_name().__('- Choose a Shipping Rate', 'wpsc'); ?> </td></tr>
|
| 130 |
<?php while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote(); ?>
|
| 131 |
+
<tr>
|
| 132 |
<td colspan='3'>
|
| 133 |
<label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_name(); ?></label>
|
| 134 |
</td>
|
themes/iShop/shopping_cart_page.php
CHANGED
|
@@ -112,10 +112,8 @@ if(wpsc_cart_item_count() > 0) :
|
|
| 112 |
if (!wpsc_have_shipping_quotes()) continue;
|
| 113 |
?>
|
| 114 |
<tr><td class='shipping_header' colspan='5'><?php echo wpsc_shipping_method_name().__('- Choose a Shipping Rate', 'wpsc'); ?> </td></tr>
|
| 115 |
-
<?php while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote();
|
| 116 |
-
|
| 117 |
-
?>
|
| 118 |
-
<tr>
|
| 119 |
<td colspan='3'>
|
| 120 |
<label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_name(); ?></label>
|
| 121 |
</td>
|
| 112 |
if (!wpsc_have_shipping_quotes()) continue;
|
| 113 |
?>
|
| 114 |
<tr><td class='shipping_header' colspan='5'><?php echo wpsc_shipping_method_name().__('- Choose a Shipping Rate', 'wpsc'); ?> </td></tr>
|
| 115 |
+
<?php while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote(); ?>
|
| 116 |
+
<tr class='shipping_quotes'>
|
|
|
|
|
|
|
| 117 |
<td colspan='3'>
|
| 118 |
<label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_name(); ?></label>
|
| 119 |
</td>
|
themes/marketplace/shopping_cart_page.php
CHANGED
|
@@ -111,10 +111,8 @@ if(wpsc_cart_item_count() > 0) :
|
|
| 111 |
if (!wpsc_have_shipping_quotes()) continue;
|
| 112 |
?>
|
| 113 |
<tr><td class='shipping_header' colspan='5'><?php echo wpsc_shipping_method_name().__('- Choose a Shipping Rate', 'wpsc'); ?> </td></tr>
|
| 114 |
-
<?php while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote();
|
| 115 |
-
|
| 116 |
-
?>
|
| 117 |
-
<tr>
|
| 118 |
<td colspan='3'>
|
| 119 |
<label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_name(); ?></label>
|
| 120 |
</td>
|
| 111 |
if (!wpsc_have_shipping_quotes()) continue;
|
| 112 |
?>
|
| 113 |
<tr><td class='shipping_header' colspan='5'><?php echo wpsc_shipping_method_name().__('- Choose a Shipping Rate', 'wpsc'); ?> </td></tr>
|
| 114 |
+
<?php while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote(); ?>
|
| 115 |
+
<tr class='shipping_quotes'>
|
|
|
|
|
|
|
| 116 |
<td colspan='3'>
|
| 117 |
<label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_name(); ?></label>
|
| 118 |
</td>
|
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
|
| 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', '
|
| 18 |
|
| 19 |
-
define('WPSC_PRESENTABLE_VERSION', '3.7.6
|
| 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 RC 4
|
| 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', '50');
|
| 18 |
|
| 19 |
+
define('WPSC_PRESENTABLE_VERSION', '3.7.6 RC 4');
|
| 20 |
|
| 21 |
define('WPSC_DEBUG', false);
|
| 22 |
define('WPSC_GATEWAY_DEBUG', false);
|
wpsc-admin/display-items.page.php
CHANGED
|
@@ -373,7 +373,7 @@ function wpsc_admin_products_list($category_id = 0) {
|
|
| 373 |
</span>
|
| 374 |
|
|
| 375 |
<span class="delete">
|
| 376 |
-
<a class='submitdelete'
|
| 377 |
title='<?php echo attribute_escape(__('Delete this product', 'wpsc')); ?>'
|
| 378 |
href='<?php echo wp_nonce_url("admin.php?wpsc_admin_action=delete_product&product={$product['id']}", 'delete_product_' . $product['id']); ?>'
|
| 379 |
onclick="if ( confirm(' <?php echo js_escape(sprintf( __("You are about to delete this product '%s'\n 'Cancel' to stop, 'OK' to delete."), $product['name'] )) ?>') ) { return true;}return false;"
|
| 373 |
</span>
|
| 374 |
|
|
| 375 |
<span class="delete">
|
| 376 |
+
<a class='submitdelete delete_button'
|
| 377 |
title='<?php echo attribute_escape(__('Delete this product', 'wpsc')); ?>'
|
| 378 |
href='<?php echo wp_nonce_url("admin.php?wpsc_admin_action=delete_product&product={$product['id']}", 'delete_product_' . $product['id']); ?>'
|
| 379 |
onclick="if ( confirm(' <?php echo js_escape(sprintf( __("You are about to delete this product '%s'\n 'Cancel' to stop, 'OK' to delete."), $product['name'] )) ?>') ) { return true;}return false;"
|
wpsc-admin/includes/display-items-functions.php
CHANGED
|
@@ -348,7 +348,7 @@ if(0 == $product_data['special_price']){
|
|
| 348 |
|
| 349 |
|
| 350 |
<input class='button-primary' style='float:left;' type='submit' name='submit' value='<?php if($product_data['id'] > 0) { _e('Update Product', 'wpsc'); } else { _e('Add New Product', 'wpsc'); } ?>' />
|
| 351 |
-
<a class='submitdelete' title='<?php echo attribute_escape(__('Delete this product')); ?>' href='<?php echo wp_nonce_url("page.php?wpsc_admin_action=delete_product&product={$product_data['id']}", 'delete_product_' . $product_data['id']); ?>' onclick="if ( confirm(' <?php echo js_escape(sprintf( __("You are about to delete this product '%s'\n 'Cancel' to stop, 'OK' to delete."), $product_data['name'] )) ?>') ) { return true;}return false;"><?php _e('Delete') ?></a>
|
| 352 |
<?php
|
| 353 |
}
|
| 354 |
|
|
@@ -1204,7 +1204,7 @@ function wpsc_main_product_image_menu($product_id) {
|
|
| 1204 |
<ul>
|
| 1205 |
|
| 1206 |
<li>
|
| 1207 |
-
<input type='radio' name='gallery_resize' value='1' id='gallery_resize1' class='image_resize' onclick='image_resize_extra_forms(this)' /> <label for='gallery_resize1'><?php echo __('use default size', 'wpsc');
|
| 1208 |
</label>
|
| 1209 |
|
| 1210 |
</li>
|
|
@@ -1231,9 +1231,12 @@ function wpsc_main_product_image_menu($product_id) {
|
|
| 1231 |
<a href='<?php echo htmlentities("admin.php?wpsc_admin_action=crop_image&imagename=".$main_image['image']."&imgheight=".$image_data[1]."&imgwidth=".$image_data[0]."&width=630&height=500&product_id=".$product_id); ?>' title='Crop Image' class='thickbox'>Crop This Image Using jCrop</a>
|
| 1232 |
|
| 1233 |
</li>
|
|
|
|
| 1234 |
<li>
|
| 1235 |
-
<
|
|
|
|
| 1236 |
</li>
|
|
|
|
| 1237 |
|
| 1238 |
</ul>
|
| 1239 |
</div>
|
| 348 |
|
| 349 |
|
| 350 |
<input class='button-primary' style='float:left;' type='submit' name='submit' value='<?php if($product_data['id'] > 0) { _e('Update Product', 'wpsc'); } else { _e('Add New Product', 'wpsc'); } ?>' />
|
| 351 |
+
<a class='submitdelete delete_button' title='<?php echo attribute_escape(__('Delete this product')); ?>' href='<?php echo wp_nonce_url("page.php?wpsc_admin_action=delete_product&product={$product_data['id']}", 'delete_product_' . $product_data['id']); ?>' onclick="if ( confirm(' <?php echo js_escape(sprintf( __("You are about to delete this product '%s'\n 'Cancel' to stop, 'OK' to delete."), $product_data['name'] )) ?>') ) { return true;}return false;"><?php _e('Delete') ?></a>
|
| 352 |
<?php
|
| 353 |
}
|
| 354 |
|
| 1204 |
<ul>
|
| 1205 |
|
| 1206 |
<li>
|
| 1207 |
+
<input type='radio' name='gallery_resize' value='1' id='gallery_resize1' class='image_resize' onclick='image_resize_extra_forms(this)' /> <label for='gallery_resize1'><?php echo __('use default size', 'wpsc'); ?> (<a href='<?php echo $presentation_link; ?>' title='<?php echo __('This is set on the Settings Page', 'wpsc'); ?>'><?php echo get_option('product_image_height'); ?>×<?php echo get_option('product_image_width'); ?>px</a>)
|
| 1208 |
</label>
|
| 1209 |
|
| 1210 |
</li>
|
| 1231 |
<a href='<?php echo htmlentities("admin.php?wpsc_admin_action=crop_image&imagename=".$main_image['image']."&imgheight=".$image_data[1]."&imgwidth=".$image_data[0]."&width=630&height=500&product_id=".$product_id); ?>' title='Crop Image' class='thickbox'>Crop This Image Using jCrop</a>
|
| 1232 |
|
| 1233 |
</li>
|
| 1234 |
+
|
| 1235 |
<li>
|
| 1236 |
+
<input type='submit' class='button-primary closeimagesettings' onclick='return false;' value='finish' />
|
| 1237 |
+
<a href='#' class='delete_primary_image delete_button'>Delete</a>
|
| 1238 |
</li>
|
| 1239 |
+
|
| 1240 |
|
| 1241 |
</ul>
|
| 1242 |
</div>
|
wpsc-admin/includes/settings-pages/admin.php
CHANGED
|
@@ -76,7 +76,9 @@ global $wpdb;
|
|
| 76 |
<?php echo __('Purchase Log Email', 'wpsc');?>:
|
| 77 |
</th>
|
| 78 |
<td>
|
| 79 |
-
<input class='text' name='wpsc_options[purch_log_email]' type='text' size='40' value='<?php echo get_option('purch_log_email'); ?>' />
|
|
|
|
|
|
|
| 80 |
</td>
|
| 81 |
</tr>
|
| 82 |
<tr>
|
|
@@ -85,6 +87,7 @@ global $wpdb;
|
|
| 85 |
</th>
|
| 86 |
<td>
|
| 87 |
<input class='text' name='wpsc_options[return_email]' type='text' size='40' value='<?php echo get_option('return_email'); ?>' />
|
|
|
|
| 88 |
</td>
|
| 89 |
</tr>
|
| 90 |
|
|
@@ -94,6 +97,8 @@ global $wpdb;
|
|
| 94 |
</th>
|
| 95 |
<td>
|
| 96 |
<input class='text' name='wpsc_options[return_name]' type='text' size='40' value='<?php echo get_option('return_name'); ?>' />
|
|
|
|
|
|
|
| 97 |
</td>
|
| 98 |
</tr>
|
| 99 |
|
| 76 |
<?php echo __('Purchase Log Email', 'wpsc');?>:
|
| 77 |
</th>
|
| 78 |
<td>
|
| 79 |
+
<input class='text' name='wpsc_options[purch_log_email]' type='text' size='40' value='<?php echo get_option('purch_log_email'); ?>' /><br />
|
| 80 |
+
<?php _e('i.e. this is the address where your purchase reports are sent.','wpsc'); ?>
|
| 81 |
+
|
| 82 |
</td>
|
| 83 |
</tr>
|
| 84 |
<tr>
|
| 87 |
</th>
|
| 88 |
<td>
|
| 89 |
<input class='text' name='wpsc_options[return_email]' type='text' size='40' value='<?php echo get_option('return_email'); ?>' />
|
| 90 |
+
<?php _e('i.e. this is the reply address contained in the purchase receipt sent to the buyer.','wpsc'); ?>
|
| 91 |
</td>
|
| 92 |
</tr>
|
| 93 |
|
| 97 |
</th>
|
| 98 |
<td>
|
| 99 |
<input class='text' name='wpsc_options[return_name]' type='text' size='40' value='<?php echo get_option('return_name'); ?>' />
|
| 100 |
+
<?php _e('i.e. this is the "from name" buyers will see in their purchase receipt. ','wpsc'); ?>
|
| 101 |
+
|
| 102 |
</td>
|
| 103 |
</tr>
|
| 104 |
|
wpsc-admin/includes/settings-pages/presentation.php
CHANGED
|
@@ -18,22 +18,22 @@ function options_categorylist() {
|
|
| 18 |
} else {
|
| 19 |
$selected = '';
|
| 20 |
}
|
| 21 |
-
$categorylist .= "<option value='list' ".$selected." >".__('Show
|
| 22 |
|
| 23 |
if(get_option('wpsc_default_category') == 'all+list') {
|
| 24 |
$selected = "selected='selected'";
|
| 25 |
} else {
|
| 26 |
$selected = '';
|
| 27 |
}
|
| 28 |
-
$categorylist .= "<option value='all+list' ".$selected." >".__('Show
|
| 29 |
-
|
| 30 |
foreach($group_data as $group) {
|
| 31 |
$cat_sql = "SELECT * FROM `".WPSC_TABLE_PRODUCT_CATEGORIES."` WHERE `group_id` IN ({$group['id']}) AND `active`='1'";
|
| 32 |
$category_data = $wpdb->get_results($cat_sql,ARRAY_A);
|
| 33 |
if($category_data != null) {
|
| 34 |
|
| 35 |
|
| 36 |
-
$categorylist .= "<optgroup label='{$group['name']}'>"
|
| 37 |
foreach((array)$category_data as $category) {
|
| 38 |
if(get_option('wpsc_default_category') == $category['id']) {
|
| 39 |
$selected = "selected='selected'";
|
|
@@ -285,7 +285,7 @@ global $wpdb;
|
|
| 285 |
<h3 class="form_group"><?php echo __('Product Page Settings', 'wpsc');?></h3>
|
| 286 |
<table class='wpsc_options form-table'>
|
| 287 |
<tr>
|
| 288 |
-
<th scope="row"><?php echo __('
|
| 289 |
<td>
|
| 290 |
<?php
|
| 291 |
$display_pnp = get_option('product_view');
|
|
@@ -413,7 +413,7 @@ global $wpdb;
|
|
| 413 |
?>
|
| 414 |
|
| 415 |
<tr>
|
| 416 |
-
<th scope="row"><?php echo __('
|
| 417 |
<td>
|
| 418 |
<?php
|
| 419 |
echo wpsc_list_product_themes();
|
|
@@ -422,7 +422,7 @@ global $wpdb;
|
|
| 422 |
</tr>
|
| 423 |
|
| 424 |
<tr>
|
| 425 |
-
<th scope="row"><?php echo __('
|
| 426 |
<td>
|
| 427 |
<?php echo options_categorylist(); ?>
|
| 428 |
</td>
|
|
@@ -446,17 +446,17 @@ global $wpdb;
|
|
| 446 |
?>
|
| 447 |
<tr>
|
| 448 |
<th scope="row">
|
| 449 |
-
<?php echo __('Sort
|
| 450 |
</th>
|
| 451 |
<td>
|
| 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
|
|
|
|
| 457 |
</td>
|
| 458 |
</tr>
|
| 459 |
-
|
| 460 |
<tr>
|
| 461 |
<th scope="row"><?php echo __('Show Breadcrumbs', 'wpsc');?>:</th>
|
| 462 |
<td>
|
| 18 |
} else {
|
| 19 |
$selected = '';
|
| 20 |
}
|
| 21 |
+
$categorylist .= "<option value='list' ".$selected." >".__('Show Category List', 'wpsc')."</option>";
|
| 22 |
|
| 23 |
if(get_option('wpsc_default_category') == 'all+list') {
|
| 24 |
$selected = "selected='selected'";
|
| 25 |
} else {
|
| 26 |
$selected = '';
|
| 27 |
}
|
| 28 |
+
$categorylist .= "<option value='all+list' ".$selected." >".__('Show All Products + Category List', 'wpsc')."</option>";
|
| 29 |
+
$categorylist .="<optgroup label='Select a default Product Category:'></optgroup>";
|
| 30 |
foreach($group_data as $group) {
|
| 31 |
$cat_sql = "SELECT * FROM `".WPSC_TABLE_PRODUCT_CATEGORIES."` WHERE `group_id` IN ({$group['id']}) AND `active`='1'";
|
| 32 |
$category_data = $wpdb->get_results($cat_sql,ARRAY_A);
|
| 33 |
if($category_data != null) {
|
| 34 |
|
| 35 |
|
| 36 |
+
$categorylist .= "<optgroup label='{$group['name']}'>";
|
| 37 |
foreach((array)$category_data as $category) {
|
| 38 |
if(get_option('wpsc_default_category') == $category['id']) {
|
| 39 |
$selected = "selected='selected'";
|
| 285 |
<h3 class="form_group"><?php echo __('Product Page Settings', 'wpsc');?></h3>
|
| 286 |
<table class='wpsc_options form-table'>
|
| 287 |
<tr>
|
| 288 |
+
<th scope="row"><?php echo __('Catalog View', 'wpsc');?>:</th>
|
| 289 |
<td>
|
| 290 |
<?php
|
| 291 |
$display_pnp = get_option('product_view');
|
| 413 |
?>
|
| 414 |
|
| 415 |
<tr>
|
| 416 |
+
<th scope="row"><?php echo __('Theme', 'wpsc');?>:</th>
|
| 417 |
<td>
|
| 418 |
<?php
|
| 419 |
echo wpsc_list_product_themes();
|
| 422 |
</tr>
|
| 423 |
|
| 424 |
<tr>
|
| 425 |
+
<th scope="row"><?php echo __('Product page displays', 'wpsc'); ?>:</th>
|
| 426 |
<td>
|
| 427 |
<?php echo options_categorylist(); ?>
|
| 428 |
</td>
|
| 446 |
?>
|
| 447 |
<tr>
|
| 448 |
<th scope="row">
|
| 449 |
+
<?php echo __('Sort Products By', 'wpsc');?>:
|
| 450 |
</th>
|
| 451 |
<td>
|
| 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>
|
| 461 |
<th scope="row"><?php echo __('Show Breadcrumbs', 'wpsc');?>:</th>
|
| 462 |
<td>
|
wpsc-admin/js/admin.js
CHANGED
|
@@ -530,7 +530,7 @@ jQuery(document).ready( function () {
|
|
| 530 |
});
|
| 531 |
});
|
| 532 |
|
| 533 |
-
jQuery('
|
| 534 |
jQuery(this).click( function() {
|
| 535 |
jQuery('.image_settings_box').hide();
|
| 536 |
});
|
| 530 |
});
|
| 531 |
});
|
| 532 |
|
| 533 |
+
jQuery('.closeimagesettings').livequery(function(){
|
| 534 |
jQuery(this).click( function() {
|
| 535 |
jQuery('.image_settings_box').hide();
|
| 536 |
});
|
wpsc-includes/ajax.functions.php
CHANGED
|
@@ -363,24 +363,30 @@ function wpsc_update_shipping_price() {
|
|
| 363 |
global $wpdb, $wpsc_cart;
|
| 364 |
$quote_shipping_method = $_POST['key1'];
|
| 365 |
$quote_shipping_option = $_POST['key'];
|
| 366 |
-
|
|
|
|
| 367 |
if($quote_shipping_method == '' && $quote_shipping_option == ''){
|
| 368 |
$quote_shipping_method = $wpsc_cart->selected_shipping_method;
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
$wpsc_cart->update_shipping($quote_shipping_method, $quote_shipping_option);
|
| 372 |
-
if($_POST['key1'] == '' && $_POST['key'] == ''){
|
| 373 |
-
$i=0;
|
| 374 |
foreach($wpsc_cart->cart_items as $cart_item){
|
| 375 |
$product_ship = $cart_item->calculate_shipping($quote_shipping_method);
|
| 376 |
|
| 377 |
echo "jQuery('#shipping_".$i."').html('".htmlspecialchars(nzshpcrt_currency_display($product_ship, false,true))."');\n\r";
|
| 378 |
$i++;
|
| 379 |
}
|
| 380 |
-
|
| 381 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 382 |
while (wpsc_have_shipping_methods()) : wpsc_the_shipping_method();
|
| 383 |
if (!wpsc_have_shipping_quotes()) { continue; } // Don't display shipping method if it doesn't have at least one quote
|
|
|
|
|
|
|
| 384 |
while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote();
|
| 385 |
$output .="<tr class='shipping_quotes'>";
|
| 386 |
$output .="<td colspan='3'>";
|
|
@@ -401,11 +407,15 @@ function wpsc_update_shipping_price() {
|
|
| 401 |
endwhile;
|
| 402 |
endwhile;
|
| 403 |
$output = str_replace(Array("\n","\r") , Array("\\n","\\r"),addslashes($output));
|
| 404 |
-
echo "jQuery('
|
| 405 |
-
echo "
|
|
|
|
|
|
|
| 406 |
// }
|
| 407 |
-
|
| 408 |
-
|
|
|
|
|
|
|
| 409 |
echo "jQuery(\"tr.total_tax\").show();\n\r";
|
| 410 |
echo "jQuery('#checkout_tax').html(\"<span class='pricedisplay'>".wpsc_cart_tax()."</span>\");\n\r";
|
| 411 |
}
|
| 363 |
global $wpdb, $wpsc_cart;
|
| 364 |
$quote_shipping_method = $_POST['key1'];
|
| 365 |
$quote_shipping_option = $_POST['key'];
|
| 366 |
+
|
| 367 |
+
//If no $_POST key variable means it is activated through shipping same as billing
|
| 368 |
if($quote_shipping_method == '' && $quote_shipping_option == ''){
|
| 369 |
$quote_shipping_method = $wpsc_cart->selected_shipping_method;
|
| 370 |
+
$i=0;
|
| 371 |
+
//if it is from shipping same as billing then per item shipping may need to be calculated...
|
|
|
|
|
|
|
|
|
|
| 372 |
foreach($wpsc_cart->cart_items as $cart_item){
|
| 373 |
$product_ship = $cart_item->calculate_shipping($quote_shipping_method);
|
| 374 |
|
| 375 |
echo "jQuery('#shipping_".$i."').html('".htmlspecialchars(nzshpcrt_currency_display($product_ship, false,true))."');\n\r";
|
| 376 |
$i++;
|
| 377 |
}
|
| 378 |
+
}else{
|
| 379 |
+
$wpsc_cart->update_shipping($quote_shipping_method, $quote_shipping_option);
|
| 380 |
+
echo "jQuery('.pricedisplay.checkout-shipping').html('".wpsc_cart_shipping()."');\n\r";
|
| 381 |
+
echo "jQuery('.pricedisplay.checkout-total').html('".wpsc_cart_total()."');\n\r";
|
| 382 |
+
exit();
|
| 383 |
+
}
|
| 384 |
+
|
| 385 |
+
//if(count($wpsc_cart->shipping_quotes) > 0 && $_POST['key1'] == '' && $_POST['key'] == ''){
|
| 386 |
while (wpsc_have_shipping_methods()) : wpsc_the_shipping_method();
|
| 387 |
if (!wpsc_have_shipping_quotes()) { continue; } // Don't display shipping method if it doesn't have at least one quote
|
| 388 |
+
|
| 389 |
+
$output .="<tr><td class='shipping_header' colspan='5'>".wpsc_shipping_method_name().__('- Choose a Shipping Rate', 'wpsc')."</td></tr>";
|
| 390 |
while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote();
|
| 391 |
$output .="<tr class='shipping_quotes'>";
|
| 392 |
$output .="<td colspan='3'>";
|
| 407 |
endwhile;
|
| 408 |
endwhile;
|
| 409 |
$output = str_replace(Array("\n","\r") , Array("\\n","\\r"),addslashes($output));
|
| 410 |
+
echo "var shipping =jQuery('td.shipping_header').parent('tr');";
|
| 411 |
+
echo "shipping.nextAll('tr').remove();\n\r";
|
| 412 |
+
echo "shipping.parent().append(\"".$output."\");\n\r";
|
| 413 |
+
echo "shipping.empty();";
|
| 414 |
// }
|
| 415 |
+
|
| 416 |
+
$wpsc_cart->update_shipping($quote_shipping_method, $quote_shipping_option);
|
| 417 |
+
|
| 418 |
+
if(wpsc_cart_tax(false) > 0){
|
| 419 |
echo "jQuery(\"tr.total_tax\").show();\n\r";
|
| 420 |
echo "jQuery('#checkout_tax').html(\"<span class='pricedisplay'>".wpsc_cart_tax()."</span>\");\n\r";
|
| 421 |
}
|
wpsc-includes/cart.class.php
CHANGED
|
@@ -481,7 +481,9 @@ function wpsc_have_morethanone_shipping_quote(){
|
|
| 481 |
$wpsc_cart->rewind_shipping_methods();
|
| 482 |
$wpsc_cart->update_shipping('flatrate', $name);
|
| 483 |
return false;
|
|
|
|
| 484 |
}
|
|
|
|
| 485 |
return true;
|
| 486 |
}
|
| 487 |
|
|
@@ -655,7 +657,7 @@ class wpsc_cart {
|
|
| 655 |
|
| 656 |
$this->shipping_methods = get_option('custom_shipping_options');
|
| 657 |
$this->shipping_method_count = count($this->shipping_methods);
|
| 658 |
-
|
| 659 |
if((get_option('do_not_use_shipping') != 1) && (count($this->shipping_methods) > 0) ) {
|
| 660 |
if(array_search($this->selected_shipping_method, (array)$this->shipping_methods) === false) {
|
| 661 |
//unset($this->selected_shipping_method);
|
|
@@ -668,6 +670,7 @@ class wpsc_cart {
|
|
| 668 |
$this->shipping_quotes = $wpsc_shipping_modules[$this->selected_shipping_method]->getQuote();
|
| 669 |
}
|
| 670 |
} else {
|
|
|
|
| 671 |
// otherwise select the first one with any quotes
|
| 672 |
foreach((array)$custom_shipping as $shipping_module) {
|
| 673 |
// if the shipping module does not require a weight, or requires one and the weight is larger than zero
|
|
@@ -682,7 +685,7 @@ class wpsc_cart {
|
|
| 682 |
|
| 683 |
}
|
| 684 |
}
|
| 685 |
-
|
| 686 |
//echo('<pre>'.print_r($custom_shipping,true).'</pre>');
|
| 687 |
}
|
| 688 |
|
|
@@ -714,20 +717,25 @@ class wpsc_cart {
|
|
| 714 |
*/
|
| 715 |
function update_shipping($method, $option) {
|
| 716 |
global $wpdb, $wpsc_shipping_modules;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 717 |
$this->selected_shipping_method = $method;
|
| 718 |
-
if(is_callable(array($wpsc_shipping_modules[$
|
| 719 |
$this->shipping_quotes = $wpsc_shipping_modules[$method]->getQuote();
|
| 720 |
-
}
|
| 721 |
//exit('<pre>'.print_r($this->shipping_quotes,true).'</pre> quotes');
|
| 722 |
$this->selected_shipping_option = $option;
|
| 723 |
|
| 724 |
foreach($this->cart_items as $key => $cart_item) {
|
| 725 |
-
$this->cart_items[$key]->
|
| 726 |
}
|
| 727 |
$this->clear_cache();
|
| 728 |
$this->get_shipping_option();
|
| 729 |
}
|
| 730 |
|
|
|
|
| 731 |
/**
|
| 732 |
* get_tax_rate method, gets the tax rate as a percentage, based on the selected country and region
|
| 733 |
* @access public
|
| 481 |
$wpsc_cart->rewind_shipping_methods();
|
| 482 |
$wpsc_cart->update_shipping('flatrate', $name);
|
| 483 |
return false;
|
| 484 |
+
|
| 485 |
}
|
| 486 |
+
|
| 487 |
return true;
|
| 488 |
}
|
| 489 |
|
| 657 |
|
| 658 |
$this->shipping_methods = get_option('custom_shipping_options');
|
| 659 |
$this->shipping_method_count = count($this->shipping_methods);
|
| 660 |
+
|
| 661 |
if((get_option('do_not_use_shipping') != 1) && (count($this->shipping_methods) > 0) ) {
|
| 662 |
if(array_search($this->selected_shipping_method, (array)$this->shipping_methods) === false) {
|
| 663 |
//unset($this->selected_shipping_method);
|
| 670 |
$this->shipping_quotes = $wpsc_shipping_modules[$this->selected_shipping_method]->getQuote();
|
| 671 |
}
|
| 672 |
} else {
|
| 673 |
+
// exit('Here <pre>'.print_r($custom_shipping, true).'</pre>');
|
| 674 |
// otherwise select the first one with any quotes
|
| 675 |
foreach((array)$custom_shipping as $shipping_module) {
|
| 676 |
// if the shipping module does not require a weight, or requires one and the weight is larger than zero
|
| 685 |
|
| 686 |
}
|
| 687 |
}
|
| 688 |
+
// exit('<pre>'.print_r($this, true).'</pre>');
|
| 689 |
//echo('<pre>'.print_r($custom_shipping,true).'</pre>');
|
| 690 |
}
|
| 691 |
|
| 717 |
*/
|
| 718 |
function update_shipping($method, $option) {
|
| 719 |
global $wpdb, $wpsc_shipping_modules;
|
| 720 |
+
|
| 721 |
+
// if($method == 'weightrate') {
|
| 722 |
+
// exit("<pre>".print_r(debug_backtrace(),true)."</pre>");
|
| 723 |
+
// }
|
| 724 |
$this->selected_shipping_method = $method;
|
| 725 |
+
//if(is_callable(array($wpsc_shipping_modules[$this->selected_shipping_method]), "getQuote" )) {
|
| 726 |
$this->shipping_quotes = $wpsc_shipping_modules[$method]->getQuote();
|
| 727 |
+
//}
|
| 728 |
//exit('<pre>'.print_r($this->shipping_quotes,true).'</pre> quotes');
|
| 729 |
$this->selected_shipping_option = $option;
|
| 730 |
|
| 731 |
foreach($this->cart_items as $key => $cart_item) {
|
| 732 |
+
$this->cart_items[$key]->refresh_item();
|
| 733 |
}
|
| 734 |
$this->clear_cache();
|
| 735 |
$this->get_shipping_option();
|
| 736 |
}
|
| 737 |
|
| 738 |
+
|
| 739 |
/**
|
| 740 |
* get_tax_rate method, gets the tax rate as a percentage, based on the selected country and region
|
| 741 |
* @access public
|
