breadcrumb.php
9 years ago
form-login.php
9 years ago
quantity-input.php
9 years ago
sidebar.php
9 years ago
wrapper-end.php
9 years ago
wrapper-start.php
9 years ago
quantity-input.php
36 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Product quantity inputs |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/global/quantity-input.php. |
| 6 | * |
| 7 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 | * (the theme developer) will need to copy the new files to your theme to |
| 9 | * maintain compatibility. We try to do this as little as possible, but it does |
| 10 | * happen. When this occurs the version of the template file will be bumped and |
| 11 | * the readme will list any important changes. |
| 12 | * |
| 13 | * @see https://docs.woocommerce.com/document/template-structure/ |
| 14 | * @author WooThemes |
| 15 | * @package WooCommerce/Templates |
| 16 | * @version 2.5.0 |
| 17 | */ |
| 18 | |
| 19 | if ( ! defined( 'ABSPATH' ) ) { |
| 20 | exit; // Exit if accessed directly |
| 21 | } |
| 22 | |
| 23 | if ( $max_value && $min_value === $max_value ) { |
| 24 | ?> |
| 25 | <div class="quantity hidden"> |
| 26 | <input type="hidden" class="qty" name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $min_value ); ?>" /> |
| 27 | </div> |
| 28 | <?php |
| 29 | } else { |
| 30 | ?> |
| 31 | <div class="quantity"> |
| 32 | <input type="number" class="input-text qty text" step="<?php echo esc_attr( $step ); ?>" min="<?php echo esc_attr( $min_value ); ?>" max="<?php echo esc_attr( 0 < $max_value ? $max_value : '' ); ?>" name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $input_value ); ?>" title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'woocommerce' ) ?>" size="4" pattern="<?php echo esc_attr( $pattern ); ?>" inputmode="<?php echo esc_attr( $inputmode ); ?>" /> |
| 33 | </div> |
| 34 | <?php |
| 35 | } |
| 36 |