Search code examples
ajaxhttp-status-code-404prestashop-1.6

Prestashop website throwing 404 errors for every page and every ajax query [Version 1.6.1.18]


Url: 420panda.ca

On every product page, it loads the page but throws a 404 error in console. It looks like this: Console error

I also get an error when I add a product to the cart using the "+ add to cart" button on every product page. The error looks like this:

Impossible to add the product to the cart.
textStatus: 'error'
errorThrown: ''
responseText:
{"products":[{"id":2721,"link":"https:\/\/420panda.ca\/en\/calibration\/2721-calibration-weight-200gr.html","quantity":3,"image":"https:\/\/420panda.ca\/7347-home_default\/calibration-weight-200gr.jpg","image_cart":"https:\/\/420panda.ca\/7347-cart_default\/calibration-weight-200gr.jpg","priceByLine":"14,97 $","name":"Calibration weight 200gr","price":"14,97 $","price_float":14.97,"idCombination":0,"idAddressDelivery":611,"is_gift":false,"hasAttributes":false,"hasCustomizedDatas":false,"customizedDatas":[]},{"id":8332,"link":"https:\/\/420panda.ca\/en\/silicone\/8332-7-three-eyed-monster-silicone-waterpipe.html","quantity":3,"image":"https:\/\/420panda.ca\/20271-home_default\/7-three-eyed-monster-silicone-waterpipe.jpg","image_cart":"https:\/\/420panda.ca\/20271-cart_default\/7-three-eyed-monster-silicone-waterpipe.jpg","priceByLine":"44,97 $","name":"4.7\" THREE EYED MONSTER SILICONE WATERPIPE","price":"44,97 $","price_float":44.97,"idCombination":0,"idAddressDelivery":611,"is_gift":false,"hasAttributes":false,"hasCustomizedDatas":false,"customizedDatas":[]},{"id":8542,"link":"https:\/\/420panda.ca\/en\/other-brands\/8542-zeus-grinder-bolt-2.html","quantity":2,"image":"https:\/\/420panda.ca\/20810-home_default\/zeus-grinder-bolt-2.jpg","image_cart":"https:\/\/420panda.ca\/20810-cart_default\/zeus-grinder-bolt-2.jpg","priceByLine":"39,98 $","name":"ZEUS GRINDER BOLT\u2122 2","price":"39,98 $","price_float":39.98,"idCombination":0,"idAddressDelivery":611,"is_gift":false,"hasAttributes":false,"hasCustomizedDatas":false,"customizedDatas":[]}],"discounts":[],"shippingCost":"0,00 $","shippingCostFloat":0,"wrappingCost":"0,00 $","nbTotalProducts":8,"total":"99,92 $","productTotal":"99,92 $","freeShipping":"0,00 $","freeShippingFloat":0,"free_ship":true,"isVirtualCart":false,"hasError":false}

I also get errors in the cart itself that look like this:

TECHNICAL ERROR: unable to save update quantity Details: Error thrown: [object Object] Text status: error

It looks like every AJAX call returns an error, but I can't find the source. Any ideas where to look?


Solution

  • A hacker added some CURL statements in the index.php of the root folder. After reverting to the original index.php code, all the errors stopped. It's also worth mentioning that the main problem was that there was a CRON job added which appended the malicious code to certain files.