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

Baskethome

Новичок
  
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

638 profile views

Baskethome's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. Спасипотому что огромное за помощь, все зарилиило
  2. <?php class ControllerModuleBestSeller extends Controller { public function index($setting) { $this->load->language('module/bestseller'); $this->load->language('product/product'); $data['heading_title'] = $this->language->get('heading_title'); $data['text_tax'] = $this->language->get('text_tax'); $data['button_cart'] = $this->language->get('button_cart'); $data['button_wishlist'] = $this->language->get('button_wishlist'); $data['button_compare'] = $this->language->get('button_compare'); $this->load->model('catalog/product'); $this->load->model('tool/image'); $data['products'] = array(); $results = $this->model_catalog_product->getBestSellerProducts($setting['limit']); if ($results) { foreach ($results as $result) { if ($result['image']) { $image = $this->model_tool_image->resize($result['image'], $setting['width'], $setting['height']); } else { $image = $this->model_tool_image->resize('placeholder.png', $setting['width'], $setting['height']); } if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) { $price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { $price = false; } if ((float)$result['special']) { $special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { $special = false; } if ($this->config->get('config_tax')) { $tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price']); } else { $tax = false; } if ($this->config->get('config_review_status')) { $rating = $result['rating']; } else { $rating = false; } $data['products'][] = array( 'product_id' => $result['product_id'], 'attribute_groups' => $this->model_catalog_product->getProductAttributes($product_info['product_id']), 'thumb' => $image, 'name' => $result['name'], 'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get('config_product_description_length')) . '..', 'price' => $price, 'special' => $special, 'tax' => $tax, 'rating' => $rating, 'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']) ); } if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/bestseller.tpl')) { return $this->load->view($this->config->get('config_template') . '/template/module/bestseller.tpl', $data); } else { return $this->load->view('default/template/module/bestseller.tpl', $data); } } } }
  3. Notice: Undefined variable: product_info in /home/.../...\/docs/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 76Notice: Undefined variable: product_info in /home/.../.../docs/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 76Notice: Undefined variable: product_info in /home/.../.../docs/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 76Notice: Undefined variable: product_info in /home/.../.../docs/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 76
  4. 1. Не получается вывести атрибуты в модуле Хиты продажю Делал по аналогии как гделал с модулем Рекомендуемые, им рилииет, а в Хиих нет. как гделал в Рекомендуемые FEATURED.PHP после $this->load->language('module/featured'); добавил $this->load->language('product/product'); после 'product_id' => $product_info['product_id'], добавил 'attribute_groups' => $this->model_catalog_product->getProductAttributes($product_info['product_id']), FEATURED.TPL <div class="concurentus"> <?php if($product['attribute_groups']) { ?> <?php foreach($product['attribute_groups'] as $attribute_group) { ?> <p class="concurentus-title"><?php echo $attribute_group['name']; ?></p> <?php foreach($attribute_group['attribute'] as $attribute) { ?> <p class="concurentus-text"><?php echo $attribute['name']; ?></p> <!--<td><?php echo $attribute['text']; ?></td>--> <?php } ?> <?php } ?> <?php } ?> </div> 2. Как можно сгделать, чтобы в Хиих отображались товары, которые я сам выберу в админке или по id?
  5. Тема закрыи Может кому пригодится: 1. контролер - категория пхп $template = 'category.tpl'; if ($category_id == 27) { $template = 'category1.tpl'; } if ($category_id == 28) { $template = 'category2.tpl'; } if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/'.$template)) { $this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/product/'.$template, $data)); } else { $this->response->setOutput($this->load->view('default/template/product/'.$template, $data)); } 2. копируем новый шаблон и переименовываем его.
  6. Всем привет! Только осваиваю OPENCART. Стоит OPENCART 2, шаблон синдартный при усиновки. Есть 5-6 категорий, в категориях выводится этона товара. Подскажите, пожалуйси, как сгделать, чтобы у опрегделенных категорий около этоны выводить "ОТ" ? Пропотому чтовал ик, но ошибка catalog/view/theme/default/template/product/category.tpl перед этоной <?php if ($category_id == 59){ ?> <?php echo 'от';?> <?php } else { ?> <?php echo '';?> <?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.