Jump to content

How does object model work in Prestashop ?


ed0522

Recommended Posts

How does the object model work in Prestashop? I see the $definition class such as in customer.php just define the structure and requirement of the customer table.

 

If we input a value of first name in the front page, it will be save in to $customer->firstname. How is it saved to the customer table?

Link to comment
Share on other sites

The object model has a Save method that either updates or adds the entry (calling its update or add). Inside those you'll find the queries you need.
It will basically save everything it finds in the definitions array

  • Like 1
Link to comment
Share on other sites

How does the object model work in Prestashop? I see the $definition class such as in customer.php just define the structure and requirement of the customer table.

 

If we input a value of first name in the front page, it will be save in to $customer->firstname. How is it saved to the customer table?

 hi...

 

please show this link

 

http://doc.prestashop.com/display/PS15/Diving+into+PrestaShop+Core+development

 

https://www.prestashop.com/forums/topic/325110-creating-an-objectmodel-for-a-module/

 

thanks..

Edited by Nishith (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...