http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension
Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme
Extra Positions PRO, Custom JavaScript, Custom CSS and others
Find:
Code: Select all
$products = $this->cart->getProducts();
Code: Select all
$this->load->model('catalog/product');
Code: Select all
foreach ($products as $product) {
Code: Select all
$store_product = $this->model_catalog_product->getProduct($product['product_id']);
Code: Select all
'model' => $product['model'],
Code: Select all
'sku' => $store_product['sku'],
Code: Select all
foreach ($this->cart->getProducts() as $product) {
Code: Select all
$store_product = $this->model_catalog_product->getProduct($product['product_id']);
find:
Code: Select all
model = '" . $this->db->escape($product['model']) . "',
Code: Select all
sku = '" . $this->db->escape($product['sku']) . "',
Code: Select all
ALTER TABLE `oc_order_product` ADD `sku` VARCHAR(64) NOT NULL AFTER `model`;
This should resolved the problem.
While I do agree with the fact that SKU strings should be entered along with the model within each orders, previous SKU strings that has not been entered into the orders should rather be considered as a chronnologic task from the back-end or on the store-front end; order product by order product query.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
http://www.opencart.com/index.php?route ... n_id=23901
Hi,clorne wrote:Try a new FREE extension from ocextensions - Display Product SKU
http://www.opencart.com/index.php?route ... n_id=23901
thanx it work. anyone know any tweak to this so that we can see SKU in Admin > Products List also
And want to say the above long code also work given by @straightlight
~Time
Version 2.0.3.1
Thanks for the update. One quick way regarding your request would be to duplicate all instances of: filter_model into the:And want to say the above long code also work given by @straightlight
- admin/controller/catalog/product.php
- admin/model/catalog/product.php file (inside the: getProducts paragraph)
- admin/view/template/catalog/product_list.tpl
Then, rename the duplicated variable names of: filter_model to: filter_sku. Otherwise, posting such modifications on the forum could resolved in very long steps to follow.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 147 guests