Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

stas23ik

Newbie
  
  • Posts

    13
  • Joined

  • Last visited

Everything posted by stas23ik

  1. Здравствуйте, как реализовать чтобы бонусные баллы начислялись пользователю, если заказ оформлен через CRM систему и через API добавляется в OpenCart? И второй вопрос - можно ли реализовать списание бонусных баллов сразу при оформлении заказа, а не при смене статуса заказа?
  2. Добрый день, подскажите пожалуйста как установить SEOPro на opencart 2.2.0.0, инструкция есть для версий меньше, но для 2.2.0.0 инструкция не подходит.
  3. В общем проблема решилась перезаливкой индексного файла из коробки.
  4. у меня не ocstore, а opencart. Проблема была в том, что неправильно работали хлебные крошки и неправильно строились url, seo pro изначально не было. При переключении на seo_url - все без изменений (кеш чистил)
  5. Просто перестали работать ссылки вида index.php?route=.... никак не могу понять из-за чего
  6. После установки SEO pro на opencart 1.5.6.3.2 не работают ajax-запросы и главная дает 404 ошибку. Не работают кнопки добавления в корзину, сравнения и т.д. в общем все ajax запросы. Консоль пишет что index.php?route=checkout/cart/add 404 not found. Ссылка на сайт - http://maximal.by/. Подскажите в чем проблема может быть. В какую сторону копать.
  7. Получилось вот так 'cat_id' => $this->model_catalog_product->getRowValue('product_to_category', 'category_id', 'product_id='.$result['product_id']),
  8. Доброе утро! Подскажите - необходимо получить id категории для каждого товара на странице спецпредложений (акций). На странице категории это сделал добавив в контроллере 'cat_id' => $this->request->get['path'], в контроллере special такой трюк не проходит.
  9. Появилась необходимость вывести meta desctiption в катрочке товара. В контроллер product.php вставил строку $this->data['meta_description'] = $this->document->getDescription(); в шаблоне product.tpl вывожу $meta_description - пусто и ошибок нет var_dump показывает null
  10. С горем пополам реализовал парсинг товаров из xls. По товарам проблем нет. Проблема осталась такая - неправильно парсятся категории. А именно проблема в построении иерархии. Наверняка что-то упустил в БД. В excel категории и подкатегории реализованы как вложенные раскрывающиеся списки. class Category { public $id = 0; public $name = ''; public $parent = 0; public $level = 0; function __construct($params) { if (isset($params['data']) && isset($params['row']) && isset($params['parent']) && isset($params['pdo'])) { $unformatted_name = $params['data']->getCellByColumnAndRow(2, $params['row'])->getValue(); $this->name = $this->format_name($unformatted_name); $this->level = $this->detect_level($unformatted_name); $this->parent = ($this->level === 0) ? 0 : $params['parent']; $this->load($params['pdo'], $params['parent']); } } private function format_name($unformatted_name) { $lower = mb_strtolower( trim($unformatted_name), 'UTF-8' ); return mb_strtoupper(mb_substr($lower, 0, 1, 'UTF-8'), 'UTF-8') . mb_substr(mb_convert_case($lower, MB_CASE_LOWER, 'UTF-8'), 1, mb_strlen($lower), 'UTF-8'); } private function detect_level($unformatted_name) { $spaces = preg_match_all("/^(\s+).*/", $unformatted_name, $matches); return strlen( $matches[1][0] ) / 4 - 1; } private function load($pdo, $parent) { $sth = $pdo->prepare("SELECT * FROM ".DB_PREFIX."category_description WHERE name='".$this->name."'"); $sth->execute(); $result = $sth->fetch(); if ( $result !== false ) $this->id = $result['category_id']; else { $sth = $pdo->prepare("INSERT INTO ".DB_PREFIX."category (`parent_id`, `column`, `status`) VALUES (:parent_id, 1, 1)"); $sth->bindParam(':parent_id', $this->parent, PDO::PARAM_INT); $sth->execute(); $this->id = $pdo->lastInsertId(); $sth = $pdo->prepare("INSERT INTO ".DB_PREFIX."category_description (`category_id`, `language_id`, `name`) VALUES (:category_id, 1, :name)"); $sth->bindParam(':category_id', $this->id, PDO::PARAM_INT); $sth->bindParam(':name', $this->name, PDO::PARAM_STR); $sth->execute(); $sth = $pdo->prepare("INSERT INTO ".DB_PREFIX."category_to_store (`category_id`, `store_id`) VALUES (:category_id, 0)"); $sth->bindParam(':category_id', $this->id, PDO::PARAM_INT); $sth->execute(); } } public static function isCategory($data, $row) { return ( trim($data->getCellByColumnAndRow(1, $row)->getValue()) == "" ); } }
×
×
  • 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.