Merch Booth sorting by folder or teams

Hi I’m trying to make my Merch Booth a bit easier to sorting. But my main issue is that I got a lot of Clothing from difference football teams. I would like to somehow make it easier to sort the Merch Booth for my teams.

Does anyone know how to set this up.

I already got the Merch Booth script and a setCatalogSort script.

Thanks :wink:

1 Like

How is it sorted currently? Can you show us the script?

1 Like

Sure her you go

Where I out the ID of the shirt and pants

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))

local items = {
	--- Brøndby IF --- 
	
	13919430413,  -- Brøndby Shorts - 2023-2024	
	13256525986,  -- Brøndby Shorts med undertrøje

	13916428670,   -- Brøndby Shorts 2023-2024	
	11881979361,  -- Brøndby Shorts 2022-2023
	15401508769, -- Brøndby - trøje - Bertel - 10 - 2023-2024
	
	
	
	--- Viborg FF --- 
	15664431207,  -- VFF udebanetrøje - 2023-2024 - Uden navn og numre 
	15653413155, -- VFF Hjemmebanetrøje - 2023-2024 - Uden navn og numre

}

for _, assetId in ipairs(items) do
	local success, errorMessage = pcall(function()
		MerchBooth.addItemAsync(assetId)
	end)
	if not success then
		print(errorMessage)
	end
end

The sorting script

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))

MerchBooth.setCatalogSort(function(a, b)
	return if a.price == b.price then a.title < b.title else a.price < b.price
end)

As you can see, I have setup two teams. And I would like to be able to sort it by like Brøndby, Viborg and the other teams, that I got in another script.