aimeos / aimeos-symfony

Symfony e-commerce bundle for professional, ultra fast online shops, complex B2B applications and #gigacommerce
https://aimeos.org/Symfony
MIT License
396 stars 52 forks source link

Extends Models - Entities #30

Closed Filoz closed 7 years ago

Filoz commented 7 years ago

Hi, what is the preferred way to extend (for example) Product Entity and set aimeos to use the custom one?

Thank you!

aimeos commented 7 years ago

That depends on what you want to do. For common Aimeos questions not related to the Symfony integration you should ask for details in the Aimeos forum: https://aimeos.org/help/

Filoz commented 7 years ago

Hi, thanks for your fast reply! I think that my question is strictly related to Symfony integration... but I let you decide:

I would like to make something similar to what you did with "User" Entity. In particular would be great to have in aimeos-symfony an Entity for every entities managed in the core package. For Example: Product, Order, Tax, ... So it would be really easy to extend them... and maybe changing the table name in the database (simply changing the annotation in the entity), adding fields, ....

aimeos commented 7 years ago

Aimeos doesn't work that way because as PHP component library it has to be independent of Symfony specific things. Sure, you can write your own entities but that would be duplicate work for you.

Furthermore, it's only rarely necessary to extend the tables because you can associate almost any kind of data using the list tables or store product specific things in the mshop_product_property table.