Jump to content

Cart does not display product when added


Recommended Posts

Hi,

 

been having a problem with products not adding to the cart when a person clicks on

the add to cart button, any reason why this happening.

 

website: http://www.luxebelow20.com.au/

 

this is what i get back

 

Impossible to add the product to the cart.

 

textStatus: 'error'

errorThrown: ''

responseText:

 

 

feel free to ask if you need to know more to help me out with this problem.

Edited by dkm30 (see edit history)
Link to comment
Share on other sites

This is what i got back when i hit the add to cart button, sorry if its a bit long

 

Impossible to add the product to the cart.

 

textStatus: 'error'

errorThrown: 'Internal Server Error'

responseText:

<style>

#psException{font-family: Verdana; font-size: 14px}

#psException h2{color: #F20000}

#psException p{padding-left: 20px}

#psException ul li{margin-bottom: 10px}

#psException a{font-size: 12px; color: #000000}

#psException .psTrace, #psException .psArgs{display: none}

#psException pre{border: 1px solid #236B04; background-color: #EAFEE1; padding: 5px; font-family: Courier; width: 99%; overflow-x: auto; margin-bottom: 30px;}

#psException .psArgs pre{background-color: #F1FDFE;}

#psException pre .selected{color: #F20000; font-weight: bold;}

</style><div id="psException"><h2>[PrestaShopDatabaseException]</h2><p><b>Unknown column 'mobile_theme' in 'field list'<br /><br /><pre>INSERT INTO `ps_cart` (`id_shop_group`, `id_shop`, `id_address_delivery`, `id_address_invoice`, `id_carrier`, `id_currency`, `id_customer`, `id_guest`, `id_lang`, `recyclable`, `gift`, `gift_message`, `mobile_theme`, `delivery_option`, `secure_key`, `allow_seperated_package`, `date_add`, `date_upd`) VALUES ('1', '1', '0', '0', '0', '1', '0', '0', '1', '0', '0', '', '0', '', '', '0', '2013-08-19 19:16:07', '2013-08-19 19:16:07')</pre></b><br /><i>at line </i><b>607</b><i> in file </i><b>classes/db/Db.php</b></p><div class="psTrace" id="psTrace_" style="display: block"><pre>601. WebserviceRequest::getInstance()->setError(500, '

 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);

602. }

603. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))

604. {

605. if ($sql)

<span class="selected">606. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');

</span>607. throw new PrestaShopDatabaseException($this->getMsgError());

608. }

609. }

610.

