Edited files are -
1) product.php in admin/controller/catalog
2) product_form.tpl file locate admin/view/template/catalog/ -
3) product.php in admin/language/english/catalog/
4) database queries in admin/model/catalog/product.php
Then i manage to show them in front end in product view thanks to this article - viewtopic.php?t=36625 . I'm struggling to show them in the category view. I'm not sure how to get information from the database and show it in category view.
I think that i must add the database query in the : category.php in /catalog/model/catalog somewhere in the function getCategory($category_id) but not sure how exactly to do this. My additional database fields are called : ['ustoichivosti'] , ['vegetacia'] , ['razmeri'] and are situated in the product table.
This is the function :
Code: Select all
$query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_description cd ON (c.category_id = cd.category_id) LEFT JOIN " . DB_PREFIX . "category_to_store c2s ON (c.category_id = c2s.category_id) WHERE c.category_id = '" . (int)$category_id . "' AND cd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND c2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND c.status = '1'"); return $query->row;