Ekdant-Online-Store/catalog/model/account/search.php
2024-08-06 18:06:00 +05:45

18 lines
898 B
PHP

<?php
namespace Opencart\Catalog\Model\Account;
/**
* Class Search
*
* @package Opencart\Catalog\Model\Account
*/
class Search extends \Opencart\System\Engine\Model {
/**
* @param array $data
*
* @return void
*/
public function addSearch(array $data): void {
$this->db->query("INSERT INTO `" . DB_PREFIX . "customer_search` SET `store_id` = '" . (int)$this->config->get('config_store_id') . "', `language_id` = '" . (int)$this->config->get('config_language_id') . "', `customer_id` = '" . (int)$data['customer_id'] . "', `keyword` = '" . $this->db->escape((string)$data['keyword']) . "', `category_id` = '" . (int)$data['category_id'] . "', `sub_category` = '" . (int)$data['sub_category'] . "', `description` = '" . (int)$data['description'] . "', `products` = '" . (int)$data['products'] . "', `ip` = '" . $this->db->escape((string)$data['ip']) . "', `date_added` = NOW()");
}
}