Create Plugin Requires Creating Custom Database tables

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 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.
6 years ago
I found  a plugin that does what I want.. Nop.Plugin.Feed.GoogleShopping

If anyone need it :)
6 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.
6 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
2 years ago
this not working in version 4.40
2 years ago
[email protected] wrote:
this not working in version 4.40

create a domain, SchemaMigration & PaymentInfoValidator inside a plugin. check existing domain code by reference.
2 years ago
You might want to have a look at the Nop.Plugin.Shipping.FixedByWeightByTotal Plugin which creates a custom database table
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.