dqan70724 2013-06-09 04:07
浏览 38

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!

  • 写回答

2条回答 默认 最新

  • dongleiqiao2107 2013-06-09 04:29
    关注

    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?

    评论

报告相同问题?

悬赏问题

  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行