Skip to Content
ModulesStore and money

Shop

The Shop module: products sold for the site balance, categories, terms and prices, discounts and promo codes, presents, and orders that track the delivery of every reward to the server.

Once it is set up, the site has a "Shop" section: players buy privileges (GiveCore), currency and items for the site balance, and the site delivers the purchase to the game server by itself. Each product is made of rewards from the Rewards module and "term and price" options. The order shows whether every reward reached the player.

The shop storefront with categories and product cards
DependenciesGamesPermissionsStudio blocksBot commandsCron tasks
Flute 2.0, the Rewards module; suggests Chat, Migration, Monitoringany game whose server is connected through GameLinkadmin.shop, admin.shop.view, admin.shop.orders, admin.shop.orders.view, admin.shop.refund, admin.shop.grant, admin.shop.retry, admin.shop.discounts, admin.shop.settings"Shop: products", "Shop: community goal", "Shop: balance top-up"shop, giveproductfour, below

Where the module shows up

PlaceWhat is there
/shop and the "Shop" menu itemthe storefront with categories, the product page, the cart, presents for other players
Player profilethe "Purchases" tab: "In force now" and "Order history", with a "Renew" button
AdminShopthe "Products", "Shop orders", "Product categories", "Discounts and promo codes" and "Settings" tabs
Player card in the adminthe "Purchases" tab with the player's orders and the "Give a product" action
GameLink game menua shop section: the player buys for the site balance without leaving the game
Studiothe "Shop: products", "Shop: community goal" and "Shop: balance top-up" blocks

The /shop address can be changed in the settings, and the routes, the menu item and old links follow it. The Monitoring module adds the player count and the current map of each server to the storefront. With the Chat module a product can be shared in chat.

Install and first setup

Install the module from the marketplace together with Rewards, as described in first steps; every install option is in Installing modules. Products are sold for the site balance, so connect a payment provider first. Until a payment method is turned on, the "Products" tab shows "Players can't top up their balance" with a "Set up payments" button.

Rewards reach the game server through the GameLink plugin. Without it the site will sell a privilege, but nothing will deliver it. Connecting a server is covered in Connect a game server.

The Products tab with the On sale, Hidden and Archive segments

A category and a product with a privilege

The example: a "Privileges" category and a 30-day VIP product that gives the vip group on the server.

Create a category

Open AdminShopProduct categories and click "New category". Fill in "Name" and leave the rest: "Address" is made from the name, and "Product view" on "Auto" shows privileges as tariffs and everything else as tiles. A sub-category is made with "Inside the category", one level deep only.

If there are no categories yet, you can skip this step: the product form then has a "Category" field for a new one, created together with the product.

Create the product

Open AdminShopProducts and click "New product". In "What the buyer sees", fill in "Name", "One phrase about the product" and "Advantages", one per line. Pick the category.

The product form: the What the buyer gets and Terms and prices blocks

Add a reward

In "What the buyer gets", pick a type in the empty row. For a group on the server that is "Server group by name": put the group name, as the plugin has it, into "Group on the server": vip. A role on the site itself comes from the "Site role" type. Other reward types, including those added by game modules, are listed under Reward types.

A reward inside a product has no term of its own: the purchase option sets it. A role is taken away when the bought term ends; with the "forever" option it stays, and the delivery goes to the server with no end date.

Set terms and prices

In "Terms and prices", the first row is already set to 30 days; fill in "Price". A row without a price is not sold. To let the buyer pick the number of days, fill in "Own term: price of a day" and the "From, days" and "To, days" limits.

Pick servers and put it on sale

In "Where it works", leave "Server choice" on "As the rewards say", or pick "The buyer picks" and tick "Servers of the product". An empty list means every server able to give the product's rewards. Turn on "On sale" in the "Sale" block and save.

Until the product has a reward and a price, "On sale" will not switch on and the form shows a warning. To sell several products in one purchase there is "Create bundle"; a bundle needs at least two products.

