# 📊 Stock & Restock

> **Info:**
This feature is only available with the Premium Plan.

Stock limits apply to buying only. Stock is counted in items, not purchases: an entry whose display amount is 16 with a stock of 64 sells out after 4 purchases. It is kept per shop, category and item identifier, so renaming any of them starts the count over.

## Stock

How many are for sale, shared by every player. `-1` means as many as they like. Selling the item back puts it back on the shelf, up to this number. Raising the stock in the editor adds the difference to what is left right away.

<figure><img src="../../.gitbook/assets/stock-and-restock/stock.png" alt="" width="563"><figcaption><p>Stock</p></figcaption></figure>

## Player Limit

How many one player may buy between two restocks. `-1` means as many as they like. A restock resets every player's count.

<figure><img src="../../.gitbook/assets/stock-and-restock/player-limit.png" alt="" width="563"><figcaption><p>Stock (Player Limit)</p></figcaption></figure>

On Premium, the [IP limit](../../configurations/settings-file.md#ip-limit) also caps how many accounts on one connection can buy the item between restocks, so alternate accounts cannot multiply a player's limit.

## Sell Limit

How many one player may sell between two restocks. `-1` means as many as they like. A restock resets every player's count, and `/sell` and AutoSell sell only up to what is left.

<figure><img src="../../.gitbook/assets/stock-and-restock/sell-limit.png" alt="" width="563"><figcaption><p>Stock (Sell Limit)</p></figcaption></figure>

## Limit Group

A name shared by several items of the same shop, such as `crate_keys`. Items with the same group share one count per player: buying any of them counts toward the player limit of all of them, and the same for selling. The limit checked is the one of the item being bought or sold. Case does not matter, and empty means no group.

<figure><img src="../../.gitbook/assets/stock-and-restock/limit-group.png" alt="" width="563"><figcaption><p>Stock (Limit Group)</p></figcaption></figure>

Stock stays per item. The [IP limit](../../configurations/settings-file.md#ip-limit) is counted per group too. A restock of any item in the group resets the whole group's counts.

With the Network add-on's shared stock, groups are not applied and each item keeps its own counts.

## Commands

| Command | Permission | Description |
| --- | --- | --- |
| `/pshop limits reset <player> [shop] [category] [item]` | phoenixshop.command.limits | Resets a player's buy and sell counts, for everything or only one shop, category or item. Works for offline players, by name or UUID. Resetting an item in a limit group resets the whole group. |
| `/pshop stock set <shop> <category> <item> <amount>` | phoenixshop.command.stock | Sets how many are left, between 0 and the item's stock. Only for items with a stock limit. |
| `/pshop stock restock <shop> <category> <item>` | phoenixshop.command.stock | Restocks the item now: full stock, and every player's counts for it, or its limit group, are reset. Posts the restock [webhook](../../features/discord-webhooks.md). |

`/pshop limits` is not available with the Network add-on's shared stock.

## Restock

When the item goes back to its full stock. Every restock also resets the player limits. Choose the mode first, then the fields that mode shows.

<figure><img src="../../.gitbook/assets/stock-and-restock/restock.png" alt="" width="563"><figcaption><p>Stock (Restock)</p></figcaption></figure>

| Mode | Fields | Comes back |
| --- | --- | --- |
| Never | None | Never on its own. |
| Interval | Days (0 to 365), Hours, Minutes | That long after it sold out. |
| Daily | Time | Every day at that time. |
| Weekly | Weekday, Time | Every week on that day at that time. |
| Monthly | Day of Month (1 to 28), Time | Every month on that day at that time. |

The Turn Off button sets the mode back to Never. Times use the server's clock. Time opens a time picker and Weekday a day picker, see [Date and Time Pickers](../categories/edit-category.md#date-and-time-pickers).

> **Warning:**
Interval only starts counting once the stock runs out. An item with a player limit and no stock limit never runs out, so its player limits only reset with a Daily, Weekly or Monthly restock.

The restock rule is written in the item's entry as a `restock` block, which can also be typed by hand:

| Key | Used by | Description |
| --- | --- | --- |
| `type` | all | `NEVER`, `INTERVAL`, `DAILY`, `WEEKLY` or `MONTHLY`. |
| `every` | `INTERVAL` | How long after it sells out, such as `30m`, `6h` or `1d12h`. Units are `s`, `m`, `h` and `d`. |
| `time` | `DAILY`, `WEEKLY`, `MONTHLY` | The time of day, such as `'04:00'`. |
| `day` | `WEEKLY`, `MONTHLY` | A weekday such as `MONDAY`, or a day of the month from `1` to `28`. |

```yml
restock:
  type: WEEKLY
  day: MONDAY
  time: '04:00'
```

An item with no `restock` block never restocks.

> **Info:**
A block that cannot be read is treated as `NEVER`.

## Availability

Limits when the item is for sale at all. Outside that time it is hidden from the shop, `/sell` and sign shops, and cannot be bought or sold. Leave a field empty to not use it. This feature is only available with the Premium Plan.

<figure><img src="../../.gitbook/assets/stock-and-restock/available-from.png" alt="" width="563"><figcaption><p>Stock (Available From)</p></figcaption></figure>

<figure><img src="../../.gitbook/assets/stock-and-restock/available-until.png" alt="" width="563"><figcaption><p>Stock (Available Until)</p></figcaption></figure>

<figure><img src="../../.gitbook/assets/stock-and-restock/sale-window.png" alt="" width="563"><figcaption><p>Stock (Sale Window)</p></figcaption></figure>

| Field | Description |
| --- | --- |
| Available From | The date and time it goes on sale, picked in the [date picker](../categories/edit-category.md#date-and-time-pickers). |
| Available Until | The date and time it stops being for sale. |
| Sale Window | How long it stays for sale after each restock, such as `2h`. Only used with a Daily, Weekly or Monthly restock, counting from the restock time. |

With a Daily restock at 18:00 and a 2h window, the item is for sale from 18:00 to 20:00 every day. Dates and times use the server's time zone.

```yaml
available:
  from: '2026-10-25 00:00'
  until: '2026-11-01 00:00'
  window: 2h
```

Source: https://www.phoenixplugins.com/docs/phoenix-shop/main-features/items/stock-and-restock