1.是db_get_array的错误,$user_id是一个整数,正确的查询是
db_get_array('SELECT column FROM ?:table WHERE user_id = ?i', $user_id)
2. 根据 cs-cart 版本,您有不同的文件夹,您需要在其中添加 php 和 tpl 文件
v2.x 和 v3.x
addons/[ADDON_NAME]/controllers/customer/[PHP].php
skins/[SKIN_NAME]/customer/addons/[ADDON_NAME]/views/[PHP_FILE]/[MODE].tpl
v4.x
app/addons/[ADDON_NAME]/controllers/customer/[PHP].php
design/themes/[THEME_NAME]/templates/addons/[ADDON_NAME]/views/[PHP]/[MODE].tpl
以上是新控制器的情况
当您只是连接到实际的控制器时
v2.x 和 v3.x
addons/[ADDON_NAME]/controllers/customer/[CONTROLLER].post.php
skins/[SKIN_NAME]/customer/addons/[ADDON_NAME]/views/[CONTROLLER]/[MODE].tpl
v4.x
app/addons/[ADDON_NAME]/controllers/customer/[CONTROLLER].post.php
design/themes/[THEME_NAME]/templates/addons/[ADDON_NAME]/views/[CONTROLLER]/[MODE].tpl