Popular posts from this blog
Magento 2 controller redirect on button click in phtml file
0
I want to redirect customer using controller when button is clicked in one of my phtml files. So far I got, controller: public function execute(){ return $this->addToCart(); } public function addToCart(){ // some logic $this->_redirect('checkout/cart/index'); } The above is working fine (redirecting) when you access the controller via URL (www.mydomain.com/batchorder/index/addtocart). And here is my .phtml file: $("#addToCart").click(function(){ let controllerUrl = "<?php echo $block-getUrl('batchorder/index/addtocart'); ?>" $.post(controllerUrl, { "products": JSON.stringify(sideCart.SideCartProducts) }) The post request returns my logic as it should, however, it is not redirecting. Anyone can help?
...
Magento 2 Elasticsearch: Root mapping definition has unsupported
1
I am trying to setup elasticsearch 2.4.5 on a internal server and trying to use this for my EE 2.1.6 setup (magento installed in my local version). Following are the ES details. { "name" : "The Grip", "cluster_name" : "elasticsearch", "cluster_uuid" : "TtY4Vl4LRJ22V5wF1fhkOQ", "version" : { "number" : "2.4.5", "build_hash" : "c849dd13904f53e63e88efc33b2ceeda0b6a1276", "build_timestamp" : "2017-04-24T16:18:17Z", "build_snapshot" : false, "lucene_version" : "5.5.4" }, "tagline" : "You Know, for Search" } When I try reindexing I get the following error. Catalog Search indexer process unkno...