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

fanatic

Users
  • Posts

    4,905
  • Joined

  • Last visited

Everything posted by fanatic

  1. скорей всего, конфликт из-за одинаковых id контейнеров
  2. p.s или просто в контроллере заменить $data['heading_title'] = $this->language->get('heading_title'); на $data['heading_title'] = $setting['name'];
  3. 1 вариант можно просто изменить название в файле локализации catalog/language/ru-ru/extension/module/featured.php 2вариант в контроллере catalog/controller/extension/module/featured,php добавить $data['mod_name'] = $setting['name']; в шаблоне catalog/view/theme/ваша тема/templete/extension/module/featured.tpl строку <h3><?php echo $heading_title; ?></h3> заменить на <h3><?php echo $mod_name; ?></h3> во втором варианте будет выводиться название, которое дали в админке.
  4. карточка товара. продукт, изображение описание и т.д внизу карусель товаров из категории в которой находится текущий товар. как-то так? сколько товаров? как сортировать? рандом? все?
  5. идентификатор, должен быть уникальным. а вы всем один
  6. выбираете главную категорию, привязываете к ней сопутствующие, задаете количество выводимых товаров для каждой сопутствующей. другими словами, какие зададите категории, из тех и будет выводить. можно, при желании, задать произвольные товары
  7. как вариант. дешево и сердито. ну а если не охота самому, пишите.
  8. без проблем. а с остальными страницами как? есть, более подробное описание того, что должно быть в итоге?
  9. а глянуть можно?
  10. вставляйте в редакторе, в режиме - исходный код
  11. если интересно загрузка шаблона $this->load->view('product/category', $data) $data массив с данными для шаблона далее public function view($route, $data = array()) { $output = null; // Sanitize the call $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route); // Trigger the pre events $result = $this->registry->get('event')->trigger('view/' . $route . '/before', array(&$route, &$data, &$output)); if ($result) { return $result; } if (!$output) { $template = new Template($this->registry->get('config')->get('template_type')); foreach ($data as $key => $value) { $template->set($key, $value); } $output = $template->render($route . '.tpl'); } // Trigger the post events $result = $this->registry->get('event')->trigger('view/' . $route . '/after', array(&$route, &$data, &$output)); if ($result) { return $result; } return $output; } далее class Template { private $adaptor; public function __construct($adaptor) { $class = 'Template\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class(); } else { throw new \Exception('Error: Could not load template adaptor ' . $adaptor . '!'); } } public function set($key, $value) { $this->adaptor->set($key, $value); } public function render($template) { return $this->adaptor->render($template); } } и наконец namespace Template; final class PHP { private $data = array(); public function set($key, $value) { $this->data[$key] = $value; } public function render($template) { $file = DIR_TEMPLATE . $template; if (is_file($file)) { // тут вся магия появления переменных в шаблоне extract($this->data); ob_start(); require($file); return ob_get_clean(); } trigger_error('Error: Could not load template ' . $file . '!'); exit(); } }
  12. да. а именно - как данные из контроллера, попадают в шаблон.
  13. в контроллере $data['my_val'] = 'hello world'; в шаблоне <?php echo $my_val; ?>
×
×
  • 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.