产品页面上的WooCommerce查询数量

I have a button that I've added to my product page, and I want to query the quantity in the woocommerce_quantity_input() control. For the life of me I can't find how to do that. I can get $product information, and $cart information, but I can't find how to get the quantity that is on this page (before I add it to the cart).

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

global $woocommerce;
?>

<div class="calculateshipping-button-container" 
    style="display:block;float:<?php echo $button_align_default; ?>;">

    <div class="calculateshipping-button">
        <div class="cs-btn" data-layout="button_count" 
            data-width="<?php echo $option_csbtn_width; ?>" data-show-faces="false">

            <button type="button"  class="shipping-calculator-button button"   
                id="showHideForm"><?php _e('Calculate Shipping', $this->app_name );?>
            </button>
        </div>
     </div>
</div>
<?php 
global $product;
global $quantity;

if(isset($_POST['calc_shipping']) && $_POST['calc_shipping'] == '1')
{

so I want to get the quantity next to the "Add To Cart Button"

and is added to the page with:

<?php do_action( 'woocommerce_before_shipping_calculator' ); ?>

<form class="shipping_calculator" action="" method="post">

with the "Calculate Button" defined as

<p><button type="submit" name="calc_shipping" value="1"    class="button_shipping">
<?php _e( 'Calculate', 'woocommerce' ); ?></button></p>

Well I had to add an ajax function to the input field that would then update a hidden field in my form. Then when the Calculate button is pressed, I have access to the updated quantity.