После включения режима отображения ошибок выдал следующее(волосы дыбом встали от своей дубовости в подобных вопросах):
Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.
SELECT pa.id_product_attribute
FROM ps_product_attribute pa
INNER JOIN ps_product_attribute_shop product_attribute_shop
ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop = 1)
WHERE product_attribute_shop.default_on = 1 AND pa.id_product = 29 LIMIT 1
at line 613 in file classes/db/Db.php
607. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
608. }
609. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
610. {
611. if ($sql)
612. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
613. throw new PrestaShopDatabaseException($this->getMsgError());
614. }
615. }
616.
617. /**
DbCore->displayError - [line 313 - classes/db/Db.php] - [1 Arguments]
307. if ($sql instanceof DbQuery)
308. $sql = $sql->build();
309.
310. $this->result = $this->_query($sql);
311. if (_PS_DEBUG_SQL_)
312. $this->displayError($sql);
313. return $this->result;
314. }
315.
316. /**
317. * Execute an INSERT query
DbCore->query - [line 526 - classes/db/Db.php] - [1 Arguments]
520. if ($use_cache && $this->is_cache_enabled && ($result = Cache::getInstance()->get(md5($sql))))
521. {
522. $this->last_cached = true;
523. return $result;
524. }
525. $this->result = $this->query($sql);
526. if (!$this->result)
527. return false;
528. $this->last_cached = false;
529. $result = $this->nextRow($this->result);
530. if (is_null($result))
DbCore->getRow - [line 550 - classes/db/Db.php] - [2 Arguments]
544. public function getValue($sql, $use_cache = true)
545. {
546. if ($sql instanceof DbQuery)
547. $sql = $sql->build();
548.
549. if (!$result = $this->getRow($sql, $use_cache))
550. return false;
551. return array_shift($result);
552. }
553.
554. /**
DbCore->getValue - [line 622 - classes/Product.php] - [1 Arguments]
616. ' . Shop::addSqlAssociation('product_attribute', 'pa') . '
617. ' . ($minimum_quantity > 0 ? Product::sqlStock('pa', 'pa') : '') .
618. ' WHERE product_attribute_shop.default_on = 1 '
619. . ($minimum_quantity > 0 ? ' AND IFNULL(stock.quantity, 0) >= ' . (int) $minimum_quantity : '') .
620. ' AND pa.id_product = ' . (int) $id_product;
621. $result = Db::getInstance()->getValue($sql);
622.
623. if (!$result) {
624. $sql = 'SELECT pa.id_product_attribute
625. FROM ' . _DB_PREFIX_ . 'product_attribute pa
626. ' . Shop::addSqlAssociation('product_attribute', 'pa') . '
ProductCore::getDefaultAttribute - [line 2531 - classes/Product.php] - [1 Arguments]
2525.
2526. if (!$use_customer_price)
2527. $id_customer = 0;
2528.
2529. if ($id_product_attribute === null)
2530. $id_product_attribute = Product::getDefaultAttribute($id_product);
2531.
2532. $cache_id = $id_product . '-' . $id_shop . '-' . $id_currency . '-' . $id_country . '-' . $id_state . '-' . $zipcode . '-' . $id_group .
2533. '-' . $quantity . '-' . $id_product_attribute . '-' . ($use_tax ? '1' : '0') . '-' . $decimals . '-' . ($only_reduc ? '1' : '0') .
2534. '-' . ($use_reduc ? '1' : '0') . '-' . $with_ecotax . '-' . $id_customer . '-' . (int) $use_group_reduction . '-' . (int) $id_cart . '-' . (int) $real_quantity;
2535.
ProductCore::priceCalculation - [line 2491 - classes/Product.php] - [20 Arguments]
2485. if (is_null($id_customer) && Validate::isLoadedObject($context->customer))
2486. $id_customer = $context->customer->id;
2487.
2488. return Product::priceCalculation(
2489. $context->shop->id, $id_product, $id_product_attribute, $id_country, $id_state, $zipcode, $id_currency, $id_group, $cart_quantity, $usetax, $decimals, $only_reduc, $usereduc, $with_ecotax, $specific_price_output, $use_group_reduction, $id_customer, $use_customer_price, $id_cart, $quantity
2490. );
2491. }
2492.
2493. /**
2494. * Price calculation / Get product price
2495. *
ProductCore::getPriceStatic - [line 1461 - classes/Tools.php] - [4 Arguments]
1455. }
1456.
1457. public static function orderbyPrice(&$array, $order_way)
1458. {
1459. foreach ($array as &$row)
1460. $row['price_tmp'] = Product::getPriceStatic($row['id_product'], true, ((isset($row['id_product_attribute']) && !empty($row['id_product_attribute'])) ? (int)$row['id_product_attribute'] : null), 2);
1461. if (strtolower($order_way) == 'desc')
1462. uasort($array, 'cmpPriceDesc');
1463. else
1464. uasort($array, 'cmpPriceAsc');
1465. foreach ($array as &$row)
ToolsCore::orderbyPrice - [line 1089 - classes/Product.php] - [2 Arguments]
1083. AND p.price BETWEEN "' . $price_start . '" AND "' . $price_end . '";
1084. ORDER BY ' . (isset($order_by_prefix) ? pSQL($order_by_prefix) . '.' : '') . '`' . pSQL($order_by) . '` ' . pSQL($order_way) .
1085. ($limit > 0 ? ' LIMIT ' . (int) $start . ',' . (int) $limit : '');
1086. $rq = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
1087. if ($order_by == 'price')
1088. Tools::orderbyPrice($rq, $order_way);
1089.
1090. foreach ($rq as &$row)
1091. $row = Product::getTaxesInformations($row);
1092.
1093. return ($rq);
ProductCore::getProductsByPrice - [line 285 - classes/controller/FrontController.php] - [7 Arguments]
279.
280. $productId = Tools::getValue('id_product');
281. $product = new Product($productId, false, Configuration::get('PS_LANG_DEFAULT'), 'null');
282.
283.
284. $products = Product::getProductsByPrice((int) Context::getContext()->language->id, 0, 10, 'price', 'ASC', $product->price, ((int) $product->price + 100));
285. $this->context->smarty->assign(array('products_by_price' => $products));
286.
287. //$productArr = $product->getProducts(int) Context::getContext()->language->id, 10, 5, 'price', );
288. // $sql = new DbQuery();
289. // $sql->select('*');
FrontControllerCore->init - [line 84 - controllers/front/ProductController.php] - [0 Argument]
78. * Initialize product controller
79. * @see FrontController::init()
80. */
81. public function init()
82. {
83. parent::init();
84.
85. if ($id_product = (int)Tools::getValue('id_product'))
86. $this->product = new Product($id_product, true, $this->context->language->id, $this->context->shop->id);
87.
88. if (!Validate::isLoadedObject($this->product))
ProductControllerCore->init - [line 150 - classes/controller/Controller.php] - [0 Argument]
144. /**
145. * Start controller process (this method shouldn't be overriden !)
146. */
147. public function run()
148. {
149. $this->init();
150. if ($this->checkAccess())
151. {
152. // setMedia MUST be called before postProcess
153. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
154. $this->setMedia();
ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument]
342. // Execute hook dispatcher
343. if (isset($params_hook_action_dispatcher))
344. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
345.
346. // Running controller
347. $controller->run();
348. }
349. catch (PrestaShopException $e)
350. {
351. $e->displayMessage();
352. }
DispatcherCore->dispatch - [line 28 - index.php] - [0 Argument]
22. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23. * International Registered Trademark & Property of PrestaShop SA
24. */
25.
26. require(dirname(__FILE__).'/config/config.inc.php');
27. Dispatcher::getInstance()->dispatch();
28.