SET @template := 'cartNotEmptyToUser'; SET @categoryId := 7; SET @sorter := IFNULL((SELECT MAX(sorter) FROM mm_Settings WHERE idCategory = @categoryId), -1) + 1; INSERT INTO `mm_Settings` (`name`, `idCategory`, `fieldType`, `label`, `value`, `options`, `description`, `required`, `system`, `sorter`, `added`, `changed`) VALUES (CONCAT(@template, 'Header'), @categoryId, 'header', '', 'Uncompleted purchase (User Notification)', '', '', 'n', 'n', @sorter, NOW(), NOW()), (CONCAT(@template, 'Subject'), @categoryId, 'text', 'Subject', 'Uncompleted purchase on the MMUA website! ', '', '', 'y', 'n', @sorter + 1, NOW(), NOW()), (CONCAT(@template, 'From'), @categoryId, 'text', 'From Email Address   If you leave this field empty - the From Email Address will be the same as the one in General Settings.', '', '', '', 'n', 'n', @sorter + 2, NOW(), NOW()), (CONCAT(@template, 'Body'), @categoryId, 'HtmlEditor', 'Message Body', '

Dear {memberOfficialFullName},

You have an uncompleted purchase on the MMUA website.

{cartItems}

Click here to view your shopping cart

', '', 'Constants: {memberOfficialFullName} {cartItems} {cartUrl}', 'y', 'n', @sorter + 3, NOW(), NOW()); INSERT INTO `mm_SettingsOptions` (`name`, `variable`, `value`, `type`, `sorter`) VALUES (CONCAT(@template, 'Body'), 'mode', 'view', 'string', NULL);