cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot add item to shopping cart with blank theme

Cannot add item to shopping cart with blank theme

Hi,

On a fresh install with sample data, when I click on the "Add" to cart button, it keeps on showing "Adding..." but the item is never added to the cart with the blank theme, with Luma theme it works fine. Is it a bug of the blank theme ? How can I fix it ?

 

Screen Shot 2017-01-10 at 18.29.56.png

My Magento version is 2.1.3. 

5 REPLIES 5

Re: Cannot add item to shopping cart with blank theme

Hi @maxagaz,

 

Can you check you webserver error logs? Maybe something is failing and you can't see on your browser.

Re: Cannot add item to shopping cart with blank theme

Hi Damian,

 

Below is the message I get from apache2 access.log when I click on the "Add to cart" button of a product :

192.168.100.1 - - [12/Jan/2017:00:43:44 +0800] "POST /magento2/checkout/cart/add/uenc/aHR0cDovL3Zib3gvbWFnZW50bzIvbWVuL3RvcHMtbWVuLmh0bWw,/product/467/ HTTP/1.1" 302 827 "http://vbox/magento2/men/tops-men.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36"
192.168.100.1 - - [12/Jan/2017:00:43:45 +0800] "GET /magento2/checkout/cart/ HTTP/1.1" 200 7543 "http://vbox/magento2/men/tops-men.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36"
192.168.100.1 - - [12/Jan/2017:00:43:46 +0800] "GET /magento2/customer/section/load/?sections=cart%2Cmessages&update_section_id=true&_=1484187730724 HTTP/1.1" 200 910 "http://vbox/magento2/men/tops-men.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36"

Re: Cannot add item to shopping cart with blank theme

@maxagaz,

 

Can you take a look on the error.log of Apache or logs on /path/to/magento/var/log?

 

Re: Cannot add item to shopping cart with blank theme

@Damian Culotta

Below is what I get in /var/www/html/magento2/var/log/system.log

[2017-01-12 03:29:22] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2017-01-12 03:29:22] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2017-01-12 03:29:22] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2017-01-12 03:29:22] main.CRITICAL: Broken reference: the 'checkout.cart.item.renderers.gift-card.actions.gift_options' element cannot be added as child to 'checkout.cart.item.renderers.gift-card.actions', because the latter doesn't exist [] []
[2017-01-12 03:29:22] main.CRITICAL: Broken reference: the 'checkout.cart.item.renderers.gift-card.actions.gift_options' tries to reorder itself towards '', but their parents are different: 'checkout.cart.item.renderers.gift-card.actions' and '' respectively. [] []
[2017-01-12 03:29:23] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_1d41d8cd98f00b204e9800998ecf8427e and handles : Please correct the XML data and try again.  [] []

I get nothing in /var/log/apache2/error.log

Re: Cannot add item to shopping cart with blank theme

@maxagaz,

 

It seems that there are some blocks or references that you don't have.

Can you test with Luma theme and check for those errors again?