INSERT INTO `pl_DPageItemType` (`id`, `type`, `title`, `sorter`) VALUES (NULL, 'User\\MembershipRenew\\', 'User Membership Renew', '0'); ALTER TABLE `pl_MembershipType` ADD `duration` INT NOT NULL AFTER `price`; UPDATE `pl_MembershipType` SET `duration` = 1; ALTER TABLE `pl_User` ADD `membershipExpiresOn` DATE NOT NULL AFTER `membershipTypeId`; UPDATE `pl_User` SET `membershipExpiresOn` = DATE_ADD(added, INTERVAL 1 YEAR); -- --------------------------------------------------------------------------------------------------------------------- -- Email Templates -- --------------------------------------------------------------------------------------------------------------------- SET @template := 'userMembershipRenewedToUser'; SET @categoryId := 4; SET @sorter := IFNULL((SELECT MAX(sorter) FROM pl_Settings WHERE idCategory = @categoryId), -1) + 1; INSERT INTO `pl_Settings` (`name`, `idCategory`, `fieldType`, `label`, `value`, `options`, `description`, `required`, `system`, `sorter`, `added`, `changed`) VALUES (CONCAT(@template, 'Header'), @categoryId, 'header', '', 'Membership Renewed (User Notification)', '', '', 'n', 'n', @sorter, NOW(), NOW()), (CONCAT(@template, 'Subject'), @categoryId, 'text', 'Subject', 'Membership Renewed at Pageant Life', '', '', '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', '

Congratulations! Your {membership} membership has been successfully renewed to {membershipExpiresOn} at Pageant Life web site!

Click here to login at Pageant Life web site.

', '', 'Constants: {firstName} {lastName} {phone} {email} {password} {membership} {membershipExpiresOn} {loginUrl}', 'y', 'n', @sorter + 3, NOW(), NOW()); INSERT INTO `pl_SettingsOptions` (`name`, `variable`, `value`, `type`, `sorter`) VALUES (CONCAT(@template, 'Body'), 'mode', 'view', 'string', NULL);