11 March 2016

How to remove sample eCommerce data from Mr CMS

When you install MrCMS eCommerce it comes with sample data. This SQL script can be used to remove the sample data quickly.

Open SQL Server Management Studio and open a new query for the database then run this SQL:

delete FROM [dbo].[Ecommerce_ProductOptionValue]

delete FROM [dbo].[Ecommerce_ProductOptions]

delete FROM [dbo].[Ecommerce_ProductOption]

delete FROM [dbo].[Ecommerce_ProductSpecificationAttribute]

delete FROM [dbo].[Ecommerce_ProductSpecificationAttributeOption]

delete FROM [dbo].[Ecommerce_PriceBreak]

delete FROM [dbo].[Ecommerce_ProductSpecificationValue]

delete FROM [dbo].[Ecommerce_ProductVariant]

delete FROM [dbo].[Ecommerce_ProductCategories]

delete FROM [dbo].[DocumentVersion]

delete FROM  [dbo].[ResizedImage]

delete FROM [dbo].[MediaFile]

delete FROM [dbo].[Document] where DocumentType in ('MrCMS.Entities.Documents.Media.MediaCategory', 'MrCMS.Web.Apps.Ecommerce.Pages.Category', 'MrCMS.Web.Apps.Ecommerce.Pages.Product', 'MrCMS.Web.Apps.Ecommerce.Pages.Brand')