Jump to content

White Screen / Error adding to cart


Recommended Posts

Good morning,

I got two problems:

1 - When I go into my account (FrontOficce) the screen is completely white

http://zigue.pt/s1/i...ller=my-account

2 When I go to add a product to cart the following error appears:

Impossible to add the product to the cart.
textStatus: 'parsererror'
errorThrown: 'SyntaxError: JSON.parse: unexpected character'
responseText:
{"products":[{"id":229,"link":"http:\/\/zigue.pt\/s1\/index.php?id_product=229&controller=product#\/servicos-sem_servicos","quantity":1,"image":"http:\/\/zigue.pt\/s1\/img\/p\/2\/9\/4\/294-home_default.jpg","image_cart":"http:\/\/zigue.pt\/s1\/img\/p\/2\/9\/4\/294-cart_default.jpg","priceByLine":"5,28 \u20ac","name":"Aro Frontal com Adesivo Iphone 4 Preto","price":"5,28 \u20ac","price_float":4.29,"idCombination":148,"idAddressDelivery":0,"is_gift":false,"hasAttributes":true,"attributes":"Sem Servi\u00e7os","hasCustomizedDatas":false,"customizedDatas":[]}],"discounts":[],"shippingCost":"0,00 \u20ac","shippingCostFloat":0,"wrappingCost":"0,00 \u20ac","nbTotalProducts":1,"total":"5,28 \u20ac","productTotal":"5,28 \u20ac","freeShipping":"0,00 \u20ac","freeShippingFloat":0,"hasError":false,"crossSelling":""}

 

Can anyone help me?

thank you

Link to comment
Share on other sites

Hey Ziguesummer,

 

I can help with the white screen error, I believe.

When you get the white screen, you may want to turn on the error reporting to see if it gives a specific error.

 

Log into your file structure via cPanel, FTP, whatever. Go to /config/defines.inc.php and edit the file. Look for the following code:

if (_PS_MODE_DEV_)
{
    @ini_set('display_errors', 'on');
    @error_reporting(E_ALL | E_STRICT);
    define('_PS_DEBUG_SQL_', true);
}
else
{
    @ini_set('display_errors', 'off');
    define('_PS_DEBUG_SQL_', false);
}

Set the '@ini_set('display_errors', 'off');' to '@ini_set('display_errors', 'on');' and save it. Now revisit your site to see the error.

 

The most common error we see after turning it on is a memory exhaustion message. It looks similar to below though the number will vary.

Fatal error: Allowed memory size of 16777216 bytes exhausted

If this is your situation, you will need to set the "memory_limit" setting in your php.ini. It is set in MB so simply make the number bigger. If you see it set at 32M, it means 32 MB of memory allowed. Just increase it to something bigger and try again. 64M or 128M should fix it, no problem. It should look like this:

memory_limit = 64M

Save the file and revisit your site. It should be all set. Be sure to turn your error reporting back off when you are finished.

 

If you get lost, just check out this article on how to fix the white screen.

Hope that helps!

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

×
×
  • Create New...