Property Cart->id_currency is empty
at line 909 in file classes/ObjectModel.php
904. }
905.
906. $message = $this->validateField($field, $this->$field);
907. if ($message !== true) {
908. if ($die) {
909. throw new PrestaShopException($message);
910. }
911. return $error_return ? $message : false;
912. }
913. }
914.
241. * @return array All object fields
242. * @throws PrestaShopException
243. */
244. public function getFields()
245. {
246. $this->validateFields();
247. $fields = $this->formatFields(self::FORMAT_COMMON);
248.
249. // For retro compatibility
250. if (Shop::isTableAssociated($this->def['table'])) {
251. $fields = array_merge($fields, $this->getFieldsShop());
482.
483. // Database insertion
484. if (Shop::checkIdShopDefault($this->def['table'])) {
485. $this->id_shop_default = (in_array(Configuration::get('PS_SHOP_DEFAULT'), $id_shop_list) == true) ? Configuration::get('PS_SHOP_DEFAULT') : min($id_shop_list);
486. }
487. if (!$result = Db::getInstance()->insert($this->def['table'], $this->getFields(), $null_values)) {
488. return false;
489. }
490.
491. // Get object id in database
492. $this->id = Db::getInstance()->Insert_ID();
191. }
192. if (!$this->id_shop) {
193. $this->id_shop = Context::getContext()->shop->id;
194. }
195.
196. $return = parent::add($autodate, $null_values);
197. Hook::exec('actionCartSave');
198.
199. return $return;
200. }
201.
Argument [0] 1 Argument [1]
36. if (!$this->context->cart->id) {
37. if (Context::getContext()->cookie->id_guest) {
38. $guest = new Guest(Context::getContext()->cookie->id_guest);
39. $this->context->cart->mobile_theme = $guest->mobile_theme;
40. }
41. $this->context->cart->add();
42. if ($this->context->cart->id) {
43. $this->context->cookie->id_cart = (int) $this->context->cart->id;
44. }
45. }
46. $cart = new Cart((int) $this->context->cart->id);
184. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
185. $this->initHeader();
186. }
187.
188. if ($this->viewAccess()) {
189. $this->initContent();
190. } else {
191. $this->errors[] = Tools::displayError('Access denied.');
192. }
193.
194. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
362. if (isset($params_hook_action_dispatcher)) {
363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
364. }
365.
366. // Running controller
367. $controller->run();
368. } catch (PrestaShopException $e) {
369. $e->displayMessage();
370. }
371. }
372.
23. * @license http://opensource.org/licenses/osl-3.0.php 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();