Little SQL script to bulk create portion sizes to a whole product group.
Wanted for a quick way to add sizes for spirits and wines after bulk createing products.
Makes simpler then can just run down Price List Editor rather than going in to each product one by one
For those more comfortable with SQL than YAML.
ASS ALWAYS DQL SCRIPTS DIRECTLY IN TO DATABASE ARE USED AT OWN RISK - ALWAYS BACKUP FIRST…
INSERT INTO [MenuItemPortions] (Name,MenuItemId,Multiplier)
SELECT * FROM
(SELECT 'Bottle' AS Name) as [Name],
(SELECT [Id] AS MenuItemId FROM [MenuItems] WHERE [GroupCode] = 'Spirits') AS [MenuItemId],
(SELECT 1 AS Multiplier) as [Multiplier]
This was my script used to add a ‘Bottle’ portion option to all spirits.
Pretty much you would just need to change ‘Bottle’ to your new portion to be added and ‘Spirits’ to the group you want to include… You could repetitively easily adjust the WHERE to apply to different field…
Never used multiplier but obviously it would just apply 1 to all, you could change the 1 if needed.
Its as easy as starting a new query and pasting that in and making your adjustments
Did you not see my duplicate menu category script?
That was wrapped in a JScript but similar prinsaple
You input a from category name and from menu name as well as a to menu name to duplicate the menu category over to a second menu.
Was when I was trying to workout a way to have compound menus.