public static bool InstallStoreReviewsModule() { if (!ModulesRepository.IsExistsModuleTable("Module", "StoreReview")) { ModulesRepository.ModuleExecuteNonQuery( @"CREATE TABLE Module.StoreReview ( ID int NOT NULL IDENTITY (1, 1), ParentID int NULL, ReviewerEmail nvarchar(50) NOT NULL, ReviewerName nvarchar(100) NOT NULL, Review nvarchar(MAX) NOT NULL, DateAdded datetime NOT NULL, Moderated bit NOT NULL, Rate int NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] ALTER TABLE Module.StoreReview ADD CONSTRAINT PK_StoreReview PRIMARY KEY CLUSTERED ( ID ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ALTER TABLE Module.StoreReview SET (LOCK_ESCALATION = TABLE) SET IDENTITY_INSERT Module.StoreReview ON", CommandType.Text); } ModuleSettingsProvider.SetSettingValue("PageSize", "20", "StoreReviews"); return(ModulesRepository.IsExistsModuleTable("Module", "StoreReview")); }
public bool InstallModule() { ModuleSettingsProvider.SetSettingValue("UniSenderId", string.Empty, ModuleID); ModuleSettingsProvider.SetSettingValue("UniSenderFromName", string.Empty, ModuleID); ModuleSettingsProvider.SetSettingValue("UniSenderFromEmail", string.Empty, ModuleID); ModuleSettingsProvider.SetSettingValue("UniSenderRegUsersList", string.Empty, ModuleID); return(true); }
public static bool InstallCallbackModule() { bool isInstall; using (var da = new SQLDataAccess()) { if (ModulesRepository.IsExistsModuleTable(da, "Module", _moduleName)) { return(true); } da.cmd.CommandText = "CREATE TABLE Module." + _moduleName + @"( ID int NOT NULL IDENTITY (1, 1), Name nvarchar(100) NOT NULL, Phone nvarchar(50) NOT NULL, DateAdded nvarchar(50) not null, Comment nvarchar(MAX) NOT NULL, AdminComment nvarchar(MAX) NOT NULL, Processed bit NOT NULL, ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] ALTER TABLE Module." + _moduleName + @" ADD CONSTRAINT PK_Callback PRIMARY KEY CLUSTERED ( ID ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ALTER TABLE Module." + _moduleName + @" SET (LOCK_ESCALATION = TABLE) SET IDENTITY_INSERT Module." + _moduleName + " ON"; da.cmd.CommandType = CommandType.Text; da.cnOpen(); da.cmd.ExecuteNonQuery(); da.cnClose(); ModuleSettingsProvider.SetSettingValue("email4notify", "", _moduleName); ModuleSettingsProvider.SetSettingValue("emailFormat", "<h4>Поступил новый заказ обратного звонка</h4><br/> Имя: #NAME# <br/> Телефон: #PHONE# <br/> Комментарий: #COMMENT#", _moduleName); ModuleSettingsProvider.SetSettingValue("emailSubject", "Заказ обратного звонка", _moduleName); ModuleSettingsProvider.SetSettingValue("windowTitle", "Обратный звонок", _moduleName); ModuleSettingsProvider.SetSettingValue("windowText", "Укажите свое имя и номер телефона, и мы Вам обязательно перезвоним.", _moduleName); isInstall = ModulesRepository.IsExistsModuleTable(da, "Module", _moduleName); } return(isInstall); }
public static bool InstallStoreReviewsModule() { bool isInstall; using (var da = new SQLDataAccess()) { if (ModulesRepository.IsExistsModuleTable(da, "Module", "StoreReview")) { return(true); } da.cmd.CommandText = @"CREATE TABLE Module.StoreReview ( ID int NOT NULL IDENTITY (1, 1), ParentID int NULL, ReviewerEmail nvarchar(50) NOT NULL, ReviewerName nvarchar(100) NOT NULL, Review nvarchar(MAX) NOT NULL, DateAdded datetime NOT NULL, Moderated bit NOT NULL, Rate int NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] ALTER TABLE Module.StoreReview ADD CONSTRAINT PK_StoreReview PRIMARY KEY CLUSTERED ( ID ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ALTER TABLE Module.StoreReview SET (LOCK_ESCALATION = TABLE) SET IDENTITY_INSERT Module.StoreReview ON "; da.cmd.CommandType = CommandType.Text; da.cnOpen(); da.cmd.ExecuteNonQuery(); da.cnClose(); ModuleSettingsProvider.SetSettingValue("PageSize", "20", "StoreReviews"); isInstall = ModulesRepository.IsExistsModuleTable(da, "Module", "StoreReview"); } return(isInstall); }
public bool UpdateModule() { ModuleSettingsProvider.SetSettingValue("UniSenderOrderCustomersList", string.Empty, ModuleID); return(true); }
public bool InstallModule() { ModuleSettingsProvider.SetSettingValue("WatermarkPositionX", 0m, ModuleStringId); ModuleSettingsProvider.SetSettingValue("WatermarkPositionY", 0m, ModuleStringId); return(true); }
public bool InstallModule() { ModuleSettingsProvider.SetSettingValue("showmode", "related", ModuleID); return(true); }
public static bool InstallBuyInTimeModule() { ModulesRepository.ModuleExecuteNonQuery( @"IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Module." + ModuleName + @"') AND type in (N'U')) Begin CREATE TABLE Module." + ModuleName + @" ( Id int NOT NULL IDENTITY (1, 1), ProductId int NOT NULL, DateStart datetime NOT NULL, DateExpired datetime NOT NULL, DiscountInTime float(53) NOT NULL, ActionText nvarchar(MAX) NOT NULL, ShowMode tinyint NOT NULL, IsRepeat bit NOT NULL, DaysRepeat int NOT NULL, Picture nvarchar(50) NULL ) ON [PRIMARY] ALTER TABLE Module." + ModuleName + @" ADD CONSTRAINT PK_BuyInTime PRIMARY KEY CLUSTERED (Id) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ALTER TABLE Module." + ModuleName + @" ADD CONSTRAINT FK_BuyInTime_Product FOREIGN KEY (ProductId) REFERENCES Catalog.Product (ProductId) ON UPDATE NO ACTION ON DELETE CASCADE End", CommandType.Text); ModuleSettingsProvider.SetSettingValue("BuyInTimeLabel", "<span class=\"buyintime-label\">Успей купить</span>", ModuleName); ModuleSettingsProvider.SetSettingValue("BuyInTimeActionTitle", "<div class=\"buy-in-time-title\">Успей купить!</div> <div class=\"buy-in-time-action\">До конца распродажи:</div>", ModuleName); ModuleSettingsProvider.SetSettingValue("BuyInTimeDefaultActionTextMode1", "<div class=\"buy-in-time-main-b\"> " + "<div style=\"border-radius: 2px; background-color: #eceaeb; padding: 24px 20px 0 0px;\">" + "<div style=\"padding: 0 15px;display: inline-block;vertical-align: top;\">" + "#ActionTitle# #Countdown# " + "</div>" + "<div style=\"display:inline-block; vertical-align:bottom; padding:0; margin:0 20px 0 0;\">" + "<a href=\"#ProductLink#\">" + "#ProductPicture#" + "</a>" + "</div>" + "<div style=\"display:inline-block; vertical-align:top; position:relative; min-height:125px;width: 270px;\">" + "<div style=\"margin-bottom:5px;\">" + "<a href=\"#ProductLink#\" style=\"font-size:18px; font-weight:bold;text-decoration:none;\">#ProductName#</a>" + "</div>" + "<div style=\"margin-bottom:5px;\"> " + "<span style=\"color: #d40b3e; \">Цена: #OldPrice#</span> Экономия: #DiscountPrice#" + "</div>" + "<div style=\"font-weight:bold; margin-bottom:5px;\"> " + "Цена сегодня: #NewPrice#" + "</div>" + "<div style=\"margin-bottom:20px;\"> " + "<a href=\"#ProductLink#\" class=\"btn btn-big btn-buy\">Купить</a>" + "</div>" + "<div class=\"buy-in-time-discount\"> " + "<div style=\"font-size:24px;\">#DiscountPercent#%</div> " + "<span style=\"font-size:12px;\">скидка</span> " + "</div>" + "</div>" + "<div style=\"display: inline-block; vertical-align: top; border-left: 1px solid #cccbce; margin-left:10px;\">" + "<ul>" + "<li style=\"padding-bottom:10px;\">Самая низкая цена</li>" + "<li style=\"padding-bottom:10px;\">Бесплатная доставка в день заказа</li>" + "<li style=\"padding-bottom:10px;\">Гарантия производителя</li>" + "<li>Бесплатное обучение</li>" + "</ul>" + "</div>" + "</div>" + "</div>", ModuleName); ModuleSettingsProvider.SetSettingValue("BuyInTimeDefaultActionTextMode2", "<div class=\"buy-in-time\"> " + "<div class=\"center\"> " + "#ActionTitle# #Countdown# " + "</div> " + "<div class=\"center\"> " + "<div style=\"position:relative; margin:0; padding:10px; display:inline-block;\"> " + "<a href=\"#ProductLink#\"> " + "#ProductPicture# " + "</a> " + "<div class=\"buy-in-time-discount\"> " + "<div style=\"font-size:24px;\">#DiscountPercent#%</div> " + "<span style=\"font-size:12px;\">скидка</span> " + "</div> " + "</div> " + "</div> " + "<div style=\"margin-bottom:5px;\"> " + "<a href=\"#ProductLink#\" style=\"font-size:14px; font-weight:bold;\">#ProductName#</a> " + "</div> " + "<div style=\"margin-bottom:5px;\"> " + "<span style=\"color: #d40b3e;\">Цена: #OldPrice#</span> " + "</div> " + "<div style=\"font-weight:bold; margin-bottom:5px;\">Цена сегодня: #NewPrice#</div> " + "<div style=\"font-weight:bold;\">Экономия: #DiscountPrice#</div> " + "</div>", ModuleName); return(true); }