OX Inventory

Kartik-Business integrates seamlessly with ox_inventory, allowing business items (food, ingredients, products, etc.) to be dynamically registered into OX Inventory at runtime.

This integration ensures that items created or managed through the business system automatically appear inside ox_inventory without requiring manual item registration.


πŸ“¦ Requirements

Before proceeding, ensure the following dependencies are installed and running:

  • ox_inventory

  • oxmysql

  • QBCore / QBX Core

  • Kartik-Business

  • kartik-laptop


πŸ”— How the Integration Works

When Kartik-Business needs to register a new item:

  • The item is dynamically inserted into ox_inventory/data/items.lua

  • Item metadata such as weight, stack behavior, and description is applied

  • If an image URL is provided, it is downloaded and saved automatically

  • Items become immediately usable in inventory

This process is handled via a server event.


πŸ“Œ Server Event: Insert Item into OX Inventory

Kartik-Business uses the following event to register items dynamically:


πŸ› οΈ Required OX Inventory Modification

To allow dynamic item insertion, you must register the item before OX Inventory returns the item list.

πŸ“ File to Edit

πŸ“Œ What to Do

Add the integration logic just before the following line:

This ensures:

  • Items injected by Kartik-Business are included

  • Inventory recognizes them instantly

  • No server restart is required after item creation

⚠️ Do not place this code after return Items, as it will never execute.


πŸ§ͺ Example Use Case

  • Business owner creates a new food item

  • Kartik-Business triggers kartik-business:inventory:insertItem

  • Item is:

    • Registered in ox_inventory

    • Given weight & metadata

    • Assigned an image

  • Players can immediately use, trade, or sell the item


⚠️ Important Notes

  • Item names are forced lowercase

  • Duplicate items are automatically ignored

  • Images are saved inside:

  • Works without restarting the server


βœ… Integration Complete

Once configured, Kartik-Business and ox_inventory will work together automatically, handling item creation, inventory syncing, and usability with zero manual work.

For further customization, refer to:

  • OX Inventory documentation

  • Kartik-Business configuration options


Last updated