User 'mrvapefrzvweb' has exceeded the 'max_questions' resource (current value: 40000)SELECT *
FROM `ps_currency` a
LEFT JOIN `ps_currency_lang` `b` ON a.`id_currency` = b.`id_currency` AND b.`id_lang` = 1
LEFT JOIN `ps_currency_shop` `c` ON a.`id_currency` = c.`id_currency` AND c.`id_shop` = 1
WHERE (a.`id_currency` = 1) LIMIT 1
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 * FROM `ps_currency` a LEFT JOIN `ps_currency_lang` `b` ON a.`id_currency` = b.`id_currency` AND b.`id_lang` = 1 LEFT JOIN `ps_currency_shop` `c` ON a.`id_currency` = c.`id_currency` AND c.`id_shop` = 1 WHERE (a.`id_currency` = 1) LIMIT 1
658.
659. return $result;
660. }
661. }
662.
663. $this->result = $this->query($sql);
664. if (!$this->result) {
665. $result = false;
666. } else {
667. $result = $this->nextRow($this->result);
668. }
Argument [0] SELECT * FROM `ps_currency` a LEFT JOIN `ps_currency_lang` `b` ON a.`id_currency` = b.`id_currency` AND b.`id_lang` = 1 LEFT JOIN `ps_currency_shop` `c` ON a.`id_currency` = c.`id_currency` AND c.`id_shop` = 1 WHERE (a.`id_currency` = 1) LIMIT 1
70. // Get shop informations
71. if (Shop::isTableAssociated($entity_defs['table'])) {
72. $sql->leftJoin($entity_defs['table'] . '_shop', 'c', 'a.`' . bqSQL($entity_defs['primary']) . '` = c.`' . bqSQL($entity_defs['primary']) . '` AND c.`id_shop` = ' . (int) $id_shop);
73. }
74.
75. if ($object_datas = Db::getInstance()->getRow($sql)) {
76. if (!$id_lang && isset($entity_defs['multilang']) && $entity_defs['multilang']) {
77. $sql = 'SELECT *
78. FROM `' . bqSQL(_DB_PREFIX_ . $entity_defs['table']) . '_lang`
79. WHERE `' . bqSQL($entity_defs['primary']) . '` = ' . (int) $id
80. . (($id_shop && $entity->isLangMultishop()) ? ' AND `id_shop` = ' . (int) $id_shop : '');
Argument [0] SELECT * FROM `ps_currency` a LEFT JOIN `ps_currency_lang` `b` ON a.`id_currency` = b.`id_currency` AND b.`id_lang` = 1 LEFT JOIN `ps_currency_shop` `c` ON a.`id_currency` = c.`id_currency` AND c.`id_shop` = 1 WHERE (a.`id_currency` = 1) LIMIT 1
259. $this->id_shop = Context::getContext()->shop->id;
260. }
261.
262. if ($id) {
263. $entity_mapper = ServiceLocator::get('\\PrestaShop\\PrestaShop\\Adapter\\EntityMapper');
264. $entity_mapper->load($id, $id_lang, $this, $this->def, $this->id_shop, self::$cache_objects);
265. }
266. }
267.
268. protected function trans($id, array $parameters = array(), $domain = null, $locale = null)
269. {
Argument [0]
1
Argument [1]
1
Argument [2]
Currency Object
(
[id] =>
[name] =>
[iso_code] =>
[iso_code_num] =>
[numeric_iso_code] =>
[conversion_rate] =>
[deleted] => 0
[active] =>
[sign] =>
[symbol] =>
[format] =>
[blank] =>
[decimals] =>
[precision] =>
[webserviceParameters:protected] => Array
(
[objectsNodeName] => currencies
)
[prefix] =>
[suffix] =>
[id_lang:protected] => 1
[id_shop:protected] => 1
[id_shop_list] => Array
(
)
[get_shop_from_context:protected] => 1
[table:protected] => currency
[identifier:protected] => id_currency
[fieldsRequired:protected] => Array
(
[0] => iso_code
[1] => conversion_rate
)
[fieldsSize:protected] => Array
(
[iso_code] => 3
[numeric_iso_code] => 3
)
[fieldsValidate:protected] => Array
(
[iso_code] => isLanguageIsoCode
[numeric_iso_code] => isNumericIsoCode
[precision] => isInt
[conversion_rate] => isUnsignedFloat
[deleted] => isBool
[active] => isBool
)
[fieldsRequiredLang:protected] => Array
(
)
[fieldsSizeLang:protected] => Array
(
[name] => 255
[symbol] => 255
)
[fieldsValidateLang:protected] => Array
(
[name] => isGenericName
)
[tables:protected] => Array
(
)
[image_dir:protected] =>
[image_format:protected] => jpg
[translator:protected] =>
[def:protected] => Array
(
[table] => currency
[primary] => id_currency
[multilang] => 1
[fields] => Array
(
[iso_code] => Array
(
[type] => 3
[validate] => isLanguageIsoCode
[required] => 1
[size] => 3
)
[numeric_iso_code] => Array
(
[type] => 3
[validate] => isNumericIsoCode
[size] => 3
)
[precision] => Array
(
[type] => 1
[validate] => isInt
)
[conversion_rate] => Array
(
[type] => 4
[validate] => isUnsignedFloat
[required] => 1
[shop] => 1
)
[deleted] => Array
(
[type] => 2
[validate] => isBool
)
[active] => Array
(
[type] => 2
[validate] => isBool
)
[name] => Array
(
[type] => 3
[lang] => 1
[validate] => isGenericName
[size] => 255
)
[symbol] => Array
(
[type] => 3
[lang] => 1
[size] => 255
)
)
[classname] => Currency
[associations] => Array
(
[l] => Array
(
[type] => 2
[field] => id_currency
[foreign_field] => id_currency
)
)
)
[update_fields:protected] =>
[force_id] =>
)
Argument [3]
Array
(
[table] => currency
[primary] => id_currency
[multilang] => 1
[fields] => Array
(
[iso_code] => Array
(
[type] => 3
[validate] => isLanguageIsoCode
[required] => 1
[size] => 3
)
[numeric_iso_code] => Array
(
[type] => 3
[validate] => isNumericIsoCode
[size] => 3
)
[precision] => Array
(
[type] => 1
[validate] => isInt
)
[conversion_rate] => Array
(
[type] => 4
[validate] => isUnsignedFloat
[required] => 1
[shop] => 1
)
[deleted] => Array
(
[type] => 2
[validate] => isBool
)
[active] => Array
(
[type] => 2
[validate] => isBool
)
[name] => Array
(
[type] => 3
[lang] => 1
[validate] => isGenericName
[size] => 255
)
[symbol] => Array
(
[type] => 3
[lang] => 1
[size] => 255
)
)
[classname] => Currency
[associations] => Array
(
[l] => Array
(
[type] => 2
[field] => id_currency
[foreign_field] => id_currency
)
)
)
Argument [4]
1
Argument [5]
1
172. * @param false|null $idLang if null or false, default language will be used
173. * @param null $idShop
174. */
175. public function __construct($id = null, $idLang = null, $idShop = null)
176. {
177. parent::__construct($id, $idLang, $idShop);
178.
179. if ($this->iso_code) {
180. // As the CLDR used to return a string even if in multi shop / lang,
181. // We force only one string to be returned
182. if (empty($idLang)) {
Argument [0] 1 Argument [1] 1 Argument [2]
96.
97. if (empty($idLang)) {
98. $idLang = $this->configuration->get('PS_LANG_DEFAULT');
99. }
100.
101. return new Currency($currencyId, $idLang);
102. }
103.
104. /**
105. * Get a Currency entity instance by ISO code.
106. *
Argument [0] 1 Argument [1] 1
114. */
115. public function getCurrencyByIsoCodeAndLocale($isoCode, $locale)
116. {
117. $idLang = Language::getIdByLocale($locale);
118.
119. return $this->getCurrencyByIsoCode($isoCode, $idLang);
120. }
121.
122. /**
123. * Get a Currency entity instance.
124. * If the passed ISO code is known, this Currency entity will be loaded with known data.
Argument [0] EUR Argument [1] 1
87. throw new LocalizationException('First parameter must be an instance of ' . LocalizedCurrencyId::class);
88. }
89.
90. $localeCode = $currencyDataId->getLocaleCode();
91. $currencyCode = $currencyDataId->getCurrencyCode();
92. $currencyEntity = $this->dataProvider->getCurrencyByIsoCodeAndLocale($currencyCode, $localeCode);
93.
94. if (null === $currencyEntity) {
95. return null;
96. }
97.
Argument [0] EUR Argument [1] fr-FR
85. *
86. * @throws DataLayerException
87. */
88. public function read($id)
89. {
90. $data = $this->doRead($id);
91.
92. // If nothing found, ask lower layer
93. if (null === $data) {
94. $data = $this->propagateRead($id);
95.
Argument [0]
PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId Object
(
[currencyCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => EUR
[localeCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => fr-FR
)
145. * @throws DataLayerException
146. */
147. protected function propagateRead($field)
148. {
149. if (isset($this->lowerDataLayer)) {
150. return $this->lowerDataLayer->read($field);
151. }
152.
153. return null;
154. }
155.
Argument [0]
PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId Object
(
[currencyCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => EUR
[localeCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => fr-FR
)
89. {
90. $data = $this->doRead($id);
91.
92. // If nothing found, ask lower layer
93. if (null === $data) {
94. $data = $this->propagateRead($id);
95.
96. // If nothing was found deeper, there is nothing more to do
97. if (null === $data) {
98. return null;
99. }
Argument [0]
PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId Object
(
[currencyCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => EUR
[localeCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => fr-FR
)
68. * @return CurrencyData
69. * The currency data
70. */
71. public function getLocalizedCurrencyData(LocalizedCurrencyId $localizedCurrencyId)
72. {
73. return $this->topLayer->read($localizedCurrencyId);
74. }
75.
76. /**
77. * Is this currency available ?
78. * (an available currency is not deleted AND is active).
Argument [0]
PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId Object
(
[currencyCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => EUR
[localeCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => fr-FR
)
99. public function getAvailableCurrenciesData($localeCode)
100. {
101. $currencyCodes = $this->installedDataLayer->getAvailableCurrencyCodes();
102. $currenciesData = [];
103. foreach ($currencyCodes as $currencyCode) {
104. $currenciesData[] = $this->getLocalizedCurrencyData(new LocalizedCurrencyId($currencyCode, $localeCode));
105. }
106.
107. return $currenciesData;
108. }
109. }
Argument [0]
PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId Object
(
[currencyCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => EUR
[localeCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => fr-FR
)
89. * The available currencies
90. */
91. public function getAvailableCurrencies($localeCode)
92. {
93. $currencies = new CurrencyCollection();
94. $currenciesData = $this->dataSource->getAvailableCurrenciesData($localeCode);
95.
96. foreach ($currenciesData as $currencyDatum) {
97. $currencies->add(new Currency(
98. $currencyDatum->isActive(),
99. $currencyDatum->getConversionRate(),
Argument [0] fr-FR
202. $cldrLocale = $this->cldrLocaleRepository->getLocale($localeCode);
203. if (null === $cldrLocale) {
204. throw new LocalizationException('CLDR locale not found for locale code "' . $localeCode . '"');
205. }
206.
207. $currencies = $this->currencyRepository->getAvailableCurrencies($localeCode);
208.
209. $priceSpecifications = new PriceSpecificationMap();
210. foreach ($currencies as $currency) {
211. // Build the spec
212. $thisPriceSpecification = (new SpecificationFactory())->buildPriceSpecification(
Argument [0] fr-FR
145. {
146. if (!isset($this->locales[$localeCode])) {
147. $this->locales[$localeCode] = new Locale(
148. $localeCode,
149. $this->getNumberSpecification($localeCode),
150. $this->getPriceSpecifications($localeCode),
151. new NumberFormatter($this->roundingMode, $this->numberingSystem)
152. );
153. }
154.
155. return $this->locales[$localeCode];
Argument [0] fr-FR
184. $this->container = $this->buildContainer();
185. }
186.
187. $localeRepo = $this->get(self::SERVICE_LOCALE_REPOSITORY);
188. $this->context->currentLocale = $localeRepo->getLocale(
189. $this->context->language->getLocale()
190. );
191. }
192.
193. /**
194. * Do the page treatment: process input, process AJAX, etc.
Argument [0] fr-FR
266. return;
267. }
268.
269. self::$initialized = true;
270.
271. parent::init();
272.
273. // enable Symfony error handler if debug mode enabled
274. $this->initDebugguer();
275.
276. // If current URL use SSL, set it true (used a lot for module redirect)
87.
88. if (!Validate::isLoadedObject($this->category) || !$this->category->active) {
89. Tools::redirect('index.php?controller=404');
90. }
91.
92. parent::init();
93.
94. if (!$this->category->checkAccess($this->context->customer->id)) {
95. header('HTTP/1.1 403 Forbidden');
96. header('Status: 403 Forbidden');
97. $this->errors[] = $this->trans('You do not have access to this category.', array(), 'Shop.Notifications.Error');
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();