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

easyterm

Newbie
  
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

813 profile views

easyterm's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Спасибо всем! Сам разобрался... Для тех кто столкнулся с подобной задачей. В \catalog\view\theme\default\template\product\category.tpl найти <div class="description"> и заменить этим. Ну и 17 заменить на ваше ID группы. <div class="description"> <?php if($product['attribute_groups']) { ?> <ul> <?php foreach($product['attribute_groups'] as $attribute_group) { ?><? if ($attribute_group['attribute_group_id'] == '17'){ ?> <tbody> <b><font color="#f16325"><?php echo $attribute_group['name']; ?></font></b><br> <?php foreach($attribute_group['attribute'] as $attribute) { ?><b><?php echo $attribute['name']; ?></b> <?php echo $attribute['text']; ?><br> <?php } ?> </tbody> <?php } ?> </ul> <?php } ?> <?php } ?> </div>
  2. На данный момент там нет ничего полездного. Так как в вше указанном мной коде это всё и так работает. Но мне нужно каким то образом вывести не все заданные аттрибуты а только определённую группу атрибутов.
  3. Сталкнулся с такой задачей, нужно вывести атрибуты из определённой группы (attribute_group_id=17) вместо описания в категориях. Не подскажете как можно это решить? Пока что у меня выглядет всё вот так: (Решение от RGB) \catalog\controller\product\category.php $this->data['products'][] = array( 'product_id' => $result['product_id'], 'thumb' => $image, 'name' => $result['name'], 'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100) . '..', 'attribute_groups' => $this->model_catalog_product->getProductAttributes($result['product_id']), 'price' => $price, 'price' => $price, 'special' => $special, 'tax' => $tax, 'rating' => $result['rating'], 'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']), 'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url) ); \catalog\view\theme\default\template\product\category.tpl <div class="description"> <?php if($product['attribute_groups']) { ?> <ul> <?php foreach($product['attribute_groups'] as $attribute_group) { ?><?php if(!strpos($attribute_group['name'], "—")) {?> <tbody> <b><font color="#f16325"><?php echo $attribute_group['name']; ?></font></b><br> <?php foreach($attribute_group['attribute'] as $attribute) { ?><b><?php echo $attribute['name']; ?></b> <?php echo $attribute['text']; ?><br> <?php } ?> <?php } ?> </tbody> <?php } ?> </ul> <?php } ?> </div>
  4. Сталкнулся с такой задачей, нужно вывести атрибуты из определённой группы (attribute_group_id=17) вместо описания в категориях. Не подскажете как можно это решить? Пока что у меня выглядет всё вот так: (Решение от RGB) \catalog\controller\product\category.php $this->data['products'][] = array( 'product_id' => $result['product_id'], 'thumb' => $image, 'name' => $result['name'], 'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100) . '..', 'attribute_groups' => $this->model_catalog_product->getProductAttributes($result['product_id']), 'price' => $price, 'price' => $price, 'special' => $special, 'tax' => $tax, 'rating' => $result['rating'], 'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']), 'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url) ); \catalog\view\theme\default\template\product\category.tpl <div class="description"><?php if($product['attribute_groups']) { ?><ul><?php foreach($product['attribute_groups'] as $attribute_group) { ?><?php if(!strpos($attribute_group['name'], "—")) {?><tbody><b><font color="#f16325"><?php echo $attribute_group['name']; ?></font></b><br><?php foreach($attribute_group['attribute'] as $attribute) { ?><b><?php echo $attribute['name']; ?></b> <?php echo $attribute['text']; ?><br> <?php } ?><?php } ?></tbody><?php } ?></ul><?php } ?></div>
Guest
×
  • 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.