I think you have missed "admin" in you'r URL before createmenubackend.
Actually, you have to call Direct URL function in JS otherwise you have to change URL again and again on different platforms like local, stage & Production like EX. below:
'mage/url' ], ...
I encountered the same problem. I have a Magento site running on site.com and a Symfony application running on app.site.com. Magento was setting the cookie domain as ".site.com" which was conflicting with the cookie (PHPSESSID) that was needed by app.site.com.
The solution I found was to set the "session.name" value directly from the ...
How you are creating the new parent block, you will have to create the child blocks and embed them in the block you created:
You will do the same as you did for the child blocks, and then using the method addChild to include the child blocks in the parent.
I am pretty sure that there is a better way to achieve the requirements, ...
It turned out to be that there was a condition which was trying to re-direct the user to the /checkout/cart page, if the customer wasn't logged in. However the /checkout/cart controller was being overridden preventing the access to it and a result, the user was redirected to the homepage by default.
To enable AJAX add to cart on home page, You need to add small JS code
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
You have to override addtocart.phtml file
Now Just Replace "bindSubmit": false to "bindSubmit": true