Advertisement
Guest User

prestashop error

a guest
Nov 14th, 2013
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.22 KB | None | 0 0
  1. [PrestaShopDatabaseException]
  2.  
  3. Unknown column 'id_lang' in 'field list'
  4.  
  5.  
  6.             SELECT id_customer, customer_email, id_shop, id_lang
  7.             FROM `ps_mailalert_customer_oos`
  8.             WHERE `id_product` = 54 AND `id_product_attribute` = 0
  9.  
  10. at line 613 in file classes/db/Db.php
  11. 607.            WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
  12. 608.        }
  13. 609.        else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
  14. 610.        {
  15. 611.            if ($sql)
  16. 612.                throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
  17. 613.            throw new PrestaShopDatabaseException($this->getMsgError());
  18. 614.        }
  19. 615.    }
  20. 616.
  21. 617.    /**
  22. DbCore->displayError - [line 313 - classes/db/Db.php] - [1 Arguments]
  23. 307.        if ($sql instanceof DbQuery)
  24. 308.            $sql = $sql->build();
  25. 309.
  26. 310.        $this->result = $this->_query($sql);
  27. 311.        if (_PS_DEBUG_SQL_)
  28. 312.            $this->displayError($sql);
  29. 313.        return $this->result;
  30. 314.    }
  31. 315.
  32. 316.    /**
  33. 317.     * Execute an INSERT query
  34. DbCore->query - [line 488 - classes/db/Db.php] - [1 Arguments]
  35. 482.        {
  36. 483.            $this->last_cached = true;
  37. 484.            return $result;
  38. 485.        }
  39. 486.
  40. 487.        $this->result = $this->query($sql);
  41. 488.        if (!$this->result)
  42. 489.            return false;
  43. 490.
  44. 491.        $this->last_cached = false;
  45. 492.        if (!$array)
  46. DbCore->executeS - [line 284 - modules/mailalerts/MailAlert.php] - [1 Arguments]
  47. 278.        $sql = '
  48. 279.            SELECT id_customer, customer_email, id_shop, id_lang
  49. 280.            FROM `'._DB_PREFIX_.self::$definition['table'].'`
  50. 281.            WHERE `id_product` = '.(int)$id_product.' AND `id_product_attribute` = '.(int)$id_product_attribute;
  51. 282.
  52. 283.        return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
  53. 284.    }
  54. 285.
  55. 286. }
  56. MailAlert::getCustomers - [line 175 - modules/mailalerts/MailAlert.php] - [2 Arguments]
  57. 169.
  58. 170.    public static function sendCustomerAlert($id_product, $id_product_attribute)
  59. 171.    {
  60. 172.        $link = new Link();
  61. 173.        $context = Context::getContext()->cloneContext();
  62. 174.        $customers = self::getCustomers($id_product, $id_product_attribute);
  63. 175.       
  64. 176.        foreach ($customers as $customer)
  65. 177.        {
  66. 178.            $id_shop = (int)$customer['id_shop'];
  67. 179.            $id_lang = (int)$customer['id_lang'];
  68. MailAlert::sendCustomerAlert - [line 486 - modules/mailalerts/mailalerts.php] - [2 Arguments]
  69. 480.                }
  70. 481.            }
  71. 482.        }
  72. 483.
  73. 484.        if ($this->_customer_qty && $quantity > 0)
  74. 485.            MailAlert::sendCustomerAlert((int)$product->id, (int)$params['id_product_attribute']);
  75. 486.    }
  76. 487.
  77. 488.    public function hookActionProductAttributeUpdate($params)
  78. 489.    {
  79. 490.        $sql = '
  80. MailAlerts->hookActionUpdateQuantity - [line 457 - classes/Hook.php] - [1 Arguments]
  81. 451.            {
  82. 452.                $hook_args['altern'] = ++$altern;
  83. 453.
  84. 454.                // Call hook method
  85. 455.                if ($hook_callable)
  86. 456.                    $display = $moduleInstance->{'hook'.$hook_name}($hook_args);
  87. 457.                else if ($hook_retro_callable)
  88. 458.                    $display = $moduleInstance->{'hook'.$retro_hook_name}($hook_args);
  89. 459.                // Live edit
  90. 460.                if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')))
  91. 461.                {
  92. HookCore::exec - [line 450 - classes/stock/StockAvailable.php] - [2 Arguments]
  93. 444.                   array(
  94. 445.                    'id_product' => $id_product,
  95. 446.                    'id_product_attribute' => $id_product_attribute,
  96. 447.                    'quantity' => $stock_available->quantity
  97. 448.                   )
  98. 449.                  );
  99. 450.
  100. 451.        return true;
  101. 452.    }
  102. 453.
  103. 454.
  104. StockAvailableCore::updateQuantity - [line 418 - classes/order/OrderDetail.php] - [3 Arguments]
  105. 412.    {
  106. 413.        if ($id_order_state != Configuration::get('PS_OS_CANCELED') && $id_order_state != Configuration::get('PS_OS_ERROR'))
  107. 414.        {
  108. 415.            $update_quantity = true;
  109. 416.            if (!StockAvailable::dependsOnStock($product['id_product']))
  110. 417.                $update_quantity = StockAvailable::updateQuantity($product['id_product'], $product['id_product_attribute'], -(int)$product['cart_quantity']);
  111. 418.
  112. 419.            if ($update_quantity)
  113. 420.                $product['stock_quantity'] -= $product['cart_quantity'];
  114. 421.
  115. 422.            if ($product['stock_quantity'] < 0 && Configuration::get('PS_STOCK_MANAGEMENT'))
  116. OrderDetailCore->checkProductStock - [line 575 - classes/order/OrderDetail.php] - [2 Arguments]
  117. 569.        $productQuantity = (int)(Product::getQuantity($this->product_id, $this->product_attribute_id));
  118. 570.        $this->product_quantity_in_stock = ($productQuantity - (int)($product['cart_quantity']) < 0) ?
  119. 571.            $productQuantity : (int)($product['cart_quantity']);
  120. 572.
  121. 573.        $this->setVirtualProductInformation($product);
  122. 574.        $this->checkProductStock($product, $id_order_state);
  123. 575.
  124. 576.        if ($use_taxes)
  125. 577.            $this->setProductTax($order, $product);
  126. 578.        $this->setShippingCost($order, $product);
  127. 579.        $this->setDetailProductPrice($order, $cart, $product);
  128. OrderDetailCore->create - [line 613 - classes/order/OrderDetail.php] - [7 Arguments]
  129. 607.
  130. 608.        $this->id_order = $order->id;
  131. 609.        $this->outOfStock = false;
  132. 610.
  133. 611.        foreach ($product_list as $product)
  134. 612.            $this->create($order, $cart, $product, $id_order_state, $id_order_invoice, $use_taxes, $id_warehouse);
  135. 613.
  136. 614.        unset($this->vat_address);
  137. 615.        unset($products);
  138. 616.        unset($this->customer);
  139. 617.    }
  140. OrderDetailCore->createList - [line 279 - classes/PaymentModule.php] - [7 Arguments]
  141. 273.
  142. 274.                    $order_list[] = $order;
  143. 275.
  144. 276.                    // Insert new Order detail list using cart for the current order
  145. 277.                    $order_detail = new OrderDetail(null, null, $this->context);
  146. 278.                    $order_detail->createList($order, $this->context->cart, $id_order_state, $order->product_list, 0, true, $package_list[$id_address][$id_package]['id_warehouse']);
  147. 279.                    $order_detail_list[] = $order_detail;
  148. 280.
  149. 281.                    // Adding an entry in order_carrier table
  150. 282.                    if (!is_null($carrier))
  151. 283.                    {
  152. PaymentModuleCore->validateOrder - [line 58 - modules/cashondelivery/controllers/front/validation.php] - [9 Arguments]
  153. 52.
  154. 53.         if (Tools::getValue('confirm'))
  155. 54.         {
  156. 55.             $customer = new Customer((int)$this->context->cart->id_customer);
  157. 56.             $total = $this->context->cart->getOrderTotal(true, Cart::BOTH);
  158. 57.             $this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $this->module->displayName, null, array(), null, false, $customer->secure_key);
  159. 58.             Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?key='.$customer->secure_key.'&id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->module->id.'&id_order='.(int)$this->module->currentOrder);
  160. 59.         }
  161. 60.     }
  162. 61.
  163. 62.     /**
  164. CashondeliveryValidationModuleFrontController->postProcess - [line 158 - classes/controller/Controller.php] - [0 Argument]
  165. 152.            // setMedia MUST be called before postProcess
  166. 153.            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
  167. 154.                $this->setMedia();
  168. 155.
  169. 156.            // postProcess handles ajaxProcess
  170. 157.            $this->postProcess();
  171. 158.
  172. 159.            if (!empty($this->redirect_after))
  173. 160.                $this->redirect();
  174. 161.
  175. 162.            if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
  176. ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument]
  177. 342.            // Execute hook dispatcher
  178. 343.            if (isset($params_hook_action_dispatcher))
  179. 344.                Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
  180. 345.
  181. 346.            // Running controller
  182. 347.            $controller->run();
  183. 348.        }
  184. 349.        catch (PrestaShopException $e)
  185. 350.        {
  186. 351.            $e->displayMessage();
  187. 352.        }
  188. DispatcherCore->dispatch - [line 28 - index.php] - [0 Argument]
  189. 22. *  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  190. 23. *  International Registered Trademark & Property of PrestaShop SA
  191. 24. */
  192. 25.
  193. 26. require(dirname(__FILE__).'/config/config.inc.php');
  194. 27. Dispatcher::getInstance()->dispatch();
  195. 28.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement