Column 'active' in field list is ambiguous
SELECT h.id_hook, h.name as h_name, title, description, h.position, hm.position as hm_position, m.id_module, m.name, active
FROM `empro_hook_module` hm
STRAIGHT_JOIN `empro_hook` h ON (h.id_hook = hm.id_hook AND hm.id_shop = 1)
STRAIGHT_JOIN `empro_module` as m ON (m.id_module = hm.id_module)
ORDER BY hm.position
at line 769 in file classes/db/Db.php
764. if ($webservice_call && $errno) {
765. $dbg = debug_backtrace();
766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97);
767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
768. if ($sql) {
769. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>');
770. }
771.
772. throw new PrestaShopDatabaseException($this->getMsgError());
773. }
774. }
380. $this->result = $this->_query($sql);
381. }
382. }
383.
384. if (_PS_DEBUG_SQL_) {
385. $this->displayError($sql);
386. }
387.
388. return $this->result;
389. }
390.
Argument [0] SELECT h.id_hook, h.name as h_name, title, description, h.position, hm.position as hm_position, m.id_module, m.name, active FROM `empro_hook_module` hm STRAIGHT_JOIN `empro_hook` h ON (h.id_hook = hm.id_hook AND hm.id_shop = 1) STRAIGHT_JOIN `empro_module` as m ON (m.id_module = hm.id_module) ORDER BY hm.position
608. }
609.
610. return $this->execute($sql, $use_cache);
611. }
612.
613. $this->result = $this->query($sql);
614.
615. if (!$this->result) {
616. $result = false;
617. } else {
618. if (!$array) {
Argument [0] SELECT h.id_hook, h.name as h_name, title, description, h.position, hm.position as hm_position, m.id_module, m.name, active FROM `empro_hook_module` hm STRAIGHT_JOIN `empro_hook` h ON (h.id_hook = hm.id_hook AND hm.id_shop = 1) STRAIGHT_JOIN `empro_module` as m ON (m.id_module = hm.id_module) ORDER BY hm.position
402. if (!Cache::isStored($cache_id)) {
403. $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
404. SELECT h.id_hook, h.name as h_name, title, description, h.position, hm.position as hm_position, m.id_module, m.name, active
405. FROM `' . _DB_PREFIX_ . 'hook_module` hm
406. STRAIGHT_JOIN `' . _DB_PREFIX_ . 'hook` h ON (h.id_hook = hm.id_hook AND hm.id_shop = ' . (int) Context::getContext()->shop->id . ')
407. STRAIGHT_JOIN `' . _DB_PREFIX_ . 'module` as m ON (m.id_module = hm.id_module)
408. ORDER BY hm.position');
409. $list = array();
410. foreach ($results as $result) {
411. if (!isset($list[$result['id_hook']])) {
412. $list[$result['id_hook']] = array();
Argument [0] SELECT h.id_hook, h.name as h_name, title, description, h.position, hm.position as hm_position, m.id_module, m.name, active FROM `empro_hook_module` hm STRAIGHT_JOIN `empro_hook` h ON (h.id_hook = hm.id_hook AND hm.id_shop = 1) STRAIGHT_JOIN `empro_module` as m ON (m.id_module = hm.id_module) ORDER BY hm.position
444. *
445. * @return array Modules List
446. */
447. public static function getModulesFromHook($id_hook, $id_module = null)
448. {
449. $hm_list = Hook::getHookModuleList();
450. $module_list = (isset($hm_list[$id_hook])) ? $hm_list[$id_hook] : array();
451.
452. if ($id_module) {
453. return (isset($module_list[$id_module])) ? array($module_list[$id_module]) : array();
454. }
62. *
63. * @return TaxManagerInterface|false
64. */
65. public static function execHookTaxManagerFactory(Address $address, $type)
66. {
67. $modules_infos = Hook::getModulesFromHook(Hook::getIdByName('taxManager'));
68. $tax_manager = false;
69.
70. foreach ($modules_infos as $module_infos) {
71. $module_instance = Module::getInstanceByName($module_infos['name']);
72. if (is_callable(array($module_instance, 'hookTaxManager'))) {
Argument [0] 98
41. */
42. public static function getManager(Address $address, $type)
43. {
44. $cache_id = TaxManagerFactory::getCacheKey($address) . '-' . $type;
45. if (!isset(TaxManagerFactory::$cache_tax_manager[$cache_id])) {
46. $tax_manager = TaxManagerFactory::execHookTaxManagerFactory($address, $type);
47. if (!($tax_manager instanceof TaxManagerInterface)) {
48. $tax_manager = new TaxRulesTaxManager($address, $type);
49. }
50.
51. TaxManagerFactory::$cache_tax_manager[$cache_id] = $tax_manager;
Argument [0] Address Object ( [id_customer] => [id_manufacturer] => [id_supplier] => [id_warehouse] => [id_country] => 8 [id_state] => [country] => [alias] => [company] => [lastname] => [firstname] => [address1] => [address2] => [postcode] => 14460 [city] => [other] => [phone] => [phone_mobile] => [vat_number] => [dni] => [date_add] => [date_upd] => [deleted] => 0 [webserviceParameters:protected] => Array ( [objectsNodeName] => addresses [fields] => Array ( [id_customer] => Array ( [xlink_resource] => customers ) [id_manufacturer] => Array ( [xlink_resource] => manufacturers ) [id_supplier] => Array ( [xlink_resource] => suppliers ) [id_warehouse] => Array ( [xlink_resource] => warehouse ) [id_country] => Array ( [xlink_resource] => countries ) [id_state] => Array ( [xlink_resource] => states ) ) ) [id] => [id_lang:protected] => [id_shop:protected] => [id_shop_list] => Array ( ) [get_shop_from_context:protected] => 1 [table:protected] => address [identifier:protected] => id_address [fieldsRequired:protected] => Array ( [0] => id_country [1] => alias [2] => lastname [3] => firstname [4] => address1 [5] => city ) [fieldsSize:protected] => Array ( [alias] => 32 [company] => 255 [lastname] => 255 [firstname] => 255 [address1] => 128 [address2] => 128 [postcode] => 12 [city] => 64 [other] => 300 [phone] => 32 [phone_mobile] => 32 [dni] => 16 ) [fieldsValidate:protected] => Array ( [id_customer] => isNullOrUnsignedId [id_manufacturer] => isNullOrUnsignedId [id_supplier] => isNullOrUnsignedId [id_warehouse] => isNullOrUnsignedId [id_country] => isUnsignedId [id_state] => isNullOrUnsignedId [alias] => isGenericName [company] => isGenericName [lastname] => isName [firstname] => isName [vat_number] => isGenericName [address1] => isAddress [address2] => isAddress [postcode] => isPostCode [city] => isCityName [other] => isMessage [phone] => isPhoneNumber [phone_mobile] => isPhoneNumber [dni] => isDniLite [deleted] => isBool [date_add] => isDate [date_upd] => isDate ) [fieldsRequiredLang:protected] => Array ( ) [fieldsSizeLang:protected] => Array ( ) [fieldsValidateLang:protected] => Array ( ) [tables:protected] => Array ( ) [image_dir:protected] => [image_format:protected] => jpg [translator:protected] => [def:protected] => Array ( [table] => address [primary] => id_address [fields] => Array ( [id_customer] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_manufacturer] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_supplier] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_warehouse] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_country] => Array ( [type] => 1 [validate] => isUnsignedId [required] => 1 ) [id_state] => Array ( [type] => 1 [validate] => isNullOrUnsignedId ) [alias] => Array ( [type] => 3 [validate] => isGenericName [required] => 1 [size] => 32 ) [company] => Array ( [type] => 3 [validate] => isGenericName [size] => 255 ) [lastname] => Array ( [type] => 3 [validate] => isName [required] => 1 [size] => 255 ) [firstname] => Array ( [type] => 3 [validate] => isName [required] => 1 [size] => 255 ) [vat_number] => Array ( [type] => 3 [validate] => isGenericName ) [address1] => Array ( [type] => 3 [validate] => isAddress [required] => 1 [size] => 128 ) [address2] => Array ( [type] => 3 [validate] => isAddress [size] => 128 ) [postcode] => Array ( [type] => 3 [validate] => isPostCode [size] => 12 ) [city] => Array ( [type] => 3 [validate] => isCityName [required] => 1 [size] => 64 ) [other] => Array ( [type] => 3 [validate] => isMessage [size] => 300 ) [phone] => Array ( [type] => 3 [validate] => isPhoneNumber [size] => 32 ) [phone_mobile] => Array ( [type] => 3 [validate] => isPhoneNumber [size] => 32 ) [dni] => Array ( [type] => 3 [validate] => isDniLite [size] => 16 ) [deleted] => Array ( [type] => 2 [validate] => isBool [copy_post] => ) [date_add] => Array ( [type] => 5 [validate] => isDate [copy_post] => ) [date_upd] => Array ( [type] => 5 [validate] => isDate [copy_post] => ) ) [classname] => Address ) [update_fields:protected] => [force_id] => ) Argument [1] 1
5711. {
5712. if (!$address || !$address->id_country) {
5713. $address = Address::initialize();
5714. }
5715.
5716. $tax_manager = TaxManagerFactory::getManager($address, $this->id_tax_rules_group);
5717. $tax_calculator = $tax_manager->getTaxCalculator();
5718.
5719. return $tax_calculator->getTotalRate();
5720. }
5721.
Argument [0] Address Object ( [id_customer] => [id_manufacturer] => [id_supplier] => [id_warehouse] => [id_country] => 8 [id_state] => [country] => [alias] => [company] => [lastname] => [firstname] => [address1] => [address2] => [postcode] => 14460 [city] => [other] => [phone] => [phone_mobile] => [vat_number] => [dni] => [date_add] => [date_upd] => [deleted] => 0 [webserviceParameters:protected] => Array ( [objectsNodeName] => addresses [fields] => Array ( [id_customer] => Array ( [xlink_resource] => customers ) [id_manufacturer] => Array ( [xlink_resource] => manufacturers ) [id_supplier] => Array ( [xlink_resource] => suppliers ) [id_warehouse] => Array ( [xlink_resource] => warehouse ) [id_country] => Array ( [xlink_resource] => countries ) [id_state] => Array ( [xlink_resource] => states ) ) ) [id] => [id_lang:protected] => [id_shop:protected] => [id_shop_list] => Array ( ) [get_shop_from_context:protected] => 1 [table:protected] => address [identifier:protected] => id_address [fieldsRequired:protected] => Array ( [0] => id_country [1] => alias [2] => lastname [3] => firstname [4] => address1 [5] => city ) [fieldsSize:protected] => Array ( [alias] => 32 [company] => 255 [lastname] => 255 [firstname] => 255 [address1] => 128 [address2] => 128 [postcode] => 12 [city] => 64 [other] => 300 [phone] => 32 [phone_mobile] => 32 [dni] => 16 ) [fieldsValidate:protected] => Array ( [id_customer] => isNullOrUnsignedId [id_manufacturer] => isNullOrUnsignedId [id_supplier] => isNullOrUnsignedId [id_warehouse] => isNullOrUnsignedId [id_country] => isUnsignedId [id_state] => isNullOrUnsignedId [alias] => isGenericName [company] => isGenericName [lastname] => isName [firstname] => isName [vat_number] => isGenericName [address1] => isAddress [address2] => isAddress [postcode] => isPostCode [city] => isCityName [other] => isMessage [phone] => isPhoneNumber [phone_mobile] => isPhoneNumber [dni] => isDniLite [deleted] => isBool [date_add] => isDate [date_upd] => isDate ) [fieldsRequiredLang:protected] => Array ( ) [fieldsSizeLang:protected] => Array ( ) [fieldsValidateLang:protected] => Array ( ) [tables:protected] => Array ( ) [image_dir:protected] => [image_format:protected] => jpg [translator:protected] => [def:protected] => Array ( [table] => address [primary] => id_address [fields] => Array ( [id_customer] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_manufacturer] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_supplier] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_warehouse] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_country] => Array ( [type] => 1 [validate] => isUnsignedId [required] => 1 ) [id_state] => Array ( [type] => 1 [validate] => isNullOrUnsignedId ) [alias] => Array ( [type] => 3 [validate] => isGenericName [required] => 1 [size] => 32 ) [company] => Array ( [type] => 3 [validate] => isGenericName [size] => 255 ) [lastname] => Array ( [type] => 3 [validate] => isName [required] => 1 [size] => 255 ) [firstname] => Array ( [type] => 3 [validate] => isName [required] => 1 [size] => 255 ) [vat_number] => Array ( [type] => 3 [validate] => isGenericName ) [address1] => Array ( [type] => 3 [validate] => isAddress [required] => 1 [size] => 128 ) [address2] => Array ( [type] => 3 [validate] => isAddress [size] => 128 ) [postcode] => Array ( [type] => 3 [validate] => isPostCode [size] => 12 ) [city] => Array ( [type] => 3 [validate] => isCityName [required] => 1 [size] => 64 ) [other] => Array ( [type] => 3 [validate] => isMessage [size] => 300 ) [phone] => Array ( [type] => 3 [validate] => isPhoneNumber [size] => 32 ) [phone_mobile] => Array ( [type] => 3 [validate] => isPhoneNumber [size] => 32 ) [dni] => Array ( [type] => 3 [validate] => isDniLite [size] => 16 ) [deleted] => Array ( [type] => 2 [validate] => isBool [copy_post] => ) [date_add] => Array ( [type] => 5 [validate] => isDate [copy_post] => ) [date_upd] => Array ( [type] => 5 [validate] => isDate [copy_post] => ) ) [classname] => Address ) [update_fields:protected] => [force_id] => ) Argument [1] 1
561. $address = null;
562. if (is_object($context->cart) && $context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')} != null) {
563. $address = $context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
564. }
565.
566. $this->tax_rate = $this->getTaxesRate(new Address($address));
567.
568. $this->new = $this->isNew();
569.
570. // Keep base price
571. $this->base_price = $this->price;
Argument [0] Address Object ( [id_customer] => [id_manufacturer] => [id_supplier] => [id_warehouse] => [id_country] => 8 [id_state] => [country] => [alias] => [company] => [lastname] => [firstname] => [address1] => [address2] => [postcode] => 14460 [city] => [other] => [phone] => [phone_mobile] => [vat_number] => [dni] => [date_add] => [date_upd] => [deleted] => 0 [webserviceParameters:protected] => Array ( [objectsNodeName] => addresses [fields] => Array ( [id_customer] => Array ( [xlink_resource] => customers ) [id_manufacturer] => Array ( [xlink_resource] => manufacturers ) [id_supplier] => Array ( [xlink_resource] => suppliers ) [id_warehouse] => Array ( [xlink_resource] => warehouse ) [id_country] => Array ( [xlink_resource] => countries ) [id_state] => Array ( [xlink_resource] => states ) ) ) [id] => [id_lang:protected] => [id_shop:protected] => [id_shop_list] => Array ( ) [get_shop_from_context:protected] => 1 [table:protected] => address [identifier:protected] => id_address [fieldsRequired:protected] => Array ( [0] => id_country [1] => alias [2] => lastname [3] => firstname [4] => address1 [5] => city ) [fieldsSize:protected] => Array ( [alias] => 32 [company] => 255 [lastname] => 255 [firstname] => 255 [address1] => 128 [address2] => 128 [postcode] => 12 [city] => 64 [other] => 300 [phone] => 32 [phone_mobile] => 32 [dni] => 16 ) [fieldsValidate:protected] => Array ( [id_customer] => isNullOrUnsignedId [id_manufacturer] => isNullOrUnsignedId [id_supplier] => isNullOrUnsignedId [id_warehouse] => isNullOrUnsignedId [id_country] => isUnsignedId [id_state] => isNullOrUnsignedId [alias] => isGenericName [company] => isGenericName [lastname] => isName [firstname] => isName [vat_number] => isGenericName [address1] => isAddress [address2] => isAddress [postcode] => isPostCode [city] => isCityName [other] => isMessage [phone] => isPhoneNumber [phone_mobile] => isPhoneNumber [dni] => isDniLite [deleted] => isBool [date_add] => isDate [date_upd] => isDate ) [fieldsRequiredLang:protected] => Array ( ) [fieldsSizeLang:protected] => Array ( ) [fieldsValidateLang:protected] => Array ( ) [tables:protected] => Array ( ) [image_dir:protected] => [image_format:protected] => jpg [translator:protected] => [def:protected] => Array ( [table] => address [primary] => id_address [fields] => Array ( [id_customer] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_manufacturer] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_supplier] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_warehouse] => Array ( [type] => 1 [validate] => isNullOrUnsignedId [copy_post] => ) [id_country] => Array ( [type] => 1 [validate] => isUnsignedId [required] => 1 ) [id_state] => Array ( [type] => 1 [validate] => isNullOrUnsignedId ) [alias] => Array ( [type] => 3 [validate] => isGenericName [required] => 1 [size] => 32 ) [company] => Array ( [type] => 3 [validate] => isGenericName [size] => 255 ) [lastname] => Array ( [type] => 3 [validate] => isName [required] => 1 [size] => 255 ) [firstname] => Array ( [type] => 3 [validate] => isName [required] => 1 [size] => 255 ) [vat_number] => Array ( [type] => 3 [validate] => isGenericName ) [address1] => Array ( [type] => 3 [validate] => isAddress [required] => 1 [size] => 128 ) [address2] => Array ( [type] => 3 [validate] => isAddress [size] => 128 ) [postcode] => Array ( [type] => 3 [validate] => isPostCode [size] => 12 ) [city] => Array ( [type] => 3 [validate] => isCityName [required] => 1 [size] => 64 ) [other] => Array ( [type] => 3 [validate] => isMessage [size] => 300 ) [phone] => Array ( [type] => 3 [validate] => isPhoneNumber [size] => 32 ) [phone_mobile] => Array ( [type] => 3 [validate] => isPhoneNumber [size] => 32 ) [dni] => Array ( [type] => 3 [validate] => isDniLite [size] => 16 ) [deleted] => Array ( [type] => 2 [validate] => isBool [copy_post] => ) [date_add] => Array ( [type] => 5 [validate] => isDate [copy_post] => ) [date_upd] => Array ( [type] => 5 [validate] => isDate [copy_post] => ) ) [classname] => Address ) [update_fields:protected] => [force_id] => )
94. 'entity' => 'product',
95. 'id' => $id_product,
96. ));
97.
98. if ($id_product) {
99. $this->product = new Product($id_product, true, $this->context->language->id, $this->context->shop->id);
100. }
101.
102. if (!Validate::isLoadedObject($this->product)) {
103. Tools::redirect('index.php?controller=404');
104. } else {
Argument [0] 414 Argument [1] 1 Argument [2] 1 Argument [3] 1
268. /**
269. * Starts the controller process (this method should not be overridden!).
270. */
271. public function run()
272. {
273. $this->init();
274. if ($this->checkAccess()) {
275. // setMedia MUST be called before postProcess
276. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
277. $this->setMedia();
278. }
510. if (isset($params_hook_action_dispatcher)) {
511. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
512. }
513.
514. // Running controller
515. $controller->run();
516.
517. // Execute hook dispatcher after
518. if (isset($params_hook_action_dispatcher)) {
519. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
520. }
23. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
24. * International Registered Trademark & Property of PrestaShop SA
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();