Privilege tiers and how they differ

Say a server has three tiers: VIP, Premium and Legend. The site handles three things: which group to grant, which tier is senior and how the buyer sees the difference. What a group gives in the game (armour, slots, skins, commands) is set in the VIP or admin plugin itself, on the group vip:gold, vip:premium and so on. The site does not change those perks, it only grants the group.

Create the tiers in GiveCore

Create three privileges in GiveCore and give each its server group. In "Ladder and seniority" give all three the same "Ladder", for example vip, and a rising "Seniority": 10, 20, 30. Premium then replaces VIP, and VIP cannot be bought over Premium.

One product per tier, in one category

For each privilege press "Sell in the shop" and put all three products in one category, for example "Privileges".

Write the "Advantages" as matching lines

The "Advantages" build the table "What each of them includes": products are columns, advantage lines are rows. Lines with the same text in different products share a row, so write them the same way.

  • A line without a colon, like Own chat tag, shows "Yes" for the products that list it and "No" for the rest.
  • A line with a colon, like Slots: 5, puts the value in the cell. Write Slots: 10 for Premium and the same row shows 10.
  • A line like Everything VIP gives copies all of VIP's lines into the column, so you do not repeat them. Its last word must match the name of another product in the category.

Premium, for example:

Everything VIP gives
Slots: 10
Own chat tag

Turn on "Recommended in the comparison" for one product: its column is highlighted and marked "Recommended", and its card shows "Beyond VIP" with the lines the cheaper tier lacks.

The category gets a "Compare" view next to "Rows" and "Cards". A signed-in player sees "You have it" over their tier. The comparison shows up to six products, and only when the category has at least two. Turn it off in the shop settings with "Comparison of a category's products".

Check the delivery

Test the product before anyone buys it. Open the player in AdminPlayers, choose the "Give a product" action, then "Product and term", "Server" and "Reason". Nothing is charged, and the order gets the "Given by hand" status. This needs the admin.shop.grant permission.

The order appears in AdminShopShop orders. The "Rewards" column shows how many rewards were delivered, how many are waiting and how many failed. Clicking the row opens the order, where every reward has its own state.

Shop orders with the Rewards column and filters
StateWhat it means
"Sent to the server, waiting for its answer"the site queued the delivery, the plugin has not confirmed yet
"Delivered"the server confirmed it
"Waiting in the inventory"the player claims the reward from the inventory
"Waiting in the inventory: link your game account"the buyer has no game account for this server
"Not delivered: the server did not answer, we will try again"the site retries by itself
"Not delivered: an administrator has to look"the site has stopped retrying and needs you

Send a stuck reward again with "Try the delivery again" in the order; this needs admin.shop.retry. When several orders are stuck, the list shows "Waiting for delivery: N" with a "Review orders" button. What the plugin did and why it failed is on Sent to servers. The grants of every module are collected in AdminRewardsGrants, described under Grants.

The "Refund" button, with admin.shop.refund, returns the money for an order to the buyer's balance and takes back what was given for the refunded lines. A refund is possible for "Refund window, days" after the purchase, 14 by default.

Discounts and promo codes

AdminShopDiscounts and promo codes holds two lists. A discount lowers the price by itself, either "On products" by a percent or "By quantity in an order" from two products up. With no "Products" or "Categories" picked, it covers the whole catalogue.

The buyer types a promo code in the cart. "New promo code" sets the "Code" (2 to 64 characters), "Percent" or "Sum", "Minimum order sum", "Uses in total" and "Uses per account". A bonus on balance top-ups is a different thing, set up in top-up promo codes.

By default a promo code and the site's discounts do not add up: the better of the two applies. "Promo code and site discounts" in the settings changes that.

Settings

The settings are the last tab of the module's screens: AdminShopSettings. They are grouped into "Storefront", "Buying", "Notifications", "Your own wording", "Refunds", "The shop across the site", "Community" and "Storefront pictures".

