find the same place where these variables are also saved
(in the controller, passing variables from the user to the engine)
2. in the file adminmodelcatalogproduct.php
very carefully add
"', new = '" . $this->db->escape($data['new']).
something like this
public function addProduct($data) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', ean = '" . $this->db->escape($data['ean']) . "', new = '" . $this->db->escape($data['new']). "', .....
(in the model - data storage, i.e. writing to and reading from the database)
3. in the file adminview emplatecatalogproduct_form.tpl
Новинка - 1 обычный - 0
(this is where everything is actually displayed to the user)
4. most importantly, there should be such a field in the database table
that is, in the table " . DB_PREFIX . "product there should be a field new, integer, defaulting to 0
that's everything for the admin panel
you need to do something similar on the storefront side as well
Comments
To leave a comment
If you have any suggestion, idea, thanks or comment,
feel free to write. We really value feedback and are glad to hear your opinion.
Comments