html-admin-dashboard-setup.php
4 years ago
html-admin-page-addons-category-nav.php
4 years ago
html-admin-page-addons.php
3 years ago
html-admin-page-product-export.php
5 years ago
html-admin-page-reports.php
5 years ago
html-admin-page-status-logs-db.php
5 years ago
html-admin-page-status-logs.php
4 years ago
html-admin-page-status-report.php
3 years ago
html-admin-page-status-tools.php
3 years ago
html-admin-page-status.php
8 years ago
html-admin-settings.php
5 years ago
html-bulk-edit-product.php
3 years ago
html-email-template-preview.php
7 years ago
html-notice-base-table-missing.php
5 years ago
html-notice-custom.php
8 years ago
html-notice-download-dir-sync-complete.php
4 years ago
html-notice-install.php
5 years ago
html-notice-legacy-shipping.php
7 years ago
html-notice-maxmind-license-key.php
6 years ago
html-notice-no-shipping-methods.php
7 years ago
html-notice-redirect-only-download.php
4 years ago
html-notice-regenerating-lookup-table.php
5 years ago
html-notice-regenerating-thumbnails.php
8 years ago
html-notice-secure-connection.php
8 years ago
html-notice-template-check.php
5 years ago
html-notice-update.php
7 years ago
html-notice-updated.php
7 years ago
html-notice-updating.php
6 years ago
html-notice-uploads-directory-is-unprotected.php
3 years ago
html-notice-wp-php-minimum-requirements.php
6 years ago
html-quick-edit-product.php
5 years ago
html-report-by-date.php
5 years ago
html-quick-edit-product.php
220 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin View: Quick Edit Product |
| 4 | * |
| 5 | * @package WooCommerce\Admin\Notices |
| 6 | */ |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | ?> |
| 10 | |
| 11 | <fieldset class="inline-edit-col-left"> |
| 12 | <div id="woocommerce-fields" class="inline-edit-col"> |
| 13 | |
| 14 | <h4><?php esc_html_e( 'Product data', 'woocommerce' ); ?></h4> |
| 15 | |
| 16 | <?php do_action( 'woocommerce_product_quick_edit_start' ); ?> |
| 17 | |
| 18 | <?php if ( wc_product_sku_enabled() ) : ?> |
| 19 | |
| 20 | <label> |
| 21 | <span class="title"><?php esc_html_e( 'SKU', 'woocommerce' ); ?></span> |
| 22 | <span class="input-text-wrap"> |
| 23 | <input type="text" name="_sku" class="text sku" value=""> |
| 24 | </span> |
| 25 | </label> |
| 26 | <br class="clear" /> |
| 27 | |
| 28 | <?php endif; ?> |
| 29 | |
| 30 | <div class="price_fields"> |
| 31 | <label> |
| 32 | <span class="title"><?php esc_html_e( 'Price', 'woocommerce' ); ?></span> |
| 33 | <span class="input-text-wrap"> |
| 34 | <input type="text" name="_regular_price" class="text wc_input_price regular_price" placeholder="<?php esc_attr_e( 'Regular price', 'woocommerce' ); ?>" value=""> |
| 35 | </span> |
| 36 | </label> |
| 37 | <br class="clear" /> |
| 38 | <label> |
| 39 | <span class="title"><?php esc_html_e( 'Sale', 'woocommerce' ); ?></span> |
| 40 | <span class="input-text-wrap"> |
| 41 | <input type="text" name="_sale_price" class="text wc_input_price sale_price" placeholder="<?php esc_attr_e( 'Sale price', 'woocommerce' ); ?>" value=""> |
| 42 | </span> |
| 43 | </label> |
| 44 | <br class="clear" /> |
| 45 | </div> |
| 46 | |
| 47 | <?php if ( wc_tax_enabled() ) : ?> |
| 48 | <label class="alignleft"> |
| 49 | <span class="title"><?php esc_html_e( 'Tax status', 'woocommerce' ); ?></span> |
| 50 | <span class="input-text-wrap"> |
| 51 | <select class="tax_status" name="_tax_status"> |
| 52 | <?php |
| 53 | $options = array( |
| 54 | 'taxable' => __( 'Taxable', 'woocommerce' ), |
| 55 | 'shipping' => __( 'Shipping only', 'woocommerce' ), |
| 56 | 'none' => _x( 'None', 'Tax status', 'woocommerce' ), |
| 57 | ); |
| 58 | foreach ( $options as $key => $value ) { |
| 59 | echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>'; |
| 60 | } |
| 61 | ?> |
| 62 | </select> |
| 63 | </span> |
| 64 | </label> |
| 65 | <br class="clear" /> |
| 66 | <label class="alignleft"> |
| 67 | <span class="title"><?php esc_html_e( 'Tax class', 'woocommerce' ); ?></span> |
| 68 | <span class="input-text-wrap"> |
| 69 | <select class="tax_class" name="_tax_class"> |
| 70 | <?php |
| 71 | $options = array( |
| 72 | '' => __( 'Standard', 'woocommerce' ), |
| 73 | ); |
| 74 | |
| 75 | $tax_classes = WC_Tax::get_tax_classes(); |
| 76 | |
| 77 | if ( ! empty( $tax_classes ) ) { |
| 78 | foreach ( $tax_classes as $class ) { |
| 79 | $options[ sanitize_title( $class ) ] = esc_html( $class ); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | foreach ( $options as $key => $value ) { |
| 84 | echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>'; |
| 85 | } |
| 86 | ?> |
| 87 | </select> |
| 88 | </span> |
| 89 | </label> |
| 90 | <br class="clear" /> |
| 91 | <?php endif; ?> |
| 92 | |
| 93 | <?php if ( wc_product_weight_enabled() || wc_product_dimensions_enabled() ) : ?> |
| 94 | <div class="dimension_fields"> |
| 95 | |
| 96 | <?php if ( wc_product_weight_enabled() ) : ?> |
| 97 | <label> |
| 98 | <span class="title"><?php esc_html_e( 'Weight', 'woocommerce' ); ?></span> |
| 99 | <span class="input-text-wrap"> |
| 100 | <input type="text" name="_weight" class="text weight" placeholder="<?php echo esc_attr( wc_format_localized_decimal( 0 ) ); ?>" value=""> |
| 101 | </span> |
| 102 | </label> |
| 103 | <br class="clear" /> |
| 104 | <?php endif; ?> |
| 105 | |
| 106 | <?php if ( wc_product_dimensions_enabled() ) : ?> |
| 107 | <div class="inline-edit-group dimensions"> |
| 108 | <div> |
| 109 | <span class="title"><?php esc_html_e( 'L/W/H', 'woocommerce' ); ?></span> |
| 110 | <span class="input-text-wrap"> |
| 111 | <input type="text" name="_length" class="text wc_input_decimal length" placeholder="<?php esc_attr_e( 'Length', 'woocommerce' ); ?>" value=""> |
| 112 | <input type="text" name="_width" class="text wc_input_decimal width" placeholder="<?php esc_attr_e( 'Width', 'woocommerce' ); ?>" value=""> |
| 113 | <input type="text" name="_height" class="text wc_input_decimal height" placeholder="<?php esc_attr_e( 'Height', 'woocommerce' ); ?>" value=""> |
| 114 | </span> |
| 115 | </div> |
| 116 | </div> |
| 117 | <?php endif; ?> |
| 118 | |
| 119 | </div> |
| 120 | <?php endif; ?> |
| 121 | |
| 122 | <div class="inline-edit-group"> |
| 123 | <span class="title"><?php esc_html_e( 'Shipping class', 'woocommerce' ); ?></span> |
| 124 | <span class="input-text-wrap"> |
| 125 | <select class="shipping_class" name="_shipping_class"> |
| 126 | <option value="_no_shipping_class"><?php esc_html_e( 'No shipping class', 'woocommerce' ); ?></option> |
| 127 | <?php |
| 128 | foreach ( $shipping_class as $key => $value ) { |
| 129 | echo '<option value="' . esc_attr( $value->slug ) . '">' . esc_html( $value->name ) . '</option>'; |
| 130 | } |
| 131 | ?> |
| 132 | </select> |
| 133 | </span> |
| 134 | </div> |
| 135 | |
| 136 | <div class="inline-edit-group"> |
| 137 | <label class="alignleft"> |
| 138 | <span class="title"><?php esc_html_e( 'Visibility', 'woocommerce' ); ?></span> |
| 139 | <span class="input-text-wrap"> |
| 140 | <select class="visibility" name="_visibility"> |
| 141 | <?php |
| 142 | $options = apply_filters( |
| 143 | 'woocommerce_product_visibility_options', |
| 144 | array( |
| 145 | 'visible' => __( 'Catalog & search', 'woocommerce' ), |
| 146 | 'catalog' => __( 'Catalog', 'woocommerce' ), |
| 147 | 'search' => __( 'Search', 'woocommerce' ), |
| 148 | 'hidden' => __( 'Hidden', 'woocommerce' ), |
| 149 | ) |
| 150 | ); |
| 151 | foreach ( $options as $key => $value ) { |
| 152 | echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>'; |
| 153 | } |
| 154 | ?> |
| 155 | </select> |
| 156 | </span> |
| 157 | </label> |
| 158 | <label class="alignleft featured"> |
| 159 | <input type="checkbox" name="_featured" value="1"> |
| 160 | <span class="checkbox-title"><?php esc_html_e( 'Featured', 'woocommerce' ); ?></span> |
| 161 | </label> |
| 162 | </div> |
| 163 | |
| 164 | <?php if ( get_option( 'woocommerce_manage_stock' ) === 'yes' ) : ?> |
| 165 | <div class="inline-edit-group manage_stock_field"> |
| 166 | <label class="manage_stock"> |
| 167 | <input type="checkbox" name="_manage_stock" value="1"> |
| 168 | <span class="checkbox-title"><?php esc_html_e( 'Manage stock?', 'woocommerce' ); ?></span> |
| 169 | </label> |
| 170 | </div> |
| 171 | <?php endif; ?> |
| 172 | |
| 173 | <label class="stock_status_field"> |
| 174 | <span class="title"><?php esc_html_e( 'In stock?', 'woocommerce' ); ?></span> |
| 175 | <span class="input-text-wrap"> |
| 176 | <select class="stock_status" name="_stock_status"> |
| 177 | <?php |
| 178 | echo '<option value="" id="stock_status_no_change">' . esc_html__( '— No Change —', 'woocommerce' ) . '</option>'; |
| 179 | foreach ( wc_get_product_stock_status_options() as $key => $value ) { |
| 180 | echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>'; |
| 181 | } |
| 182 | ?> |
| 183 | </select> |
| 184 | <div class="wc-quick-edit-warning" style="display:none"> |
| 185 | <?php echo esc_html__( 'This will change the stock status of all variations.', 'woocommerce' ); ?></p> |
| 186 | </div> |
| 187 | </span> |
| 188 | </label> |
| 189 | |
| 190 | <div class="stock_fields"> |
| 191 | <?php if ( get_option( 'woocommerce_manage_stock' ) === 'yes' ) : ?> |
| 192 | <label class="stock_qty_field"> |
| 193 | <span class="title"><?php esc_html_e( 'Stock qty', 'woocommerce' ); ?></span> |
| 194 | <span class="input-text-wrap"> |
| 195 | <input type="number" name="_stock" class="text stock" step="any" value=""> |
| 196 | </span> |
| 197 | </label> |
| 198 | <?php endif; ?> |
| 199 | </div> |
| 200 | |
| 201 | <label class="alignleft backorder_field"> |
| 202 | <span class="title"><?php esc_html_e( 'Backorders?', 'woocommerce' ); ?></span> |
| 203 | <span class="input-text-wrap"> |
| 204 | <select class="backorders" name="_backorders"> |
| 205 | <?php |
| 206 | foreach ( wc_get_product_backorder_options() as $key => $value ) { |
| 207 | echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>'; |
| 208 | } |
| 209 | ?> |
| 210 | </select> |
| 211 | </span> |
| 212 | </label> |
| 213 | |
| 214 | <?php do_action( 'woocommerce_product_quick_edit_end' ); ?> |
| 215 | |
| 216 | <input type="hidden" name="woocommerce_quick_edit" value="1" /> |
| 217 | <input type="hidden" name="woocommerce_quick_edit_nonce" value="<?php echo esc_attr( wp_create_nonce( 'woocommerce_quick_edit_nonce' ) ); ?>" /> |
| 218 | </div> |
| 219 | </fieldset> |
| 220 |