Jump to content

Shopping cart disappearing/not working


Recommended Posts

Hello everyone,

I'm quite new to all of this, and I've just re-installed prestashop. I haven't put the website online yet because a new problem pops up every time I thought I had solved the last one!

I am using PrestaShop™ 1.5.6.0.
The cart was purpously deleted elsewhere, and is now only in the footer module.

 

My problem now is my shopping cart, that not only disappears, but doesn't update either. 
Basically:
-  if I try to add or delete products from the Ajax cart it doesn't work.
-  it disappears if it has no products in it.

I have tried the solutions I found in the forum for the disappearing issue. What happens is confusing: the solution proposed by Vekia (Commenting out large portions) doesn't make any difference.
The solution posted in GitHub, where I was to only change three lines of code, completely busted my site, so that homepage slider and products didn't display correctly.

Now I've tried disabling AJAX cart, and it still doesn't work correctly. Now it adds products withouth trouble, but doesn't let me delete them.
This is very confusing as I would imagine modifying just this file shouldn't be a concern if I disactivate the cart, so I'm wondering if maybe I have some problem in other parts of the cart module.
I am coming from a fresh install, but maybe I should uninstall and re-install the cart package?

Regards,
Francesco

Link to comment
Share on other sites

@Vekia

Attached is how the shopping cart Should look

OK now I've reinstalled prestashop.

I keep having this same problem!

I've noticed a few weird things:
The shopping cart only displays correctly if there is another shopping cart somewhere in the page (for test purposes I put one on the DisplayHeader hook)

There is a ? mark image above between my products and my top slider that has something to do with it!

 

I've contacted the footer's developer too, but if someone can give me any insight it would be great

 

Regards,

Francesco

http://apokas-clothing.it

 

post-715246-0-48415700-1381493105_thumb.png

Link to comment
Share on other sites

hello

 

displayHeader hook is "invisible" hook which loads css / js files for your module

it's necessary hook for a lot of modules, so don't remove module from this hook, because without it - your cart will not have necessary js scripts and css styles

Link to comment
Share on other sites

  • 1 month later...

Hi Vekia,

 

sadly I got the almost same problem after upgrade from 1.5.5.0 (general settings, basic theme) to 1.5.6.1. (general settings, basic theme).

 

The cart is visible, hooked to the module positions, activated, indexes rebuilt, caches cleaned, etc.

The cart doesn't work since the upgrade. 

Here is the URL:
http://bolt.lutheran.hu/cms/

Please, tell me what to do, my customer has a book store and the christmas is very close. Please!
 

Link to comment
Share on other sites

hello

you've got a bit different issue

 

do you see these carts in abandoned carts section in your back office?

 

Hello Vekia,

 

many thanks for the fast answer! I didn't find any abandoned carts.  I did find some. 8 abandoned carts altogether, the latest is from 2013-02-23 09:37:59 . So it's a bit old.

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

could you delete your cache/class_index.php and verify you have no override regarding CartController

 

Could you please activate debug mode.

It seems cookie is not returned by the CartController ...

Hi Doekia,

 

thanks for the suggestion! So I have to do the followings:

1. delete the cache/class_index.php from the server

2. verify the CC - how can I do this?

 

After debug_on, I got the following errors:

 

Front page at cart adding (see attached image)

 

Back office:

 

Table 'lutherkiado_bolt.ps_tab_module_preference' doesn't exist

 

            SELECT module

            FROM ps_tab_module_preference

            WHERE `id_tab` = 77

            AND `id_employee` = 8

 

 

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

 

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

608.         }

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

610.         {

611.             if ($sql)

612.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');

613.             throw new PrestaShopDatabaseException($this->getMsgError());

614.         }

615.     }

616.

