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

KiT

Новичок
  
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

1,568 profile views

KiT's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Reacting Well Rare

Recent Badges

3

Reputation

  1. Всем привет!) Врогде как полулилось сгделать вывод изображения не только внутри новости в файл catalog\controller\module\news.php копируем поверх исходного кода следующие строки: $results = $this->model_catalog_news->getNewsShorts($setting['limit']); foreach ($results as $result) { $this->data['news'][] = array( 'title' => $result['title'], 'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $chars), 'href' => $this->url->link('information/news', 'news_id=' . $result['news_id']), 'posted' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'image' => $result['image'] ); } а в файл catalog\view\theme\default\template\module\news.tpl потому чтомбим: <img src="<?php echo $this->model_tool_image->resize($news_story['image'], $this->config->get('news_thumb_width'), $this->config->get('news_thumb_height')); ?>" title="<?php echo $this->data['heading_title'] = $news_story['title']; ?>" alt="<?php echo $this->data['heading_title'] = $news_story['title']; ?>" id="image"/> !Всивлять после <div class="box-news">* вот и все, скорее всего, должно рилиить :-)
  2. в файле catalog\controller\module\news.php добавил: $this->data['thumb'] = $this->model_tool_image->resize($result['image'], $this->config->get('news_thumb_width'), $this->config->get('news_thumb_height')); $this->data['popup'] = $this->model_tool_image->resize($result['image'], $this->config->get('news_popup_width'), $this->config->get('news_popup_height')); а в catalog\view\theme\default\template\module\news.tpl <img src="<?php echo $thumb; ?>" id="image"/> Проблема: отображается последнее выбранное в модуле изображение, помогите догделать, или на мысль натолкните хотя б... P.s. Понятно что им должна загружаться ссылка, в зависимости от news_id в бд, я же прав?
  3. kisluk, а можно ли строки кода, отвечающие за вывод изображение внутри новости catalog\controller\information\news.php скопипастить в файл catalog\controller\module\news.php отвечающий за "внешнюю" часть(блок "Последние новости"), насколько это бугдет правильно?
×
×
  • 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.