php - How to get value from Custom field Opencart Database? -
php - How to get value from Custom field Opencart Database? -
i developed opencart module. intend add together receipt number on each product add together field "nota" in "oc_product" table. plan when users place order, goods ordered receipt number when on "view cart"
i've been next rules of how add together custom fields in opencart , value of field "nota" extension such this:
http://www.opencart.com/index.php?route=extension/extension/info&extension_id=2838
but appears error in index.php?route=checkout/cart
notice: undefined index: nota in d:\data penting\project\proyek\htdocs\toko\catalog\controller\checkout\cart.php on line 276 this error when in "view cart", if other page index.php?route=product/product&product_id=* no error occurs , showing receipt number.
and if follow error found codes , add together codes "nota" value, still error occurs.
$this->data['products'][] = array( 'key' => $product['key'], 'thumb' => $image, 'name' => $product['name'], 'model' => $product['model'], 'nota' => $product['nota'], 'option' => $option_data, 'quantity' => $product['quantity'], 'stock' => $product['stock'] ? true : !(!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning')), 'reward' => ($product['reward'] ? sprintf($this->language->get('text_points'), $product['reward']) : ''), 'price' => $price, 'total' => $total, 'href' => $this->url->link('product/product', 'product_id=' . $product['product_id']), 'remove' => $this->url->link('checkout/cart', 'remove=' . $product['key']), 'recurring' => $product['recurring'], 'profile_name' => $product['profile_name'], 'profile_description' => $profile_description, ); } anyone can help error?
please edit system/library/cart.php
after line :
'name' => $product_query->row['name'],
add:
'nota' => $product_query->row['nota'],
php oop opencart
Comments
Post a Comment