使用AddProduct()函数,我想添加来自不同数据库的产品。但是我无法运行它。
我的代码:(./admin/controller/extension/produ/addpro.php)
<?php
class ControllerCatalogProduct extends Controller {
public function index() {
$products = array(
'model' => 'test',
'name'=>'test',
'description'=>'test',
'tag'=>'test'
);
$this->load->model('catalog/product');
$this->model_catalog_product->addProduct($products);
}
}
?>
然后我访问此链接domain.com/admin/index.php?route=extension/produ/addpro&user_token=xxx
但是返回此500错误;
Fatal error: Uncaught Error: Class 'Controllerextensionproduaddpro' not found in /home/domain/public_html/opencart/storage/modification/system/engine/action.php on line 71
( ! ) Error: Class 'Controllerextensionproduaddpro' not found in /home/domain/public_html/opencart/storage/modification/system/engine/action.php on line 71