> For the complete documentation index, see [llms.txt](https://docs.av-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.av-scripts.com/laptop-pack/dark-market/products.md).

# Products

{% hint style="info" %}
All categories and items list can be found in `server/editable/_items.lua`
{% endhint %}

#### Categories

> The `Config.Categories` table is the core of the marketplace. It allows you to organize products into distinct groups, control who can see them, and define the specific attributes for every item available for purchase.&#x20;

Each category is defined by a unique key index and contains three main components:

* `label`: The display name of the category as seen by players in the UI.
* `canAccess`: A server-side function that receives the `playerId`. It must return `true` to display the category or `false` to hide it (and all its items) from that specific player. Useful for job-locked or reputation-locked items.
* `items`: An array of tables containing the products available in that category.

#### Items Structure

All items must have the following structure:

> * **name**:`string` Item name&#x20;
> * **label**:`string` Item label
> * **stock**:`number` Starting stock
> * **price**:`number` Product price
> * **account**:`string` Account name for purchase
> * **account**:`label` Account label for UI
> * **probability**:`number` From 0 to 100, prob from getting the item added to the shop in every refresh
> * **image?**:`string` Image custom URL
> * **extension?**:`string` The image file extension to use when not providing a custom URL. Use this if your inventory uses an extension other than .png (e.g., .webp)

Example

```lua
{
    name = "laptop", 
    label = "Laptop", 
    stock = 99, 
    price = 50, 
    account = "cosmo", 
    accountLabel = "Cosmo", 
    probability = 100
},
```
