Variant Stock

Using POSM and 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 using POSM:

  • go to Admin > Modules > Plugin Manager
  • install Products’ Options’ Stock Manager
  • Users of the Responsive Classic template will need to change the configuration value Dependent Attributes: Outer Selector.

Users of Zen Cart 1.5.8a, 2.0.0 and 2.0.1 may use the encapsulated version of POSM provided in v2.1.0, but must follow these instructions on Upgrading POSM.

Once POSM is installed, 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 the admin help page for Manage Options’ Stock and the 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 the admin help page for Options Stock - View All and the 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.

My Variants have different prices and weights!

There are two ways to handle this situation:

a) No Plugins

The built-in solution to this problem uses attribute prices and weights.

The Attributes Controller allows you to set prices and weights for attribute values. In this example from the demo data, the Premium model is $100 more, the 8mb memory is $50 more, and the 16mb memory is $75 more.

See Attribute Pricing for more information about doing this.

Attribute Prices

These values are displayed on the storefront as offsets from the base price.

Attributes Prices Storefront

b) Using the POSM-PW plugin

The commercial plugin POSM Price/Weight allows you to set the weights and prices of variant products on a variant-by-variant basis, rather than attribute-by-attribute.

POSM Product Prices

These values are displayed on the storefront as final prices once all attributes are selected.

Attributes Prices Storefront




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 August 10, 2024 by Scott Wilson (7c7d68d).