Jump to content

[solved] cant add to cart,login,register new customers


Recommended Posts

Hi

 

I have problem with my shop

 

Some time ago i gought a theme Pinshop (@smartdatasoft development - highly NOT recommended poor support) which wasnt working properly i decided to uninstall it and go back to default prestashop one. but my website looked wierd most of modules were off, misposiotioned and i didnt know how to go back to default settings so i did a fresh install and restored my database in phpMyadmin.

 

All seemed to be fine till i tried add something to cart, login or register new customer (even in BO cant do that).

When trying to add to cart picture flies to cart but cart is not updating and when i click on it it says nothing in the cart. in config/defines.inc.php i changed

 

define('_PS_MODE_DEV_', false);

 

to

 

define('_PS_MODE_DEV_', true);

 

and error in new window appear:

 

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_2cart` (`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', '2', '7', '0', '0', '', '0', '', '', '0', '2013-05-26 17:46:34', '2013-05-26 17:46:34')</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. }

...

 

its only partial as i cant scroll down in that window. It seems i have some problem with database than. could anybody help me with that please? let me know if you need any more information

 

Thanks

Link to comment
Share on other sites

it's probably because the theme overwrite modules directories. That's my opinion but im not sure at all. Try o upload fresh modules directory to your store.

 

question:

  1. what is ps_2cart ? by default this table doesnt exist - this is an external module?
  2. have you uninstalled modules related to the @smartdatasoft template?

Link to comment
Share on other sites

hi vekia

 

thanks for quick reply

 

1. ps_2cart is what i believe: ps_2 database prefix and cart its table?

2. all modules gone as its a fresh install now - i know i also restored up my database but modules list restored too?

 

Could anyone explain to me what that means and how to check/fix it (this is the answer i recieved from godaddy support)

 

You may want to verify your connection strings are correct.

Link to comment
Share on other sites

you need to check the settings.inc.php file located in the config/ directory

you've got there something like:

define('_DB_SERVER_', '...');
define('_DB_NAME_', '...');
define('_DB_USER_', '...');
define('_DB_PASSWD_', '...');
define('_DB_PREFIX_', 'ps_');

 

are you sure that you sue correct database? (and db prefix too)

Link to comment
Share on other sites

okay, so check the ps_2cart table, does the 'mobile_theme' column exist there? if not - create it

8lfnqSr.png

 

tinyint (1)

 

vekia youre a STAR, cart is working now, i can register users and that but and does it always have to be BUT, i cant access BO now. error thrown:

 

[PrestaShopDatabaseException]

Table 'databaza.ps_2tab_module_preference' doesn't exist

SELECT module

FROM ps_2tab_module_preference

WHERE `id_tab` = 1

AND `id_employee` = 1

 

at line 607 in file classes/db/Db.php

 

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)

[color=#F20000][b]606. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');

[/b][/color]607. throw new PrestaShopDatabaseException($this->getMsgError());

608. }

609. }

610.

611. /**[/size][/font][/color]

Did i mention that i know nothing about databases?

 

I can see ill have (or rather you) a lot of troubles sorting this out as all the settings in my database are also a leftovers from that shitty theme i purchased so i was thinking is there a way to import full database first, than import everything related to products (multilang product names and descriptions, SEO, associations, combinations), categories, manufacturers? Than i could make a fresh install and import those products only. I mean i know its possible but i dont know what to export in phpMyadmin.

 

Thanks for your help

Link to comment
Share on other sites

it looks like the database is not complete. Here is the sql code:

CREATE TABLE `ps_2tab_module_preference` (
`id_tab_module_preference` INT(11) NOT NULL AUTO_INCREMENT,
`id_employee` INT(11) NOT NULL,
`id_tab` INT(11) NOT NULL,
`module` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id_tab_module_preference`),
UNIQUE INDEX `employee_module` (`id_employee`, `id_tab`, `module`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB;

 

run this sql query and you will create the table from the error code

  • Like 1
Link to comment
Share on other sites

again i need to say your the best a thanks a lot for your help and patience. i start to worry that even if we will sort this out another problem gonna occur related to that theme i used to have so im thinking seriously to make a fresh install and just import products as i dont feel comfortable asking you all the time for help.

 

adding to cart is working

 

register new account doesnt

 

[PrestaShopDatabaseException]

Unknown column 'id_lang' in 'field list'

INSERT INTO `ps_2customer` (`secure_key`, `lastname`, `firstname`, `email`, `passwd`, `last_passwd_gen`, `id_gender`, `birthday`, `newsletter`, `newsletter_date_add`, `ip_registration_newsletter`, `optin`, `website`, `company`, `siret`, `ape`, `outstanding_allow_amount`, `show_public_prices`, `id_risk`, `max_payment_days`, `active`, `deleted`, `note`, `is_guest`, `id_shop`, `id_shop_group`, `id_default_group`, `id_lang`, `date_add`, `date_upd`) VALUES ('fd678ae96c3c8bd835e9b64436dca657', 'surname', 'name', '[email protected]', '33bcc8cb16550959006d96ccb129a2d1', '2013-05-27 03:18:39', '1', '1978-1-15', '0', '0000-00-00', NULL, '0', NULL, NULL, NULL, NULL, '0', '0', '0', '0', '1', '0', NULL, '0', '1', '1', '3', '1', '2013-05-27 09:18:39', '2013-05-27 09:18:39')

to track all the errors seems to be impossible as they may appear later on in everyday use what do you think vekia?

 

i also have other shop running prestashop script with exactly same products so i am thinking to use some module to export products with images from shop number one and import them in fresh install of 2nd shop and all would be sorted out.

Link to comment
Share on other sites

:)

Unknown column 'mobile_theme' in 'field list'

UPDATE `ps_2guest` SET `id_guest` = '2',`id_operating_system` = '3',`id_web_browser` = '10',`id_customer` = '1',`javascript` = '0',`screen_resolution_x` = '0',`screen_resolution_y` = '0',`screen_color` = '0',`sun_java` = '0',`adobe_flash` = '0',`adobe_director` = '0',`apple_quicktime` = '0',`real_player` = '0',`windows_media` = '0',`accept_language` = '',`mobile_theme` = '0' WHERE `id_guest` = 2

:(

Link to comment
Share on other sites

does the position of that column matter?

 

----------------------

 

i can see it doesnt i had some error after that did the same and all seem to be working now and i hope no more error going to occur

 

i dont know how to thank you for your help and patience

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

done. thread marked as solved. You can also mark own thread as solved, here is an instruction:

To mark a topic as [solved] :

- Edit the first post of your topic by clicking on the "Edit" button,

- Click on the "Use full editor" button,

 

- Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button.

if you've got any other questions / issues related to this case - feel free to continue discussion here - solved isn't mean closed ;)

 

regards

Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...