index.php每次都通过main_tempate_vars.php根据$_GET['main_page']等的值来调用pages文件夹或者模板文件夹里的相应php文件从而进入到产品、购物车……等页面。
------举例:-------
index.php?main_page=index
会调用文件 includes/modules/pages/index/main_template_vars.php
index.php?main_page=product_info
会调用文件 includes/modules/pages/product_info/main_template_vars.php
然后再由该文件自动加载 includes/templates/[your template]/templates/tpl_product_info_display.php
index.php?main_page=shopping_cart
会调用文件 includes/templates/[your template]/templates/tpl_shopping_cart_default.php
---------------------
不过对于从点击“加入购物车”按钮之后到进入includes/templates/[your template]/templates/tpl_shopping_cart_default.php文件的过程不是很明白,还恳请各位老大赐教!
具体的问题是这样的:
点击“加入购物车”按钮后会提交index.php?main_page=product_info&products_id=1&action=add_product
这时系统应该还是调用加载includes/modules/pages/product_info/main_template_vars.php这个文件吧?可是不明白是怎么又自动调用index.php?main_page=shopping_cart的?具体是哪个文件的哪行代码实现这个自动调用的呢?我在includes/modules/pages/product_info/main_template_vars.php这个文件好像找不到这行代码。
黑暗摸索中,望高手们给照个亮





News