<?php
/* @var $block \Magento\Framework\View\Element\Template */
?>

<script type="text/x-magento-init">
    {
        "#product_addtocart_form": {
            "MGS_AjaxCart/js/action/product-add-to-cart": {"bindSubmit": true, "redirectToCatalog": true}
        }
    }
</script>