617.     /**

 
 
  • DbCore->displayError - [line 313 - classes/db/Db.php] - [1 Arguments]
    Argument [0]

     

                SELECT module

                FROM ps_tab_module_preference

                WHERE `id_tab` = 77

                AND `id_employee` = 8

 
 
It seems that this part is crucial because every other error arguments contains the same.

FO_popup_error.jpg

 

Link to comment
Share on other sites

Your upgrade as obviously not completed properly.

 

I suggest you return to your backup prior de upgrade and try reapply the upgrade

 

I not possible, your need to identifies which ever upgrade script did not get applied to your schema ...and run them manually

  • Like 1
Link to comment
Share on other sites

It seems you've been missig the upgrade of 1.5.4.0

 

Manually apply the upgrade (use install/upgrade/sql/1.5.4.0.sql as layout)

 

 

Huh? I'm relatively new to prestashop, I know how to install it, add or remove modules, backup and so on, but this manual upgrade looks a bit weird. Thank you for the help anyway!

 

Could you please tell me, how to do it? Would it work if I simply overwrite all files with the 1.5.6.1 files? it's a working website, so if I return to a backup, I'll lost some newly registered members and uploaded products.

Link to comment
Share on other sites

Nothing need to be done on your disk.

 

The database schema is not at proper level

It is somewhere before 1.5.4 while the code expects 1.5.6.1

 

 

Make a DB backup ! now

Copy the install folder from the archive to your server

Edit your config/settings.php change the line define('_PS_VERSION_', '1.5.6.1'); in define('_PS_VERSION_', '1.5.3.1');
Go to http://bolt.lutheran.hu/cms/install/upgrade/upgrade.php

Remove the install folder

 

If this does not solve the issue drop your DB, redeploy the backup

Link to comment
Share on other sites

Nothing need to be done on your disk.

 

The database schema is not at proper level

It is somewhere before 1.5.4 while the code expects 1.5.6.1

 

 

Make a DB backup ! now

Copy the install folder from the archive to your server

Edit your config/settings.php change the line define('_PS_VERSION_', '1.5.6.1'); in define('_PS_VERSION_', '1.5.3.1');

Go to http://bolt.lutheran.hu/cms/install/upgrade/upgrade.php

Remove the install folder

 

If this does not solve the issue drop your DB, redeploy the backup

 

 

Thank you, I'll do it and report the result! 

Link to comment
Share on other sites

Copy the install folder from the archive to your server

Edit your config/settings.php change the line define('_PS_VERSION_', '1.5.6.1'); in define('_PS_VERSION_', '1.5.3.1');

Go to http://bolt.lutheran.hu/cms/install/upgrade/upgrade.php

Remove the install folder

 

 

Okay, one question before the start: what archive are we talking about now? The saved db, the saved current site files, the saved 1.5.5.0 site files or the prestashop 1.5.6.1 package?

Link to comment
Share on other sites

Archive should match the actual define('_PS_VERSION_', ...

Which I hope matches your current code

Sorry I don't understand it :(

 

I have four archives:

1. the original 1.5.5 ftp/sql

2. the new 1.5.6.1 ftp/sql

 

I should modify in the 1.5.6.1 ftp archive config/settings.php change the line define('_PS_VERSION_', '1.5.6.1'); to define('_PS_VERSION_', '1.5.3.1'), or the revert, the ps v. 1.5.3.1 to 1.5.6.1?

Link to comment
Share on other sites

You have a settings.inc.php NOW!!

What is the value defined as _PS_VERSION_ ?

 

Take that number and fetch the proper install from the archive matching the _PS_VERSION_

 

Then change the _PS_VERSION_ to 1.5.3.1 in your actuel config/settings.inc.php

 

Then run the upgrade!

Link to comment
Share on other sites

You have a settings.inc.php NOW!!

What is the value defined as _PS_VERSION_ ?

 

Take that number and fetch the proper install from the archive matching the _PS_VERSION_

 

Then change the _PS_VERSION_ to 1.5.3.1 in your actuel config/settings.inc.php

 

Then run the upgrade!

 

ok, so the recent version is

define('_PS_VERSION_', '1.5.6.1');

 

I upload the 1.5.6.1 files to the ftp, than open the settings.inc.php, rewrite it to 1.5.3.1, upload this file again, and run the upgrade?

Link to comment
Share on other sites

Errors:

tools/geoip/GeoLiteCity.dat (size : 17648217) has been skipped during backup.

 

error for copying /modules/blockcart/ajax-cart.js

 

error when trying to upgrade /modules/blockcart/ajax-cart.js

 

error for copying /modules/blockcart/ajax-cart.js

 

error when trying to upgrade /modules/blockcart/ajax-cart.js

 

2282 files left to upgrade

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

Okay, so the solution was step by step:

 

1. change the config/settings.ini.php version number to the last good version

2. run the upgrade as usual

3. if it gives errors, delete the shown files (I had multiple error messages, at every one I had to restart the upgrade)

4. once it finishes the things are working as they should.

 

Thanks again :)

Link to comment
Share on other sites

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...