Go to content

Create size and color variations of a buyable product

In Johku, variations of a buyable product are made with a resource pool and stock resources: you create a stock resource for each size or model, and the customer chooses the alternative they want in the resource menu on the product page. This way you sell, for example, the different sizes of a T-shirt as one product where each size has its own stock balance.

The narration in the video is in Finnish.

Before you start

Variations can be used only when they all have the same price: the resource choice on a product does not affect the price. If a product comes in both different colors and different sizes, the clearest structure is one product per color, with the size alternatives as its variations. A product can have only one variation choice, that is, one resource pool. For alternatives with different prices, create separate products.

1. Create the stock resources and the resource pool at the same time

  1. Open Products in the Johku admin and select Stock resources in the top bar.

  2. Select Create new... and choose Stock resource.

  3. Enter a name for the variation, for example the name of the product and the size.

  4. In the Count field, enter how many size or other variation alternatives are created in the pool. Note: don't enter the stock balance here, it is set later.

  5. Under Naming, choose Provide a list of names and enter the names of the variations in the name list, one per line, as many as you chose in the Count field, for example "T-shirt blue S", "T-shirt blue M", "T-shirt blue L".

  6. If all the variations have the same quantity in stock, set the stock balance under Set resource attributes with the pcs option: it is applied to every resource. If the quantities differ, skip this step.

  7. In the dropdown menu under Create in resource pool, choose Create inside a new resource pool. In the Name field that opens below the menu, give the pool a descriptive name based on the variations it will hold, for example "T-shirt, blue".

  8. Select OK.

The stock resources and the resource pool that gathers them are now shown in the resource list.

Note: in older Johku shops, you'll find the page under Products → Resources.

2. Let the customer choose the variation

By default, a new resource pool uses the automatic allocation strategy, so Johku chooses the resource for the customer. To let the customer choose the size or model, change the strategy:

  1. Open the resource pool you created from the resource list.

  2. Open the pool's Resources tab and choose Allow users to select the resources under Allocation strategy.

  3. Save the resource pool.

3. Set the stock balance of each variation

If each variation has a different quantity in stock, enter a balance for each: open the pool's resource list by clicking the name of the pool in the resource list, click the number in the Stock balance column and change it to the balance you want. Repeat for all the resources of the pool. Managing balances is covered in more detail in the section Inventory management.

4. Create the product and attach the pool to it

  1. Create a Buyable product and give it a name: Create a buyable product.

  2. Open the product's Availability tab, select Attach resource pool and choose the pool you created from the dropdown menu. Select OK.

  3. Remove the resource that was created automatically for the product and is named after it by selecting Remove from this product on its row. You recognize the resource to remove by its cube icon; the pool has an organization icon. Only the resource pool stays in use on the product.

  4. Save. The product's Summary shows the total stock balance of the variations. You can also turn the stock balance off completely, in which case balances are not taken into account and the product is always available.

  5. Enter the other details of the product: description texts, unit price and VAT, and a main image. Check how it works in the preview: on the Johku Sales Channels tab, select Preview on storefront.

  6. Publish by selecting Include in product catalog on the Johku Sales Channels tab. Check that the category also has the Include in product catalog setting or that the category is a featured category on the front page.

  7. Create the other color or model alternatives of the product in the same way as products of their own.

Check that it worked

The product page shows a resource menu where the customer chooses the size or model they want. When the balance of a variation runs out, that alternative can no longer be chosen, but the other variations sell as usual.

If something goes wrong

You need variations with different prices. Variations don't support alternatives with different prices: the resource choice does not affect the price. Create separate products for alternatives with different prices, or for reservable gear use the model for rental gear in different sizes: Sell rental gear in different sizes.

The customer can't choose a variation. The pool's allocation strategy is still the default automatic one. Open the pool and change the strategy to Allow users to select the resources (see step 2).

The balance looks wrong. Besides the pool, the product still has its own automatically created resource attached. Remove it on the Availability tab, and the balance is then counted only from the pool's resources.