Question

Magento uses below way to show Requistition list using "x-magento-init".

<div class="block block-requisition-list social-button" data-bind="scope: 'requisition_ - 111'">
<!-- ko template: getTemplate() --><!-- /ko -->
</div>


<script type="text/x-magento-init">
{
    "*": {
        "Magento_Ui/js/core/app": {
            "components": {
                "requisition_ - 111": {
                    "component": "Magento_RequisitionList/js/requisition/action/product/view/add",
                    "editModuleName": "requisition_ - 111.edit",
                    "title": "Add to Requistition List",
                    "action": "http://URL.com/requisition_list/item/add/",
                    "sku": "TEST",
                    "productFormSelector": "#product_addtocart_form122"
                },
                "requisition_ - 111.edit": {
                    "component": "Magento_RequisitionList/js/requisition/list/edit",
                    "modal": "add_to_requisition_popup",
                    "saveUrl": "http://URL.com/rest/V1/requisition_lists/"
                }
            }
        }
    }
}
</script>

Due to some limitations I can not use in this way, I searched that same can also be achieved using "data-mage-init" as well.

But not getting how can I rewrite same using "data-mage-init".

Any idea ?? ?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top