0

I am trying to override the content on /requisition_list/requisition/index/ in the account pages. I have created the following file -> app/design/frontend/[COMPANY]/[THEME_NAME]/Magento_RequisitionList/frontend/templates/requisition/actions/create.phtml

create.phtml is copied over from vagrant/tmp/vendor/magento/module-requisition-list/view/frontend/templates/requisition/actions/create.phtml

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
?>
<div class="title-actions-links" data-bind="scope: 'requisition.action.edit'">
    <button class="action add" type="button"
            data-bind="
                click: edit.bind($data, {}),
                visible: isCanCreateList()">
        <span><?= $block->escapeHtml(__('Create New Requisition List')) ?></span>
    </button>
</div>
<p>MESSAGE TO GO HERE</p>
<script type="text/x-magento-init">
    {
        "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                    "requisition.action.edit": {
                        "component": "Magento_RequisitionList/js/requisition/action/edit",
                        "editModuleName": "requisition.edit"
                    },
                    "requisition.edit": {
                        "component": "Magento_RequisitionList/js/requisition/list/edit",
                        "modal": "add_to_requisition_popup",
                        "saveUrl": "<?= /* @noEscape */ $block->getUrl('rest/V1/requisition_lists') ?>"
                    }
                }
            }
        }
    }
</script>

but the changes are not visible on the front end. I have verified the template using by enabling theme hints, tried running setup:di:compile, flushed the cache, cleaned the cache, verified file permissions, etc. without no luck.

How can override content on this page?

  • Please add your code and path for all files. – Vinz Jul 3 at 19:40
1

You should try this path, the second 'frontend' shouldn't be there : app/design/frontend/[COMPANY]/[THEME_NAME]/Magento_RequisitionList/templates/requisition/actions/create.phtml

Don't forget to clean your magento and browsers caches.

  • Thank you Vinz!!! That worked. I actually had tried this but I think I was thwarted by the browser cache. Few helpful things I learned: bin/magento dev:template-hints:enable [show templates to use on pages] . bin/magento cache:flush . – guerinteed_mike Jul 4 at 14:04
  • Nice to hear, don't forget to accept my answer ! – Vinz Jul 4 at 14:13

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.