【发布时间】:2019-12-31 00:07:39
【问题描述】:
作为一名 Opencart 新手,我正在添加带有静态数组的产品,只是为了测试 addProduct 函数,但我无法让它工作。
静态数组:
$data['pid'] = $this->model_catalog_product->addProduct([
'product_description' => [['name' => 'bakbuişte', 'description' => '', 'meta_title' => 'metaraba', 'meta_description' => '', 'meta_keyword' => '', 'tag' => '']],
'model' => 'amabigun',
'sku' => '',
'upc' => '',
'ean' => '',
'jan' => '',
'isbn' => '',
'mpn' => '',
'location' => '',
'price' => '',
'tax_class_id' => '0',
'quantity' => '1',
'minimum' => '1',
'subtract' => '1',
'stock_status_id' => '6',
'shipping' => '1',
'date_available' => '2019-12-31',
'length' => '',
'width' => '',
'height' => '',
'length_class_id' => '1',
'weight' => '',
'weight_class_id' => '1',
'status' => '1',
'sort_order' => '1',
'manufacturer' => '',
'manufacturer_id' => '',
'category' => '',
'filter' => '',
'product_store' => array(0 => '0',),
'download' => '',
'related' => '',
'option' => '',
'image' => '',
'points' => '',
'product_reward' => array(1 => array('points' => '',),),
'product_seo_url' => array(0 => array(1 => '',),),
'product_layout' => array(0 => '',)
]);
在此块之后,我看到 oc_product 表中的条目就像其他人一样,但在管理 > 目录 > 产品列表中没有。还有什么小东西需要准备吗?
【问题讨论】:
标签: opencart opencart-3 opencart-module