0

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 ?? ?

  • Did you found any solution for that? – Denish Mar 22 at 7:16
  • I have same issue and can't solve it. Please upload as answer if you solve it. – Denish Mar 22 at 7:16
  • I solved it in a separate manner, although this can be done using data mage init. Can you let me know exactly what issue are u facing ?? – Narendra Vyas Mar 22 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.