THELIA Forum

Welcome to the THELIA support and discusssion forum

Announcement

Rejoignez la communauté sur le Discord Thelia : https://discord.gg/YgwpYEE3y3

Offline


Hello all,

I've been working on a plugin for a while.
But now I wanted to extend the product model in order to maintain the modulairity.
Sadly I can't find any documentation on how to extend existing models in a plugin/module.

So I have two questions.
First I'd like to know how to extend core models (like category and product) by a plugin/module.
The second thing I'd like to know is how can I update the complete database with all sql files that are located in the Thelia system by using Propel.

Thanks in advance

Offline


hi you can use API THELIA for create module .

API Docs is : http://doc.thelia.net/api/master/index.html

  • manu
  • faï tot petar miladiu

Offline


Hi,

You cannot extends directly the core model. You have to create a new model with foreign key on core tables.

Why ?

It's quite simple, if during an upgrade of Thelia, we change the model, your own model will be broken.

So create a new module, create your own schema and generate model and sql. We create command line for doing this job : http://doc.thelia.net/en/documentation/ … mmand-line


http://doc.thelia.net/
http://thelia.net/modules
http://raynaud.io
PGP public Key : 0xC6E546A6