611. /**

</pre></div><ul><li><b>DbCore->displayError</b> - <a href="#" style="font-size: 12px; color: #000000" onclick="document.getElementById('psTrace_0').style.display = (document.getElementById('psTrace_0').style.display != 'block') ? 'block' : 'none'; return false">[line 307 - classes/db/Db.php]</a> - <a href="#" onclick="document.getElementById('psArgs_0').style.display = (document.getElementById('psArgs_0').style.display != 'block') ? 'block' : 'none'; return false">[1 Arguments]</a><div class="psTrace" id="psTrace_0" ><pre>301. if ($sql instanceof DbQuery)

302. $sql = $sql->build();

303.

304. $this->result = $this->_query($sql);

305. if (_PS_DEBUG_SQL_)

<span class="selected">306. $this->displayError($sql);

</span>307. return $this->result;

308. }

309.

310. /**

311. * Execute an INSERT query

</pre></div><div class="psArgs" id="psArgs_0"><pre><b>Argument [0]</b>

INSERT INTO `ps_cart` (`id_shop_group`, `id_shop`, `id_address_delivery`, `id_address_invoice`, `id_carrier`, `id_currency`, `id_customer`, `id_guest`, `id_lang`, `recyclable`, `gift`, `gift_message`, `mobile_theme`, `delivery_option`, `secure_key`, `allow_seperated_package`, `date_add`, `date_upd`) VALUES ('1', '1', '0', '0', '0', '1', '0', '0', '1', '0', '0', '', '0', '', '', '0', '2013-08-19 19:16:07', '2013-08-19 19:16:07')

</pre></li><li><b>DbCore->query</b> - <a href="#" style="font-size: 12px; color: #000000" onclick="document.getElementById('psTrace_1').style.display = (document.getElementById('psTrace_1').style.display != 'block') ? 'block' : 'none'; return false">[line 581 - classes/db/Db.php]</a> - <a href="#" onclick="document.getElementById('psArgs_1').style.display = (document.getElementById('psArgs_1').style.display != 'block') ? 'block' : 'none'; return false">[1 Arguments]</a><div class="psTrace" id="psTrace_1" ><pre>575. {

576. if ($sql instanceof DbQuery)

577. $sql = $sql->build();

578.

579. $this->result = false;

<span class="selected">580. $result = $this->query($sql);

</span>581. if ($use_cache && $this->is_cache_enabled)

582. Cache::getInstance()->deleteQuery($sql);

583. if (_PS_DEBUG_SQL_)

584. $this->displayError($sql);

585. return $result;

</pre></div><div class="psArgs" id="psArgs_1"><pre><b>Argument [0]</b>

INSERT INTO `ps_cart` (`id_shop_group`, `id_shop`, `id_address_delivery`, `id_address_invoice`, `id_carrier`, `id_currency`, `id_customer`, `id_guest`, `id_lang`, `recyclable`, `gift`, `gift_message`, `mobile_theme`, `delivery_option`, `secure_key`, `allow_seperated_package`, `date_add`, `date_upd`) VALUES ('1', '1', '0', '0', '0', '1', '0', '0', '1', '0', '0', '', '0', '', '', '0', '2013-08-19 19:16:07', '2013-08-19 19:16:07')

</pre></li><li><b>DbCore->q</b> - <a href="#" style="font-size: 12px; color: #000000" onclick="document.getElementById('psTrace_2').style.display = (document.getElementById('psTrace_2').style.display != 'block') ? 'block' : 'none'; return false">[line 372 - classes/db/Db.php]</a> - <a href="#" onclick="document.getElementById('psArgs_2').style.display = (document.getElementById('psArgs_2').style.display != 'block') ? 'block' : 'none'; return false">[2 Arguments]</a><div class="psTrace" id="psTrace_2" ><pre>366. $keys_stringified = implode(', ', $keys);

367. $values_stringified[] = '('.implode(', ', $values).')';

368. }

369.

370. $sql = $insert_keyword.' INTO `'.$table.'` ('.$keys_stringified.') VALUES '.implode(', ', $values_stringified);

<span class="selected">371. return (bool)$this->q($sql, $use_cache);

</span>372. }

373.

374. /**

375. * @param string $table Table name without prefix

376. * @param array $data Data to insert as associative array. If $data is a list of arrays, multiple insert will be done

</pre></div><div class="psArgs" id="psArgs_2"><pre><b>Argument [0]</b>

INSERT INTO `ps_cart` (`id_shop_group`, `id_shop`, `id_address_delivery`, `id_address_invoice`, `id_carrier`, `id_currency`, `id_customer`, `id_guest`, `id_lang`, `recyclable`, `gift`, `gift_message`, `mobile_theme`, `delivery_option`, `secure_key`, `allow_seperated_package`, `date_add`, `date_upd`) VALUES ('1', '1', '0', '0', '0', '1', '0', '0', '1', '0', '0', '', '0', '', '', '0', '2013-08-19 19:16:07', '2013-08-19 19:16:07')

<b>Argument [1]</b>

1

</pre></li><li><b>DbCore->insert</b> - <a href="#" style="font-size: 12px; color: #000000" onclick="document.getElementById('psTrace_3').style.display = (document.getElementById('psTrace_3').style.display != 'block') ? 'block' : 'none'; return false">[line 465 - classes/ObjectModel.php]</a> - <a href="#" onclick="document.getElementById('psArgs_3').style.display = (document.getElementById('psArgs_3').style.display != 'block') ? 'block' : 'none'; return false">[3 Arguments]</a><div class="psTrace" id="psTrace_3" ><pre>459. // Database insertion

460. if (isset($this->id) && !Tools::getValue('forceIDs'))

461. unset($this->id);

462. if (Shop::checkIdShopDefault($this->def['table']))

463. $this->id_shop_default = min($id_shop_list);

<span class="selected">464. if (!$result = ObjectModel::$db->insert($this->def['table'], $this->getFields(), $null_values))

</span>465. return false;

466.

467. // Get object id in database

468. $this->id = ObjectModel::$db->Insert_ID();

469.

</pre></div><div class="psArgs" id="psArgs_3"><pre><b>Argument [0]</b>

cart

<b>Argument [1]</b>

Array

(

[id_shop_group] => 1

[id_shop] => 1

[id_address_delivery] => 0

[id_address_invoice] => 0

[id_carrier] => 0

[id_currency] => 1

[id_customer] => 0

[id_guest] => 0

[id_lang] => 1

[recyclable] => 0

[gift] => 0

[gift_message] =>

[mobile_theme] => 0

[delivery_option] =>

[secure_key] =>

[allow_seperated_package] => 0

[date_add] => 2013-08-19 19:16:07

[date_upd] => 2013-08-19 19:16:07

)

 

<b>Argument [2]</b>

 

</pre></li><li><b>ObjectModelCore->add</b> - <a href="#" style="font-size: 12px; color: #000000" onclick="document.getElementById('psTrace_4').style.display = (document.getElementById('psTrace_4').style.display != 'block') ? 'block' : 'none'; return false">[line 179 - classes/Cart.php]</a> - <a href="#" onclick="document.getElementById('psArgs_4').style.display = (document.getElementById('psArgs_4').style.display != 'block') ? 'block' : 'none'; return false">[1 Arguments]</a><div class="psTrace" id="psTrace_4" ><pre>173. if (!$this->id_lang)

174. $this->id_lang = Configuration::get('PS_LANG_DEFAULT');

175. if (!$this->id_shop)

176. $this->id_shop = Context::getContext()->shop->id;

177.

<span class="selected">178. $return = parent::add($autodate);

</span>179. Hook::exec('actionCartSave');

180.

181. return $return;

182. }

183.

</pre></div><div class="psArgs" id="psArgs_4"><pre><b>Argument [0]</b>

1

</pre></li><li><b>CartCore->add</b> - <a href="#" style="font-size: 12px; color: #000000" onclick="document.getElementById('psTrace_5').style.display = (document.getElementById('psTrace_5').style.display != 'block') ? 'block' : 'none'; return false">[line 221 - controllers/front/CartController.php]</a> - <span style="font-size: 12px;">[0 Argument]</a><div class="psTrace" id="psTrace_5" ><pre>215. if (Context::getContext()->cookie->id_guest)

216. {

217. $guest = new Guest(Context::getContext()->cookie->id_guest);

218. $this->context->cart->mobile_theme = $guest->mobile_theme;

219. }

<span class="selected">220. $this->context->cart->add();

</span>221. if ($this->context->cart->id)

222. $this->context->cookie->id_cart = (int)$this->context->cart->id;

223. }

224.

225. // Check customizable fields

</pre></div><div class="psArgs" id="psArgs_5"><pre></pre></li><li><b>CartControllerCore->processChangeProductInCart</b> - <a href="#" style="font-size: 12px; color: #000000" onclick="document.getElementById('psTrace_6').style.display = (document.getElementById('psTrace_6').style.display != 'block') ? 'block' : 'none'; return false">[line 68 - controllers/front/CartController.php]</a> - <span style="font-size: 12px;">[0 Argument]</a><div class="psTrace" id="psTrace_6" ><pre>62. {

63. // Update the cart ONLY if $this->cookies are available, in order to avoid ghost carts created by bots

64. if ($this->context->cookie->exists() && !$this->errors && !($this->context->customer->isLogged() && !$this->isTokenValid()))

65. {

66. if (Tools::getIsset('add') || Tools::getIsset('update'))

<span class="selected">67. $this->processChangeProductInCart();

</span>68. else if (Tools::getIsset('delete'))

69. $this->processDeleteProductInCart();

70. else if (Tools::getIsset('changeAddressDelivery'))

71. $this->processChangeProductAddressDelivery();

72. else if (Tools::getIsset('allowSeperatedPackage'))

</pre></div><div class="psArgs" id="psArgs_6"><pre></pre></li><li><b>CartControllerCore->postProcess</b> - <a href="#" style="font-size: 12px; color: #000000" onclick="document.getElementById('psTrace_7').style.display = (document.getElementById('psTrace_7').style.display != 'block') ? 'block' : 'none'; return false">[line 158 - classes/controller/Controller.php]</a> - <span style="font-size: 12px;">[0 Argument]</a><div class="psTrace" id="psTrace_7" ><pre>152. // setMedia MUST be called before postProcess

153. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))

154. $this->setMedia();

155.

156. // postProcess handles ajaxProcess

<span class="selected">157. $this->postProcess();

</span>158.

159. if (!empty($this->redirect_after))

160. $this->redirect();

161.

162. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))

</pre></div><div class="psArgs" id="psArgs_7"><pre></pre></li><li><b>ControllerCore->run</b> - <a href="#" style="font-size: 12px; color: #000000" onclick="document.getElementById('psTrace_8').style.display = (document.getElementById('psTrace_8').style.display != 'block') ? 'block' : 'none'; return false">[line 349 - classes/Dispatcher.php]</a> - <span style="font-size: 12px;">[0 Argument]</a><div class="psTrace" id="psTrace_8" ><pre>343. // Execute hook dispatcher

344. if (isset($params_hook_action_dispatcher))

345. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);

346.

347. // Running controller

<span class="selected">348. $controller->run();

</span>349. }

350. catch (PrestaShopException $e)

351. {

352. $e->displayMessage();

353. }

</pre></div><div class="psArgs" id="psArgs_8"><pre></pre></li><li><b>DispatcherCore->dispatch</b> - <a href="#" style="font-size: 12px; color: #000000" onclick="document.getElementById('psTrace_9').style.display = (document.getElementById('psTrace_9').style.display != 'block') ? 'block' : 'none'; return false">[line 28 - index.php]</a> - <span style="font-size: 12px;">[0 Argument]</a><div class="psTrace" id="psTrace_9" ><pre>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');

<span class="selected">27. Dispatcher::getInstance()->dispatch();

</span>28.

</pre></div><div class="psArgs" id="psArgs_9"><pre></pre></li></ul></div>

Link to comment
Share on other sites

  • 7 months later...
×
×
  • Create New...