2014-07-28 14:50:11 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Admin View: Bulk Edit Products
|
|
|
|
*/
|
|
|
|
|
2014-07-28 15:16:35 +00:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit; // Exit if accessed directly
|
|
|
|
}
|
2014-07-28 14:50:11 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
|
2013-07-24 18:55:02 +00:00
|
|
|
<fieldset class="inline-edit-col-right">
|
|
|
|
<div id="woocommerce-fields-bulk" class="inline-edit-col">
|
|
|
|
|
|
|
|
<h4><?php _e( 'Product Data', 'woocommerce' ); ?></h4>
|
|
|
|
|
|
|
|
<?php do_action( 'woocommerce_product_bulk_edit_start' ); ?>
|
|
|
|
|
|
|
|
<div class="inline-edit-group">
|
|
|
|
<label class="alignleft">
|
|
|
|
<span class="title"><?php _e( 'Price', 'woocommerce' ); ?></span>
|
2014-11-04 19:49:15 +00:00
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="change_regular_price change_to" name="change_regular_price">
|
2013-07-24 18:55:02 +00:00
|
|
|
<?php
|
|
|
|
$options = array(
|
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
|
|
|
'1' => __( 'Change to:', 'woocommerce' ),
|
|
|
|
'2' => __( 'Increase by (fixed amount or %):', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'3' => __( 'Decrease by (fixed amount or %):', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
);
|
2016-08-27 04:29:49 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
2013-11-20 19:11:59 +00:00
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
2013-07-24 18:55:02 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
2014-11-21 06:37:14 +00:00
|
|
|
<label class="change-input">
|
|
|
|
<input type="text" name="_regular_price" class="text regular_price" placeholder="<?php echo sprintf( __( 'Enter price (%s)', 'woocommerce' ), get_woocommerce_currency_symbol() ); ?>" value="" />
|
2014-11-04 19:49:15 +00:00
|
|
|
</label>
|
2013-07-24 18:55:02 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="inline-edit-group">
|
|
|
|
<label class="alignleft">
|
2014-11-04 19:49:15 +00:00
|
|
|
<span class="title"><?php _e( 'Sale', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="change_sale_price change_to" name="change_sale_price">
|
2013-07-24 18:55:02 +00:00
|
|
|
<?php
|
|
|
|
$options = array(
|
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
|
|
|
'1' => __( 'Change to:', 'woocommerce' ),
|
|
|
|
'2' => __( 'Increase by (fixed amount or %):', 'woocommerce' ),
|
|
|
|
'3' => __( 'Decrease by (fixed amount or %):', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'4' => __( 'Decrease regular price by (fixed amount or %):', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
);
|
2014-11-04 19:49:15 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
2013-11-20 19:11:59 +00:00
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
2013-07-24 18:55:02 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
2014-11-21 06:37:14 +00:00
|
|
|
<label class="change-input">
|
|
|
|
<input type="text" name="_sale_price" class="text sale_price" placeholder="<?php echo sprintf( __( 'Enter sale price (%s)', 'woocommerce' ), get_woocommerce_currency_symbol() ); ?>" value="" />
|
2013-07-24 18:55:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2015-09-21 19:36:46 +00:00
|
|
|
<?php if ( wc_tax_enabled() ) : ?>
|
|
|
|
<label>
|
|
|
|
<span class="title"><?php _e( 'Tax Status', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="tax_status" name="_tax_status">
|
|
|
|
<?php
|
|
|
|
$options = array(
|
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
|
|
|
'taxable' => __( 'Taxable', 'woocommerce' ),
|
|
|
|
'shipping' => __( 'Shipping only', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'none' => _x( 'None', 'Tax status', 'woocommerce' ),
|
2015-09-21 19:36:46 +00:00
|
|
|
);
|
2016-08-27 04:29:49 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
2015-09-21 19:36:46 +00:00
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
2013-07-30 13:43:45 +00:00
|
|
|
|
2015-09-21 19:36:46 +00:00
|
|
|
<label>
|
|
|
|
<span class="title"><?php _e( 'Tax Class', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="tax_class" name="_tax_class">
|
|
|
|
<?php
|
|
|
|
$options = array(
|
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'standard' => __( 'Standard', 'woocommerce' ),
|
2015-09-21 19:36:46 +00:00
|
|
|
);
|
2013-07-30 13:43:45 +00:00
|
|
|
|
2015-09-21 19:36:46 +00:00
|
|
|
$tax_classes = WC_Tax::get_tax_classes();
|
2013-07-30 13:43:45 +00:00
|
|
|
|
2016-06-06 18:39:23 +00:00
|
|
|
if ( ! empty( $tax_classes ) )
|
2015-09-21 19:36:46 +00:00
|
|
|
foreach ( $tax_classes as $class ) {
|
|
|
|
$options[ sanitize_title( $class ) ] = esc_html( $class );
|
|
|
|
}
|
2013-07-30 13:43:45 +00:00
|
|
|
|
2015-09-21 19:36:46 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
<?php endif; ?>
|
2013-07-30 13:43:45 +00:00
|
|
|
|
2013-08-22 10:58:03 +00:00
|
|
|
<?php if ( wc_product_weight_enabled() ) : ?>
|
2013-07-24 18:55:02 +00:00
|
|
|
<div class="inline-edit-group">
|
|
|
|
<label class="alignleft">
|
2014-11-04 19:49:15 +00:00
|
|
|
<span class="title"><?php _e( 'Weight', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="change_weight change_to" name="change_weight">
|
2013-07-24 18:55:02 +00:00
|
|
|
<?php
|
|
|
|
$options = array(
|
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'1' => __( 'Change to:', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
);
|
2014-11-04 19:49:15 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
2016-09-01 20:50:14 +00:00
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
2013-07-24 18:55:02 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
2014-11-21 06:37:14 +00:00
|
|
|
<label class="change-input">
|
2016-09-01 20:50:14 +00:00
|
|
|
<input type="text" name="_weight" class="text weight" placeholder="<?php echo sprintf( __( '%1$s (%2$s)', 'woocommerce' ), wc_format_localized_decimal( 0 ), get_option( 'woocommerce_weight_unit' ) ); ?>" value="">
|
2013-07-24 18:55:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
2013-08-22 10:58:03 +00:00
|
|
|
<?php if ( wc_product_dimensions_enabled() ) : ?>
|
2013-07-24 18:55:02 +00:00
|
|
|
<div class="inline-edit-group dimensions">
|
|
|
|
<label class="alignleft">
|
2014-11-04 19:49:15 +00:00
|
|
|
<span class="title"><?php _e( 'L/W/H', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="change_dimensions change_to" name="change_dimensions">
|
2013-07-24 18:55:02 +00:00
|
|
|
<?php
|
|
|
|
$options = array(
|
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'1' => __( 'Change to:', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
);
|
2014-11-04 19:49:15 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
2016-09-01 20:50:14 +00:00
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
2013-07-24 18:55:02 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
2014-11-21 06:37:14 +00:00
|
|
|
<label class="change-input">
|
|
|
|
<input type="text" name="_length" class="text length" placeholder="<?php echo sprintf( __( 'Length (%s)', 'woocommerce' ), get_option( 'woocommerce_dimension_unit' ) ); ?>" value="">
|
|
|
|
<input type="text" name="_width" class="text width" placeholder="<?php echo sprintf( __( 'Width (%s)', 'woocommerce' ), get_option( 'woocommerce_dimension_unit' ) ); ?>" value="">
|
|
|
|
<input type="text" name="_height" class="text height" placeholder="<?php echo sprintf( __( 'Height (%s)', 'woocommerce' ), get_option( 'woocommerce_dimension_unit' ) ); ?>" value="">
|
|
|
|
</label>
|
2013-07-24 18:55:02 +00:00
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<label>
|
2014-11-04 19:49:15 +00:00
|
|
|
<span class="title"><?php _e( 'Shipping class', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="shipping_class" name="_shipping_class">
|
|
|
|
<option value=""><?php _e( '— No Change —', 'woocommerce' ); ?></option>
|
|
|
|
<option value="_no_shipping_class"><?php _e( 'No shipping class', 'woocommerce' ); ?></option>
|
|
|
|
<?php
|
|
|
|
foreach ( $shipping_class as $key => $value ) {
|
2016-09-01 20:50:14 +00:00
|
|
|
echo '<option value="' . esc_attr( $value->slug ) . '">' . $value->name . '</option>';
|
2014-11-04 19:49:15 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label>
|
|
|
|
<span class="title"><?php _e( 'Visibility', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="visibility" name="_visibility">
|
2013-07-24 18:55:02 +00:00
|
|
|
<?php
|
|
|
|
$options = array(
|
2014-11-04 19:49:15 +00:00
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
'visible' => __( 'Catalog & search', 'woocommerce' ),
|
|
|
|
'catalog' => __( 'Catalog', 'woocommerce' ),
|
2014-11-04 19:49:15 +00:00
|
|
|
'search' => __( 'Search', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'hidden' => __( 'Hidden', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
);
|
2014-11-04 19:49:15 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
2016-09-01 20:50:14 +00:00
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
2013-07-24 18:55:02 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
<label>
|
2014-11-04 19:49:15 +00:00
|
|
|
<span class="title"><?php _e( 'Featured', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="featured" name="_featured">
|
2013-07-24 18:55:02 +00:00
|
|
|
<?php
|
|
|
|
$options = array(
|
2014-11-04 19:49:15 +00:00
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
'yes' => __( 'Yes', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'no' => __( 'No', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
);
|
2016-08-27 04:29:49 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
2016-09-01 20:50:14 +00:00
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
2013-07-24 18:55:02 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label>
|
2014-11-04 19:49:15 +00:00
|
|
|
<span class="title"><?php _e( 'In stock?', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="stock_status" name="_stock_status">
|
2013-07-24 18:55:02 +00:00
|
|
|
<?php
|
|
|
|
$options = array(
|
2014-11-04 19:49:15 +00:00
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
|
|
|
'instock' => __( 'In stock', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'outofstock' => __( 'Out of stock', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
);
|
2014-11-04 19:49:15 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
2016-09-01 20:50:14 +00:00
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
2013-07-24 18:55:02 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
2014-11-04 19:49:15 +00:00
|
|
|
<?php if ( 'yes' == get_option( 'woocommerce_manage_stock' ) ) : ?>
|
2013-07-30 13:43:45 +00:00
|
|
|
|
2013-07-24 18:55:02 +00:00
|
|
|
<label>
|
2014-11-04 19:49:15 +00:00
|
|
|
<span class="title"><?php _e( 'Manage stock?', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="manage_stock" name="_manage_stock">
|
2013-07-24 18:55:02 +00:00
|
|
|
<?php
|
|
|
|
$options = array(
|
2014-11-04 19:49:15 +00:00
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
'yes' => __( 'Yes', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'no' => __( 'No', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
);
|
2014-11-04 19:49:15 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
2016-09-01 20:50:14 +00:00
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
2013-07-24 18:55:02 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
|
2013-07-30 13:43:45 +00:00
|
|
|
<div class="inline-edit-group">
|
2013-07-24 18:55:02 +00:00
|
|
|
<label class="alignleft stock_qty_field">
|
2014-11-04 19:49:15 +00:00
|
|
|
<span class="title"><?php _e( 'Stock Qty', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="change_stock change_to" name="change_stock">
|
2013-07-24 18:55:02 +00:00
|
|
|
<?php
|
|
|
|
$options = array(
|
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'1' => __( 'Change to:', 'woocommerce' ),
|
2013-07-24 18:55:02 +00:00
|
|
|
);
|
2014-11-04 19:49:15 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
2016-09-01 20:50:14 +00:00
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
2013-07-24 18:55:02 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
2014-11-21 06:37:14 +00:00
|
|
|
<label class="change-input">
|
2015-08-05 16:51:44 +00:00
|
|
|
<input type="text" name="_stock" class="text stock" placeholder="<?php esc_attr_e( 'Stock Qty', 'woocommerce' ); ?>" step="any" value="">
|
2013-07-24 18:55:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2013-09-06 10:17:41 +00:00
|
|
|
<label>
|
2014-11-04 19:49:15 +00:00
|
|
|
<span class="title"><?php _e( 'Backorders?', 'woocommerce' ); ?></span>
|
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="backorders" name="_backorders">
|
2013-09-06 10:17:41 +00:00
|
|
|
<?php
|
|
|
|
$options = array(
|
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
|
|
|
'no' => __( 'Do not allow', 'woocommerce' ),
|
|
|
|
'notify' => __( 'Allow, but notify customer', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'yes' => __( 'Allow', 'woocommerce' ),
|
2013-09-06 10:17:41 +00:00
|
|
|
);
|
2014-11-04 19:49:15 +00:00
|
|
|
foreach ( $options as $key => $value ) {
|
2016-09-01 20:50:14 +00:00
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . $value . '</option>';
|
2013-09-06 10:17:41 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
|
2013-07-30 13:43:45 +00:00
|
|
|
<?php endif; ?>
|
2013-07-24 18:55:02 +00:00
|
|
|
|
2014-04-18 20:16:22 +00:00
|
|
|
<label>
|
|
|
|
<span class="title"><?php esc_html_e( 'Sold Individually?', 'woocommerce' ); ?></span>
|
2014-11-04 19:49:15 +00:00
|
|
|
<span class="input-text-wrap">
|
|
|
|
<select class="sold_individually" name="_sold_individually">
|
2014-04-18 20:16:22 +00:00
|
|
|
<?php
|
|
|
|
$options = array(
|
|
|
|
'' => __( '— No Change —', 'woocommerce' ),
|
|
|
|
'yes' => __( 'Yes', 'woocommerce' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'no' => __( 'No', 'woocommerce' ),
|
2014-04-18 20:16:22 +00:00
|
|
|
);
|
|
|
|
foreach ( $options as $key => $value ) {
|
|
|
|
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
|
2013-07-30 13:43:45 +00:00
|
|
|
<?php do_action( 'woocommerce_product_bulk_edit_end' ); ?>
|
2013-07-24 18:55:02 +00:00
|
|
|
|
|
|
|
<input type="hidden" name="woocommerce_bulk_edit" value="1" />
|
|
|
|
<input type="hidden" name="woocommerce_bulk_edit_nonce" value="<?php echo wp_create_nonce( 'woocommerce_bulk_edit_nonce' ); ?>" />
|
|
|
|
</div>
|
2014-04-18 20:16:22 +00:00
|
|
|
</fieldset>
|