> For the complete documentation index, see [llms.txt](https://lixeldesign.gitbook.io/tebex/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lixeldesign.gitbook.io/tebex/rock-template/add-ons/crate-category.md).

# Crate Category

## Installation

{% stepper %}
{% step %}

### Downloading the add-on

Download the add-on from the [resource page](https://builtbybit.com/resources/rock-tebex-template-bedrock-crates.71241/).

You will receive a separate ZIP folder. **Unzip** it and remember where your the downloaded folder is located.
{% endstep %}

{% step %}

### Uploading the add-on

1. Inside the Tebex dashboard, [go to the appearance page](https://creator.tebex.io/appearance) and click on "**Launch Editor**".

<figure><img src="/files/tYrMODOQMXMpByNkU6by" alt=""><figcaption></figcaption></figure>

2. Scroll down **a bit** in the left sidebar and click on "**Add**"

<figure><img src="/files/aTxHwPASsLSfYjkOVIZm" alt=""><figcaption></figcaption></figure>

3. Select `twig` as the file type.

<figure><img src="/files/BRPoQnymtgB0lAhFKuyK" alt=""><figcaption></figcaption></figure>

4. Click on "**UPLOAD**"

<figure><img src="/files/N13cUqPWl0KpeUw9Jee1" alt=""><figcaption></figcaption></figure>

5. Select the `crate-category.twig` file inside your downloaded add-on folder and click on "**Upload file**". Click on "**Save as Draft**" and then on "**Publish**" (at the top right corner of the screen).

<figure><img src="/files/5H5MDTmT2hDgRLSePTkI" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Enabling the add-on

1. Close the HTML editor and [go to the package section](https://creator.tebex.io/packages). Select the category you want your crates to be in and open the category settings.
2. **Copy** the `category ID` from your crate category. You will find the category ID inside the URL.

<figure><img src="/files/O6PcRTtygBnujwduS27g" alt=""><figcaption></figcaption></figure>

3. [Go back to the appearance page](https://creator.tebex.io/appearance), scroll down and click on "**Crate Category**".

<figure><img src="/files/8H1Q8ps13ro9ewWT2Uqd" alt=""><figcaption></figcaption></figure>

4. Turn the "**Toggle Crate Category**" setting to `On` and paste the `category ID` you have copied before inside the "**Category ID**" field.
5. Scroll up, click on "**Save as Draft**" and then on "**Publish**".

<figure><img src="/files/rwvr72ipYLlfmxbyEw8w" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Done!
{% endhint %}
{% endstep %}
{% endstepper %}

## Settings

Launch the **HTML editor**, scroll down in the left sidebar and search for the `crate-category.twig` you have uploaded before. **Open the file** by clicking on it.

You will see some code which is not relevant for you. **Do not touch it**.

{% hint style="info" %}
Each amount must be a separate package. If you want 1x, 3x and 5x of one product, you need to create 3 single packages. Make sure ALL packages are inside your crate category.
{% endhint %}

You will see a default configuration:

<pre data-title="crate-category.twig" data-line-numbers><code>  "<a data-footnote-ref href="#user-content-fn-1">diamond_crate</a>": {
    "package_id": <a data-footnote-ref href="#user-content-fn-2">6880539</a>,
    "base_amount": "<a data-footnote-ref href="#user-content-fn-3">1x</a>",
    "quantity_discount": [
      <a data-footnote-ref href="#user-content-fn-4">{ "amount": "3x", "package_id": 6881675, "tag": "1 FREE" },</a>
      { "amount": "7x", "package_id": 6881676, "tag": "2 FREE" },
    ]
  },
  
  
  "basic_crate": {
    "package_id": 6881674,
    "base_amount": "1x",
    "quantity_discount": [
      { "amount": "3x", "package_id": 6880540, "tag": "1 FREE" },
      { "amount": "5x", "package_id": 6880541, "tag": "2 FREE" },
    ]
  },
  
  
  "loot_crate": {
    "package_id": 6937712,
    "base_amount": "1x",
    "quantity_discount": [
      { "amount": "3x", "package_id": 6937714, }
    ]
  }
</code></pre>

[^1]: Chose a free name for your crate setting.

[^2]: Set the package ID of the base package, for example the amount of 1.

[^3]: This will be displayed as the base amount, for example "1x". You can also set the base amount to 3 or 5, if your base package has a higher amount.

[^4]: You can add as many of these lines as you want. You can remove the tag.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lixeldesign.gitbook.io/tebex/rock-template/add-ons/crate-category.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
