Question about database created automatically by nopCommerce when installing

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 năm cách đây
I know that a new database is created when nopCommerce installs. But I do not know where the content of database sheets come from?(I do not mean where the sheets come from, I know they are created by storeprocedure. I want to know where the content of sheets from). Because I want to "DIY" my own default content of database sheets when nopCommerce installs. In this way, I will not import data by manual when nopCommerce installs every time. Thanks.
12 năm cách đây
The default data is installed by Nop.Services.Installation.InstallationService.  The InstallData() method has a bool to control whether or not you want it to install sample data like categories and products.
12 năm cách đây
AndyMcKenna wrote:
The default data is installed by Nop.Services.Installation.InstallationService.  The InstallData() method has a bool to control whether or not you want it to install sample data like categories and products.


Thanks for your reply.
12 năm cách đây
have added a tag in a menu like(about us), the problem is how to redirect to a new page
12 năm cách đây
Look here

Libraries > Nop.Services > Installation > InstallationService.cs

All of your sample content is installed here...  

if (installSampleData)
            {
                InstallSpecificationAttributes();
                InstallProductAttributes();
                InstallCategories();
                InstallManufacturers();
                InstallProducts();
                InstallForums();
                InstallDiscounts();
                InstallBlogPosts();
                InstallNews();
                InstallPolls();
            }


Yes there is a boolean value to install sample data, but it you want to change the default sample data directly in the binaries , this is the class you'd do it in.

I only point it out because I had to do this exact task for my company. We use a set of "template" products and categories (etc...) and it's easier to change it at the core than it is to install, then go in and clean up or install and migrate...

-D
12 năm cách đây
danewell wrote:
Look here

Libraries > Nop.Services > Installation > InstallationService.cs

All of your sample content is installed here...  

if (installSampleData)
            {
                InstallSpecificationAttributes();
                InstallProductAttributes();
                InstallCategories();
                InstallManufacturers();
                InstallProducts();
                InstallForums();
                InstallDiscounts();
                InstallBlogPosts();
                InstallNews();
                InstallPolls();
            }


Yes there is a boolean value to install sample data, but it you want to change the default sample data directly in the binaries , this is the class you'd do it in.

I only point it out because I had to do this exact task for my company. We use a set of "template" products and categories (etc...) and it's easier to change it at the core than it is to install, then go in and clean up or install and migrate...

-D


Thanks for your reply. I'll try this method. Thanks.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.