Jump to content

How To Associate A Language Sql Table To A Class ?


Mando

Recommended Posts

I'm developping an addon using his own class and SQL table, and I'd like to associate a language table to it, like 'product' and 'product_lang'.

 

 

More precisely :

I'm creating a module adding properties to products : I'm using an admin tab in the same way products, categories, etc, are managed, to view, create, edit my properties.

 

I created a SQL table 'properties' and a 'properties_lang' one, but when I add a property using my form, it only fills the 'properties' table, not 'properties_lang'.

Likewise, when I try to edit a property, only the datas from 'properties' are returned when I call

$this->getFieldsValue($properties);

method to pre-fill the form the the property datas.

 

 

I miss something somewhere, but even when I dissect the Prestashop native classes to see how it's made, I can't find.

 

Does someone have an idea ?

Edited by Mando (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...