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

Alewka1994

Newbie
  
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Alewka1994's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Collaborator
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. И она почему то берёт минимальное и максимальное цену от первой подкатегории. И присваивает ее всем подкатегориям данной категории и главной категории соответственно
  2. Еще такая проблема. В подкатегориях не выводит. Как быть?(
  3. как только получиться вывести максимальную цену. Опишу все как надо куда закинуть
  4. Спасибо огромное, все разобрался. Кэши почистил, поудалял ненужное зарботало) А чтобы максимальную цену взять надо desc заменить на asc?)
  5. А все нашел ошибку. Только теперь вот что Warning: Missing argument 2 for Cart\Currency::format(), called in /home/..../system/storage/modification/catalog/model/catalog/product.php on line 612 and defined in /home/luminarc/new.tarelki.by/system/library/cart/currency.php on line 24Notice: Undefined variable: currency in /home/..../system/library/cart/currency.php on line 25Notice: Undefined index: in /home/luminarc/new.tarelki.by/system/library/cart/currency.php on line 25Notice: Undefined variable: currency in /home/.../system/library/cart/currency.php on line 26Notice: Undefined index: in /home/..../system/library/cart/currency.php on line 26Notice: Undefined variable: currency in /home/..../system/library/cart/currency.php on line 27Notice: Undefined index: in /home/..../system/library/cart/currency.php on line 27Notice: Undefined variable: currency in /home/...../system/library/cart/currency.php on line 30Notice: Undefined index: in /home/..../system/library/cart/currency.php on line 30
  6. category.php $data['categories'][] = array( 'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'min_price' => '<span class="from">От</span> '.$this->currency->format($this->tax->calculate($min_price, 0, $this->config->get('config_tax')), $this->session->data['currency']), 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url) ); model/..../product.php <?php class ModelCatalogProduct extends Model { public function getMinPriceFromCategory($category_id) { $sql = "SELECT p.price, ps.price AS price_special FROM ".DB_PREFIX."product p LEFT JOIN ".DB_PREFIX."product_to_category AS ptc ON ptc.product_id = p.product_id LEFT JOIN ".DB_PREFIX."product_special ps ON (p.product_id=ps.product_id) WHERE ptc.category_id = ".(int)$category_id." OR ptc.category_id IN (SELECT path_id FROM ".DB_PREFIX."category_path WHERE category_id = ".(int)$category_id." AND level = 0) AND p.price > 0 AND p.quantity > 1 AND p.date_available <= NOW() ORDER BY p.price DESC LIMIT 0,1"; $query = $this->db->query($sql); $product_price = $query->row; if(isset($product_price['price_special']) && $product_price['price_special'] > 0){ $min_price = $product_price['price_special']; } elseif(isset($product_price['price'])) { $min_price = $product_price['price']; } else { $min_price = 0; } return $min_price; } .... category.tpl <?php foreach ($categories as $category) { ?> <?php echo $category['min_price']; ?> <?php } ?> и высвечивает все равно Notice: Undefined variable: min_price in /home/..../system/storage/modification/catalog/controller/product/category.php on line 240Notice: Undefined variable: min_price in /home/...../system/storage/modification/catalog/controller/product/category.php on line 240Notice: Undefined variable: min_price in /home/...../system/storage/modification/catalog/controller/product/category.php on line 240 а вместо цены 0 присылает(
  7. А вызов функции получается тоже надо делать? Извините что достаю вас(
  8. Это в .../model/..../product.php или в контроллере сразу?
  9. Ребят как вывести минимальную цену из товаров в каждой из категорий. Типо товары от какой то цены. Не js только
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.