Updatecart.php 460 B

1234567891011121314151617
  1. <?php
  2. namespace WeltPixel\Quickview\Controller\Index;
  3. class Updatecart extends \Magento\Framework\App\Action\Action
  4. {
  5. public function execute()
  6. {
  7. if (!$this->getRequest()->isAjax()) {
  8. $this->_redirect('/');
  9. return;
  10. }
  11. $jsonData = json_encode(array('result' => true));
  12. $this->getResponse()->setHeader('Content-type', 'application/json');
  13. $this->getResponse()->setBody($jsonData);
  14. }
  15. }