Products

Product State

Meanings of Product States

You may wonder, what do these product states represent, why not just go with an is_active flag?

The answer is that in many ecommerce businesses products may go through different lifecycle stages, which need slightly different handling. Vanilo doesn't enforce any workflow for this, but here's the interpretation of the built-in states, and how they can possibly be handled:

State Meaning Common way of handling the state
draft The product data is incomplete Never display it on the StoreFront, do not allow it in any transaction, but allow editing in Admin
inactive The product data is complete but has not been published yet Hide from the StoreFront, eventually allow in transactions; eg. backorders, early closed-group sales, etc
unlisted The product is active but hidden on the list pages and in search results. It can be viewed by navigating directly to its URL. Not listed but it can be purchased when having the direct link to it. Similar to Youtube's unlisted videos.
active The product is active Make it available everywhere
unavailable The product is temporarily unavailable; due to supplier issues, legal reasons, quality problems, production blockages or any other reason that prevents the product from being ordered and shipped Display it on the StoreFront, but disallow new orders
retired The product is permanently unavailable and will never come back to the product range Do not list it on the StoreFront, but allow opening it when directly accessing its product link. Disallow new orders.

Difference Between Stock 0 and Unavailable

What is the difference between 0 stock and state to unavailable? Is it just some flag to make a product not buyable but still visible?

The state "unavailable" may cover cases, where a product is on stock, is visible, but can not be ordered.

  • Example1: a certain type of product is under the suspect of being contaminated, and the shop needs to verify for batch numbers if they are affected. Until the check is done, the product is temporarily blocked
  • Example 2: The manufacturer of the product is having a legal debate and the selling of the product is temporarily suspended
  • Example 3: A custom-made wardrobe is in stock but cannot be sold to the end user because it requires final assembly or painting, which is delayed due to a missing special adhesive or a malfunctioning paint-spraying machine.

Retired Products

The "retired" state is generally provided for unlisting products, but going directly to the product page would still show up. This can happen, for example, when in the customer account, the shopper browses an old order and goes to the previously ordered product, which is retired in the meantime.

What is the difference between retiring and deleting products?

Deleting a product will make it go away. In fact, it's soft-delete, so it remains in the DB so that older order items won't break, but the product will not be visible anywhere.

Therefore, if you have ever sold a certain product to your shoppers, it's just better to retire it instead of deleting.

Product Listing

Creating lists of products in Vanilo means retrieving simple products and master products together. Variants are omitted from lists because master products are aimed to group variants, and most of the time variants are the same product but in different sizes, colors, etc.

Listing products can happen in several ways:

  • Displaying all products by calling the /p URL on the storefront. This is useful for shops with a small number of products.
  • Displaying products within a category by calling the /c/{taxonomy}/{taxon} URL on the storefront. This will display all products within a given category.
  • Displaying products via search on the storefront. This returns the list of products matching the search query entered by the shopper.

Sorting Products

Products are sorted by default based on their priority field.

The default priority is 0, which represents a "neutral" sorting state. When all products have the same priority, then the last updated products are at the top of the lists.

When you want to display a product at the top of the list, you can set its priority to a higher value, eg. to 50. If you want to "bury" a product, you can set its priority to a lower value, e.g. to -40.

Can multiple products have the same priority?

Absolutely! When multiple products have the same priority, then the order between those products will be the last modification date. After a product is purchased, its last modification date will be updated, which will cause the product to move higher on the list.

To set the priority of master products on the StoreFront lists, change the priority of the master product, not the variants. The priority of the variants will be used on the product page when listing the variants.

The priority field in the Admin can be found under the "Extra Settings" section.

Product Priority in Vanilo Admin