Title: Display stock quantity
Last modified: August 30, 2016

---

# Display stock quantity

 *  [jasewarner](https://wordpress.org/support/users/jasewarner/)
 * (@jasewarner)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/display-stock-quantity/)
 * Hi,
 * I’ve been looking through the WP eCommerce documentation (specifically the section
   on template tags) as I am hoping to find a way to display the stock quantity 
   for a product, including each variation.
 * The simple “Product in stock”/”Product not in stock” isn’t going to cut the mustard,
   so far as my client is concerned. Users need to see how many items are available
   before adding one or more to the cart, e.g. “2 in stock”.
 * I’m referring specifically to this portion of code:
 *     ```
       <?php if(wpsc_show_stock_availability()): ?>
   
           <?php if(wpsc_product_has_stock()) : ?>
               <div id="stock_display_<?php echo wpsc_the_product_id(); ?>" class="in_stock"><p><?php _e('Product in stock', 'wpsc'); ?></p></div>
           <?php else: ?>
               <div id="stock_display_<?php echo wpsc_the_product_id(); ?>" class="out_of_stock"><p><?php _e('Product not in stock', 'wpsc'); ?></p></div>
           <?php endif; ?>
   
       <?php endif; ?>
       ```
   
 * Any ideas?
 * [https://wordpress.org/plugins/wp-e-commerce/](https://wordpress.org/plugins/wp-e-commerce/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Justin Sainton](https://wordpress.org/support/users/justinsainton/)
 * (@justinsainton)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/display-stock-quantity/#post-6479840)
 * HI Jase!
 * Just to clarify what you’re after here – do you need a way to check how many 
   of a selected variation is currently available in stock after selecting that 
   specific variation?
 *  Thread Starter [jasewarner](https://wordpress.org/support/users/jasewarner/)
 * (@jasewarner)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/display-stock-quantity/#post-6479846)
 * You’re on the money. That’s exactly what I need; user selects variation and sees“
   x in stock”, when they select another variation the amount is updated.
 * _[ [No bumping please](http://codex.wordpress.org/Forum_Welcome#No_Bumping). ]_

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Display stock quantity’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-e-commerce_ebebeb.svg)
 * [WP eCommerce](https://wordpress.org/plugins/wp-e-commerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-e-commerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-e-commerce/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-e-commerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-e-commerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-e-commerce/reviews/)

## Tags

 * [quantity](https://wordpress.org/support/topic-tag/quantity/)
 * [variations](https://wordpress.org/support/topic-tag/variations/)

 * 2 replies
 * 2 participants
 * Last reply from: [jasewarner](https://wordpress.org/support/users/jasewarner/)
 * Last activity: [10 years, 12 months ago](https://wordpress.org/support/topic/display-stock-quantity/#post-6479846)
 * Status: not resolved