Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

arvaal

Пользователи
  • Posts

    151
  • Joined

  • Last visited

About arvaal

  • Birthday 06/24/1984

Информация

  • Пол
    Мужлина
  • Город:
    Лабинск
  • Интересы
    Жизнь.

Recent Profile Visitors

4,719 profile views

arvaal's Achievements

Enthusiast

Enthusiast (6/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

11

Reputation

  1. С шаблоном Fractal на OCStore 2,3 бугдет рилиить?
  2. На https://github.com/iMateo/oc2-mysqli-cached нашел врогде икой драйвер, но он что то не рилииет хотя сайт в риличем состоянии. Версия opencart 1.5.4.1. Ниже согдержимое файла mysqli_cached.php <?php final class MySQLi_Cached { private $link; private $cache; private $cachedquery; public function __construct($hostname, $username, $password, $database, $port = '3306') { $this->cache = new Cache(DB_CACHED_EXPIRE); $this->link = new mysqli($hostname, $username, $password, $database, $port); if ($this->link->connect_error) { trigger_error('Error: Could not make a database link (' . $this->link->connect_errno . ') ' . $this->link->connect_error); exit(); } $this->link->set_charset("utf8"); $this->link->query("SET SQL_MODE = ''"); $this->link->query("SET NAMES 'utf-8"); $this->link->query("SET CHARACTER_SET_CONNECTION=utf8"); $this->link->query("SET SQL_MODE = ''"); $this->link->query("SET SESSION wait_timeout = 3600"); } public function query($sql) { $isselect = 0; $md5query = ''; $pos = stripos($sql, 'select '); if ($pos == 0) { $isselect = 1; $md5query = md5($sql); if ($query = $this->cache->get('sql_' . $md5query)) { if ($query->sql == $sql) { if ($resetflag = $this->cache->get('sql_globalresetcache')) { if ($resetflag <= $query->time) { $this->cachedquery = $query; return($query); } else { $this->cachedquery = $query; return($query); } } } } $resource = $this->link->query($sql); if ($resource) { if (is_resource($resource)) { $i = 0; $data = array(); while ($result = $query->fetch_accoc($resource)) { $data[$i] = $result; $i++; } } } } $query = $this->link->query($sql); if (!$this->link->errno) { if ($query instanceof mysqli_result) { $data = array(); while ($row = $query->fetch_assoc()) { $data[] = $row; } $result = new stdClass(); $result->num_rows = $query->num_rows; $result->row = isset($data[0]) ? $data[0] : array(); $result->rows = $data; unset($data); if ($isselect == 1) { $result->sql = $sql; $result->time = time(); $this->cache->set('sql_' . $md5query, $result); }; unset($this->cachedquery); $query->close(); return $result; } else { return true; } } else { trigger_error('Error: ' . $this->link->error . '<br />Error No: ' . $this->link->errno . '<br />' . $sql); } } public function escape($value) { return $this->link->real_escape_string($value); } public function countAffected() { if (isset($this->cachedquery) && $this->cachedquery) { return $this->cachedquery->num_rows; } else { return $this->link->affected_rows; } } public function getLastId() { return $this->link->insert_id; } public function __destruct() { $this->link->close(); } }
  3. А что на счет mysqli есть ли риличая версия с кэшированием как в mysql_cached?
  4. Облазил весь нет, что то пишут что модуль не рилииет нормально на ocStore 2.3 Какие то проблемы с ocmod
  5. Тоже интересует этот вопрос. Жгдем отвеи.....
  6. Была ли решена эи проблема? Я ик понял это из за изменений в файле pagination.php Изменения полезные, ик что хочется сгделать чтоб рилиил фильтр с ними. Автор подскажите как это сгделать,
  7. Здравствуй morro, нашел ли ты решение, чтоб под каждой категорией выводились бы ее товары
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.