Title: [Plugin: WP e-Commerce] Display Stock Count
Last modified: August 20, 2016

---

# [Plugin: WP e-Commerce] Display Stock Count

 *  [redgroup](https://wordpress.org/support/users/redgroup/)
 * (@redgroup)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-e-commerce-display-stock-count/)
 * Hello everyone,
 * I posted this on the WPEC forum but didn’t get an answer, so just posted it again
   and thought I would also try here. My client is insisting this needs to be done.
 * I need to display the stock count on the frontend so it displays to the customers.
   Can this be done? If not, please let me know so I can pass the word on. If it
   can, how do implement it into the pages?
 * The stock count does exist in the backend so there is obviously a variable, but
   I can’t seem to get it to work.
 * Thanks,
    Lee

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

 *  [Mukesh Panchal](https://wordpress.org/support/users/mukesh27/)
 * (@mukesh27)
 * [14 years ago](https://wordpress.org/support/topic/plugin-wp-e-commerce-display-stock-count/#post-2690321)
 * for this solution change this code in wpsc-single-product.php
 * <?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”
   ><?php _e(‘Product in stock’, ‘wpsc’); ?></div> <?php else: ?> <div id=”stock_display_
   <?php echo wpsc_the_product_id(); ?>” class=”out_of_stock”><?php _e(‘Product 
   not in stock’, ‘wpsc’); ?></div> <?php endif; ?> <?php endif; ?>
 * **To this 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”
   ><?php _e(‘Product in stock’, ‘wpsc’); ?><?php echo wpsc_product_remaining_stock();?
   ></div> <?php else: ?> <div id=”stock_display_<?php echo wpsc_the_product_id();?
   >” class=”out_of_stock”><?php _e(‘Product not in stock’, ‘wpsc’); ?></div> <?
   php endif; ?> <?php endif; ?>
 * then chack it …
 *  [farhanfaisal](https://wordpress.org/support/users/farhanfaisal/)
 * (@farhanfaisal)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-e-commerce-display-stock-count/#post-2690387)
 * Thanks mukesh.. Helped me here..

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

The topic ‘[Plugin: WP e-Commerce] Display Stock Count’ is closed to new replies.

 * 2 replies
 * 3 participants
 * Last reply from: [farhanfaisal](https://wordpress.org/support/users/farhanfaisal/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-e-commerce-display-stock-count/#post-2690387)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
