eCommerce: Out of Stock

WP eCommerce: Handling Out of Stock Situations

WP eCommerce allows you to manage items where you have a limited number in stock. When a product is out of stock, you have a few options you can set to control what your visitors see.

Stock Control Panel

Stock Control Panel

The Limited Stock Checkbox

Tick the checkbox to turn on stock control.

[x] I have a limited number of this item in stock. If the stock runs out, this product will not be available on the shop unless you untick this box or add more stock.

Stock Quantity

Enter the stock quantity. Note if you sell items offline, you’ll need to update this field to keep items in sync.

Stock Qty: [ ]

Out of Stock Behavior

You can check or uncheck the out of stock checkbox to control what happens when the item is out of stock.

[ ] If this product runs out of stock set status to Unpublished & email site owner

Out of Stock Behavior 1: Unpublish/Email Site Owner

Using this setting, the product will move to Unpublished status, so it will not be displayed on your store pages. You will get an email letting you know it is out of stock. Once the item is replenished, use Dashboard, Store, Product to edit the product, set the stock level and Publish it.

Out of Stock Behavior 2: Leave Published/Display sold out message

If the out of stock check box is unticked, WP eCommerce automatically displays a text message “This product has sold out.” But the product will stay visible.

Custom Styling for the Out of Stock message

The sold out text message is within a paragraph with a class of ‘soldout’. This means you can create a CSS rule to format the text and/or display a custom image to display alongside the sold out message:

  • <p class=”soldout”>This product has sold out.</p>

Here is an example of a CSS rule that displays a custom image alongside the sold out message – note you will need to use Dashboard, Media, Add New to upload the custom jpg image first:
p.soldout {height: 30px; width: 100%; background-image: url(/files/stockout.jpg); background-repeat: no-repeat; background-position: right top;}

Note: if you are using a standalone WordPress website the url prefix will be /wp-content/uploads instead of /files

This is how the sold out message looks with the custom image:

Low Stock Levels and Shopping Carts

If you work with low stock levels, you need to be aware of the way that WP eCommerce reserves stock that has been added to a shopping cart.

Imagine a situation where you 2 items of stock remaining.

When a visitor to your website uses the Add to Cart button to add one item to their cart, WP eCommerce temporarily “claims” that quantity so that no other customers can purchase it while the original customer is checking out.

Once the customer completes their purchase, the stock level is permanently reduced by 1.

Once every hour, WP eCommerce automatically clears any “claimed” stock items where the customer didn’t complete their checkout and they haven’t accessed the site for at least one hour. This means that it can take anywhere from 1 to 2 hours for abandoned “claimed” stock to be made available for other customers to purchase.

If the customer abandons their cart, after a period of time (possibly up to 1 hour), WP eCommerce releases the temporary hold on stock and the reserved item goes back onto the available stock level.

WP eCommerce works this way because some people like to take their time while shopping, and might get annoyed if their cart was automatically cleared before they were ready to check out. However it does mean that in low stock situations, stock items that have been added to shopping carts may stop other visitors from buying the stock.