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.luaItem 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:insertItemItem 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