Create Plugin Requires Creating Custom Database tables

2 years ago
Hello guys,

I want to create a plugin that requires creating custom database tables, in order to save data and retrieve on public store to work.

should I add SQL files with tables scripts and add them to the plugin project, then read the sql files and create tables upon installing the plugin?

Any Ideas or hints to kick-start would be appreciated.
2 years ago
I found  a plugin that does what I want.. Nop.Plugin.Feed.GoogleShopping

If anyone need it :)
2 years ago
You can use dbContext in plugin and create service for get and insert records in db table.

You can take reference from Nop.Plugin.Pickup.PickupInStore plugin.
2 years ago
omaani wrote:
Hello guys,

I want to create a plugin that requires creating custom database tables, in order to save data and retrieve on public store to work.

should I add SQL files with tables scripts and add them to the plugin project, then read the sql files and create tables upon installing the plugin?

Any Ideas or hints to kick-start would be appreciated.


Please check the below docs

https://docs.nopcommerce.com/display/en/Plugin+with+data+access