cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4.2: Products are not adding into cart.

Magento 2.4.2: Products are not adding into cart.

Hi, 

I migrated magento 2.4.2 from local host to the live server. now the Products are not being added to the cart. 
Can someone assist. 

Thanks in advance. 

6 REPLIES 6

Re: Magento 2.4.2: Products are not adding into cart.

@5e48be49ecff7 

Please run the below command and check:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
 
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Magento 2.4.2: Products are not adding into cart.

Hi @5e48be49ecff7 

 

Did you check Magento logs for errors? Also check the browser console for any errors.

If you see any errors then post in the reply so that some one can help you.

 

Thanks

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: Magento 2.4.2: Products are not adding into cart.

Hi @5e48be49ecff7,

 

Run the additional SQL lines below

UPDATE core_config_data

SET value = REPLACE(value, '<old root URL or domain>', '<new root URL or domain>')

WHERE path = 'design/head/includes';

 

Delete the cache with the command:

rm -rf var/cache/*

Hope this can help you! Let me know if you need further assistance.

________

If issue solved, Click Kudos & Accept as Solution.

LitExtension - #1 Shopping Cart Migration Expert

LitExtension helps store owners and agencies migrate all important data from one eCommerce platform to another accurately, securely and at the highest speed.

Visit website: http://litextension.com/

Re: Magento 2.4.2: Products are not adding into cart.

Open the url and then open the console tab via inspect window or by ctrl + shift + i and then add product in cart.

There is some js error in console.

I hope it will help you. 

Re: Magento 2.4.2: Products are not adding into cart.

Please check if your Cookie Domain set properly. Generally, cart stores the array into cookies so make sure it's adding. Stores > Configuration > Web > Default Cookies Setting > Cookie Domain. 

Re: Magento 2.4.2: Products are not adding into cart.

Thats works pretty well! thanks