Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial git commit of suteki shop at version 2.2.0.514
- Loading branch information
0 parents
commit 39e4e7a
Showing
1,269 changed files
with
410,041 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Oo]bj | ||
[Bb]in | ||
*.user | ||
*.suo | ||
*.[Cc]ache | ||
*.bak | ||
*.ncb | ||
*.log | ||
*.DS_Store | ||
[Tt]humbs.db | ||
_ReSharper.* | ||
*.svn |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
pushd Suteki.Shop | ||
nant\nant.exe | ||
popd | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
pushd Suteki.Shop | ||
nant\nant.exe compile-views | ||
popd | ||
pause |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
use SutekiShop | ||
|
||
|
||
insert [role] (RoleId, [Name]) values(1, 'Administrator') | ||
insert [role] (RoleId, [Name]) values(2, 'Order Processor') | ||
insert [role] (RoleId, [Name]) values(3, 'Customer') | ||
insert [role] (RoleId, [Name]) values(4, 'Guest') | ||
|
||
insert [user] (Email, [Password], RoleId, IsEnabled) | ||
values('admin@sutekishop.co.uk', 'D033E22AE348AEB5660FC2140AEC35850C4DA997', 1, 1) | ||
|
||
set identity_insert category on | ||
insert category (CategoryId, [Name], ParentId, Position, IsActive) values(1, '- Root', null, 1, 1) | ||
set identity_insert category off | ||
|
||
insert CardType values(1, 'Visa / Delta / Electron', 0) | ||
insert CardType values(2, 'Master Card / Euro Card', 0) | ||
insert CardType values(3, 'American Express', 0) | ||
insert CardType values(4, 'Switch / Solo / Maestro', 1) | ||
|
||
insert OrderStatus values(1, 'Created') | ||
insert OrderStatus values(2, 'Dispatched') | ||
insert OrderStatus values(3, 'Rejected') | ||
|
||
insert ContentType values(1, 'Menu') | ||
insert ContentType values(2, 'Text') | ||
insert ContentType values(3, 'Action') | ||
insert ContentType values(4, 'Top') | ||
|
||
set identity_insert [content] on | ||
|
||
insert [content](contentId, parentContentId, contentTypeId, [name], UrlName, [text], controller, [action], position, isActive) | ||
values(1, null, 1, 'Main Menu', 'Main_menu', null, null, null, 1, 1) | ||
|
||
insert [content](contentId, parentContentId, contentTypeId, [name], UrlName, [text], controller, [action], position, isActive) | ||
values(2, 1, 4, 'Home', 'Home', 'Homepage Content', null, null, 2, 1) | ||
|
||
insert [content](contentId, parentContentId, contentTypeId, [name], UrlName, [text], controller, [action], position, isActive) | ||
values(3, 1, 3, 'Online Shop', 'Online_Shop', null, 'Home', 'Index', 3, 1) | ||
|
||
insert [content](contentId, parentContentId, contentTypeId, [name], UrlName, [text], controller, [action], position, isActive) | ||
values(4, null, 2, 'Shopfront', 'Shopfront', '<h1>Wecome to our online shop</h1>', null, null, 4, 1) | ||
|
||
set identity_insert [content] off | ||
|
||
set identity_insert PostZone on | ||
|
||
insert PostZone (PostZoneId, [Name], Multiplier, AskIfMaxWeight, Position, IsActive, FlatRate) | ||
values(1, 'United Kingdom', 1, 0, 1, 1, 10) | ||
|
||
set identity_insert PostZone off | ||
|
||
set identity_insert [Country] on | ||
|
||
insert [Country] (CountryId, [Name], Position, IsActive, PostZoneId) | ||
values(1, 'United Kingdom', 1, 1, 1) | ||
|
||
set identity_insert [Country] off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
use SutekiShop | ||
ALTER TABLE dbo.[Order] | ||
ADD Note nvarchar(1000) NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
use SutekiShop | ||
alter table Category | ||
ADD ImageId int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
use SutekiShop | ||
ALTER TABLE dbo.[Order] ADD | ||
ContactMe bit NOT NULL CONSTRAINT DF_Order_ContactMe DEFAULT 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
use SutekiShop | ||
create table ProductCategory ( | ||
Id int not null identity(1, 1), | ||
ProductId int not null, | ||
CategoryId int not null | ||
) ON [PRIMARY] | ||
|
||
ALTER TABLE ProductCategory ADD CONSTRAINT PK_ProductCategory PRIMARY KEY CLUSTERED ( | ||
Id | ||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
|
||
insert into ProductCategory (ProductId, CategoryId) | ||
select ProductId, CategoryId from Product | ||
|
||
ALTER TABLE dbo.ProductCategory ADD CONSTRAINT | ||
FK_ProductCategory_Category FOREIGN KEY | ||
( | ||
CategoryId | ||
) REFERENCES dbo.Category | ||
( | ||
CategoryId | ||
) ON UPDATE NO ACTION | ||
ON DELETE NO ACTION | ||
|
||
|
||
ALTER TABLE dbo.ProductCategory ADD CONSTRAINT | ||
FK_ProductCategory_Product FOREIGN KEY | ||
( | ||
ProductId | ||
) REFERENCES dbo.Product | ||
( | ||
ProductId | ||
) ON UPDATE NO ACTION | ||
ON DELETE NO ACTION | ||
|
||
|
||
alter table Product | ||
drop constraint FK_Product_Category | ||
|
||
alter table Product | ||
drop column CategoryId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
use SutekiShop | ||
insert into OrderStatus (OrderStatusId, Name) | ||
VALUES (0, 'Pending') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use SutekiShop | ||
CREATE TABLE dbo.Review ( | ||
Id int NOT NULL IDENTITY (1, 1), | ||
ProductId int NOT NULL, | ||
Approved bit NOT NULL, | ||
[Text] nvarchar(MAX) NULL, | ||
Reviewer nvarchar(250), | ||
Rating int | ||
) ON [PRIMARY] | ||
TEXTIMAGE_ON [PRIMARY] | ||
|
||
ALTER TABLE dbo.Review ADD CONSTRAINT PK_Review PRIMARY KEY CLUSTERED ( | ||
Id | ||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
use SutekiShop | ||
GO | ||
CREATE TABLE dbo.MailingListSubscription | ||
( | ||
Id int NOT NULL IDENTITY (1, 1), | ||
ContactId int NOT NULL, | ||
Email nvarchar(250) NOT NULL, | ||
DateSubscribed datetime NOT NULL CONSTRAINT DF_MailingListSubscription_DateSubscribed DEFAULT getdate() | ||
) ON [PRIMARY] | ||
GO | ||
ALTER TABLE dbo.MailingListSubscription ADD CONSTRAINT | ||
PK_MailingListSubscription PRIMARY KEY CLUSTERED | ||
( | ||
Id | ||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
|
||
GO | ||
|
||
ALTER TABLE dbo.MailingListSubscription ADD CONSTRAINT | ||
FK_MailingListSubscription_Contact FOREIGN KEY | ||
( | ||
ContactId | ||
) REFERENCES dbo.Contact | ||
( | ||
ContactId | ||
) ON UPDATE NO ACTION | ||
ON DELETE NO ACTION | ||
|
||
GO | ||
|
||
IF NOT EXISTS(select * from Content where Name = 'Mailing List') | ||
INSERT INTO Content (ParentContentId, ContentTypeId, Name, UrlName, Controller, Action, IsActive, Position) | ||
VALUES (1, 3, 'Mailing List', 'Mailing_List', 'MailingList', 'Index', 1, 20) | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
-- update db for NH changes | ||
use SutekiShop | ||
|
||
alter table [Content] | ||
add ContentType varchar(50) | ||
go | ||
update [Content] set ContentType = 'Menu' where ContentTypeId = 1 | ||
update [Content] set ContentType = 'TextContent' where ContentTypeId = 2 | ||
update [Content] set ContentType = 'ActionContent' where ContentTypeId = 3 | ||
update [Content] set ContentType = 'TopContent' where ContentTypeId = 4 | ||
|
||
exec sp_rename 'ProductCategory.Id', 'ProductCategoryId' | ||
go | ||
exec sp_rename 'Review.Id', 'ReviewId' | ||
go | ||
exec sp_rename 'MailingListSubscription.Id', 'MailingListSubscriptionId' | ||
go | ||
|
||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
alter table OrderLine | ||
add ProductUrlName nvarchar(255) null | ||
|
||
update OrderLine set ProductUrlName = '' | ||
|
||
update OrderLine set ProductUrlName = p.UrlName | ||
from OrderLine l | ||
join Product p on SUBSTRING(l.ProductName, 0, CHARINDEX(' - ', l.ProductName, 0)) = p.Name | ||
|
||
update OrderLine set ProductUrlName = p.UrlName | ||
from OrderLine l | ||
join Product p on l.ProductName = p.Name | ||
|
||
update OrderLine set ProductUrlName = p.UrlName | ||
from OrderLine l | ||
join Product p on SUBSTRING(l.ProductName, 0, CHARINDEX(' - ', l.ProductName, CHARINDEX(' - ', l.ProductName, 0)+1)) = p.Name |
Binary file not shown.
Oops, something went wrong.