Shop settings, the Buying group
FieldWhat it changesDefault
"The shop is open"a closed shop says "The shop is closed for now. What you bought stays in force." and sells nothingon
"Show prices to guests"when off, only signed-in visitors see priceson
"Cart"when off, products are bought one at a timeon
"Products in the cart"1 to 10020
"Promo codes"when off, the promo code field disappears and codes are refusedon
"Promo code and site discounts""Only the better of the two applies" or "They add up"the better one
"Renewing what is in force"when off, something in force cannot be bought again until its term endson
"Auto-renewal from the balance"the buyer turns it on for a bought term; payment is taken "Renew, hours ahead" of the endon, 24 hours
"Presents for other players"a product can be bought for another player from its pageon
"Presents a day from one account"0 removes the limit5
"Discount for regular buyers"a discount that grows with the sum of paid orders; "Discount levels" as "sum: percent" linesoff, 1000: 3, 5000: 5, 20000: 10
"Credit for the rest on an upgrade"a senior privilege costs less by what is left of the junior oneon
"Agreement with the offer before the first purchase"asked once the site has published an offeron
"Refund window, days"0 means always14
"When the reward has been spent""Refund less what was spent" or "Refuse the refund"refund less what was spent
"Do not refund a used term"for an expired or replaced privilege only the unused share of the term is refundedon
"Shop in the game menu"the shop section in the GameLink menu on serverson
"Community goal"a block with the sum raised by purchases over a week or a monthoff

Background tasks

The tasks are listed in AdminScheduler and run only when the scheduler is started every minute.

TaskHow often
Shop: forgetting old cartsdaily
Shop: cart remindershourly
Shop: reminders of a term about to endhourly
Shop: auto-renewal of termshourly

Game servers

The shop itself knows nothing about games: it gives rewards, and GameLink carries them to the server. Installing the plugin and what it can give are covered on the game pages, for example Counter-Strike 2, Rust and Minecraft. Game modules add reward types of their own: RustKit, GmodKit, FiveMKit and Minecraft.

The shop section of the game menu is built from the categories and purchase options. A product sold by the day stays on the site and is not offered in the game. The order of menu items is set in the game menu.

FiveM and RedM purchases are paid through Tebex, see Tebex. The Migration module moves a catalogue over from an old store.

For developers

After a payment the module dispatches flute.shop.order_paid (OrderPaid), after a refund flute.shop.order_refunded (OrderRefunded). A grant by hand comes as the same event with kind = manual and a total of 0. The rewards of an order go to the Rewards log with the shop source and an order:<id> reference.

A way to pay other than the balance plugs in through the Flute\Modules\Shop\Contracts\ExternalCheckout contract, registered in PaymentRoutes. Tebex works this way.

How the core side works: Payments, Events and listeners, Extension points.

Troubleshooting

For any other message, use the error lookup.

No server can give the product's rewards: it cannot be bought.

No enabled server has what the reward gives: the plugin is not connected or the group is not set up. Connect a server through GameLink or change the reward. The buyer meanwhile sees "No server can deliver this product right now. Check back later."

Waiting for delivery: N

The orders are paid, the rewards never arrived, and the site has stopped retrying. Open the order, check the reason on Sent to servers and click "Try the delivery again".

MessageWhat to do
"A product on sale must give something: add a reward."add a row to "What the buyer gets"
"A product on sale must have a price: add a term and a price."fill in a price in at least one option
"A free product needs a limit of purchases per account."fill in "Purchases per account"
"The product puts :worth on the balance for a price of :price: a buyer gets more than they pay. Raise the price or lower the reward."a product that tops up the balance costs less than it gives
"No game account is linked for this server: the purchase will wait in the inventory."the buyer links a game account; the reward waits in the inventory
":sum is missing. Top up the balance."the buyer has to top up the balance
"The shop is closed."turn on "The shop is open"

Next

On this page