opencart前端的数据库修改如何工作? [关闭]

I'm trying to figure out this for days but just can't solve the puzzle. I've already seen that most of the sql commands are in the Model side, but i can't find out how they connect to the View. There's lots of 'insert', 'updates', etc in the model files, but what triggers them in the View files? How one connects to another? One example would be when you make the final confirmation of a buying, the product quantity column (obviously) reduces.I'm ACHING to solve this. Thanks!

OpenCart uses a pseudo MVC (Model View Controller) system. The model gets the data, the view displays it via templates, and the controller calls the model and passes the data to the view.

If you keep this in mind, you should be able to trace it back. For instance, when looking at a product, the controller is in:

catalog\controller\product\product.php

The view/template is here (for default template):

catalog\view\theme\default\template\product\product.tpl

And if you look in the controller file, it calls several models:

$this->load->model('catalog/category');
...
$this->load->model('catalog/manufacturer');
...
$this->load->model('catalog/product');
...

Is there a specific issue you are having trouble with?

since the opencart is not full mvc it just uses pseudeo mvc and in this the model get the data and view display it via template and control contains business logic