Jump to content

Custom Form with multilang_shop feature


Recommended Posts

Hello,

 

I'm making a multilang_shop module.

 

In controller I have two forms, first is under renderForm function and second is in custom named function.

 

Second form has language fields. When creating new entry using second form and submitting it, it works fine, submits all data in all languages to database. But when I try editing those entries fields are filled with values,  after editing them and submiting it nothing happens. I tried to search for guides or working examples of forms like this, but haven't had any luck.

 

To make mine forms I used AdminManufacturersController forms as example.

 

EDIT:

 

Prestashop version 1.6.1.16

And module is back-office

 

EDIT2:

Dev mode true I get these errpr:

 

 

 

Warning: Illegal offset type in isset or empty in C:\xampp\htdocs\presta\classes\ObjectModel.php on line 354

Warning: Illegal offset type in isset or empty in C:\xampp\htdocs\presta\classes\ObjectModel.php on line 354

Warning: Illegal offset type in C:\xampp\htdocs\presta\classes\ObjectModel.php on line 308

Warning: Illegal offset type in C:\xampp\htdocs\presta\classes\ObjectModel.php on line 309

Warning: Illegal offset type in C:\xampp\htdocs\presta\classes\ObjectModel.php on line 311

 

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

  • 2 weeks later...

The previous problem is sorted out. 

 

Now I am stuck with multi language shop row insertion.

 

How to insert language fields for all shops, like it is with products and categories? Now when I insert new row it only adds to the first shop (Selected All shops). But if I select second shop, id_shop is second shops.

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...