Category addition bug and pay page fix

This commit is contained in:
Mike Jolley 2011-10-13 13:25:24 +01:00
parent f8447c7a46
commit d61167f060
9 changed files with 16 additions and 10 deletions

View File

@ -140,10 +140,12 @@ function woocommerce_category_thumbnail_field_save( $term_id, $tt_id, $taxonomy
/**
* Reorder on term insertion
*/
add_action("create_term", 'woocommerce_create_term');
add_action("create_term", 'woocommerce_create_term', 5, 3);
function woocommerce_create_term( $term_id, $tt_id, $taxonomy ) {
if (!$taxonomy=='product_cat' && !strstr($taxonomy, 'pa_')) return;
$next_id = null;
$term = get_term($term_id, $taxonomy);
@ -164,7 +166,7 @@ function woocommerce_create_term( $term_id, $tt_id, $taxonomy ) {
/**
* Delete terms metas on deletion
*/
add_action("delete_product_term", 'woocommerce_delete_term');
add_action("delete_product_term", 'woocommerce_delete_term', 5, 3);
function woocommerce_delete_term( $term_id, $tt_id, $taxonomy ) {

View File

@ -138,7 +138,7 @@ function woocommerce_order_items_meta_box($post) {
<tbody id="order_items_list">
<?php $loop = 0; if (sizeof($order_items)>0 && isset($order_items[0]['id'])) foreach ($order_items as $item) :
if (isset($item['variation_id']) && $item['variation_id'] > 0) :
$_product = &new woocommerce_product_variation( $item['variation_id'] );
else :

View File

@ -14,8 +14,8 @@
#woocommerce-order-items .buttons button{margin:2px 0 0 0;}
#woocommerce-order-items .buttons-alt{float:right;padding-right:6px;}
#woocommerce-order-items h3 small{color:#999;}
dl.totals{margin:6px 6px 0;float:left;}dl.totals dt{float:left;width:100%;font-size:1.2em;font-weight:bold;line-height:2em;}
dl.totals dd{line-height:2em;font-size:1.2em;float:left;width:100%;}dl.totals dd input{width:100%;vertical-align:middle;float:left;font-size:1em;margin:0 !important;}
dl.totals{margin:6px 6px 0;float:left;}dl.totals dt{float:left;width:100%;font-size:1.2em;font-weight:bold;line-height:2em;margin:0;padding:0;}
dl.totals dd{line-height:2em;font-size:1.2em;float:left;width:100%;margin:0;padding:0;}dl.totals dd input{width:100%;vertical-align:middle;float:left;font-size:1em;margin:0 !important;}
dl.totals dd input.first{width:49%;float:left;}
dl.totals dd input.last{width:49%;float:right;}
.woocommerce_order_items_wrapper{margin:0;}.woocommerce_order_items_wrapper table.woocommerce_order_items{width:100%;background:#fff;}.woocommerce_order_items_wrapper table.woocommerce_order_items thead th{background:#ECECEC;padding:8px 8px;font-size:11px;text-align:left;}

View File

@ -78,12 +78,16 @@ dl.totals {
font-size: 1.2em;
font-weight: bold;
line-height: 2em;
margin: 0;
padding: 0;
}
dd {
line-height: 2em;
font-size: 1.2em;
float: left;
width: 100%;
margin: 0;
padding: 0;
input {
width: 100%;
vertical-align: middle;

View File

@ -57,6 +57,7 @@ jQuery( function($){
if (!itemCost) itemCost = 0;
if (!itemTax) itemTax = 0;
if (!itemQty) itemQty = 0;
totalItemTax = 0;

File diff suppressed because one or more lines are too long

View File

@ -80,6 +80,7 @@ For further documentation on using WooCommerce, please sign up for free at http:
* Admin JS cleanup
* Removed error message when clicking buttons to view variations/grouped
* Drag and drop term ordering (so variation options can be sorted)
* Pay page after invoicing fix
= 1.0.3 - 06/10/2011 =
* Several minor fixes/tweaks

View File

@ -40,9 +40,7 @@ function woocommerce_pay() {
// Update payment method
if ($order->order_total > 0 ) :
$payment_method = woocommerce_clean($_POST['payment_method']);
$data = (array) maybe_unserialize( get_post_meta( $order_id, 'order_data', true ) );
$data['payment_method'] = $payment_method;
update_post_meta( $order_id, 'order_data', $data );
update_post_meta( $order_id, '_payment_method', $payment_method);
$available_gateways = $woocommerce->payment_gateways->get_available_payment_gateways();

View File

@ -215,7 +215,7 @@ function woocommerce_add_order_item() {
<td class="center">
<input type="hidden" name="item_id[<?php echo $index; ?>]" value="<?php echo esc_attr( $_product->id ); ?>" />
<input type="hidden" name="item_name[<?php echo $index; ?>]" value="<?php echo esc_attr( $_product->get_title() ); ?>" />
<input type="hidden" name="item_variation[<?php echo $loop; ?>]" value="<?php if (isset($_product->variation_id)) echo $_product->variation_id; ?>" />
<input type="hidden" name="item_variation[<?php echo $index; ?>]" value="<?php if (isset($_product->variation_id)) echo $_product->variation_id; ?>" />
<button type="button" class="remove_row button">&times;</button>
</td>
</tr>