Variant Stock

Tracking quantities of products with variants

Older releases of Zen Cart do not track the stock of individual product variants (a t-shirt’s stock of large versus medium, for example). There are commercial modifications that address this requirement however, such as the Products’ Options’ Stock Manager. Note that this plugin is sometimes called “Products Options Stock Manager” (without the apostrophes) or just “POSM.”

There are also open source plugins which provide this capability; search for “Stock by Attributes.”

In version 2.1.0 of Zen Cart, POSM has been added as a core feature. See the POSM wiki for detailed information.

To track variant stock in Zen Cart 2.1.0 and higher, go to Admin > Modules > Plugin Manager, and install Products’ Options’ Stock Manager.

Then, on Admin > Catalog > Categories/Products, drill down to a product with attributes. You’ll be able to spot products with attributes because the “A” icon on the right will be blue rather than black.

Admin Product Listing Icons showing Attributes

If the “A” is still black and you need a refresher on adding attributes, please see Attributes - adding to products and Attributes Controller.

Configuring Variant Stock Levels

Once you have a product with a blue “A”, and you want to track stock on each variant, you have to configure the product to be POSM managed.

  • Go to Admin > Catalog > Manage Options’ Stock. Using the “Display products from category” dropdown, select the category of the product you wish to manage. Click the “Go” button on the right.

  • Use the “Choose the product to manage” dropdown, and select the desired product. Click the “Go” button on the right.

  • Under the label “Version” on the green bar at the bottom, you’ll see a dropdown with “* (All)” selected.

Adding POSM management the first time

  • Click the “Insert” button to the right. Now you will see a row for each product/attribute combination.

Adding POSM management the first time

Set the quantities of each variant under the Qty label and press update. Note that you may also provide specific SKUs for each variant using the Option Model/SKU.

For more details on this screen, see Manage Options’ Stock in the POSM help.

Managing Variant Stock Levels

  • Go to Admin > Catalog > Options’ Stock – View All.

  • By default, this screen only lists variants with low stock. You may view all your variant products by clicking the “View all managed variants” checkbox and clicking the “Go” button.

POSM View All screen

For more details on this screen, see Options’ Stock View All in the POSM help.

Dependent Attributes

Attributes in POSM-controlled products are dependent by default. You must choose attributes in the order in which they are presented (which is by the sort order set when creating the Product Options).

POSM Dependent attributes

In the example shown above, you must choose Size before you can choose Media Type.

If the product were not POSM-controlled, all attribute settings would be available at the same time.

Regular attributes

The dependent attribute feature is highly configurable; see Configuration Settings for Options’ Stock Manager.




Still have questions? Use the Search box in the upper right, or try the full list of FAQs. If you can't find it there, head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified July 15, 2024 by Scott C Wilson (ea4dd12).