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

Krag

Новичок
  
  • Posts

    4
  • Joined

Recent Profile Visitors

906 profile views

Krag's Achievements

Newbie

Newbie (1/14)

  • Dedicated Rare
  • First Post
  • One Month Later
  • One Year In
  • Week One Done

Recent Badges

3

Reputation

  1. Схема garik риличая, только код надо было всивлять по-другому. Скопируйте отсюда: <td class="text-center">{% if category.blog_category_id in selected %} <input type="checkbox" name="selected[]" value="{{ category.blog_category_id }}" checked="checked" /> {% else %} <input type="checkbox" name="selected[]" value="{{ category.blog_category_id }}" /> {% endif %}</td> Или просто вручную у себя в шаблоне замените category.category_id на category.blog_category_id
  2. Может кому пригодится. Вывести доп. изображения и атрибуты в дополнении NewsBlog Список ситей : Делал на ocStore 2.3.0.2.3, newsblog.20171002. в файле newsblog_articles.php после: foreach ($results as $result) { добавить: //дополнительные изображения и атрибуты $results_img = $this->model_newsblog_article->getArticleImages($result['article_id']); $dop_img = array(); foreach ($results_img as $result_img) { if ($result_img['image']) { $image_dop = $this->model_tool_image->resize($result_img['image'], 121, 121); } else { $image_dop = false; } $dop_img[] = $image_dop; } $article_info = $this->model_newsblog_article->getArticle($result['article_id']); $data['attributes'] = $article_info['attributes']; // после: $data['articles'][] = array( добавить: 'dop_img' => $dop_img, //дополнительные изображения 'attribute_groups' => $result['attributes'], //атрибуты вывод в шаблоне newsblog_articles.tpl <!-- доп. изображения --> <?php foreach ($article['dop_img'] as $img) { ?> <img src="<?php echo $img;?>" /> <?php } ?> <!-- атрибуты --> <?php if ($article['attributes']) { ?> <?php foreach($article['attribute_groups'] as $attribute_group) { ?> <?php foreach ($attribute_group['attribute'] as $attribute_item) { ?> <?php echo $attribute_item['text'];?> <?php } ?> <?php } ?> <?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.