mageprakash / OrderAttachment

Magento 2 Order Attachment by MagePrakash allows customers to attachments proof such as Images, PDFs or any type of Files/Docs while placing the orders.
18 stars 9 forks source link

v 2.4.2 Admin Sales Order Tab not display. #23

Open junnhouse opened 2 years ago

junnhouse commented 2 years ago

Please advise for you solution to make it display. Best Regards,

pankajpragma commented 2 years ago

Please open file Sp\Orderattachment\view\adminhtml\layout\sales_order_view.xml. Replace with the below code

<referenceBlock name="sales_order_tabs">
            <block class="Sp\Orderattachment\Block\Adminhtml\Order\View\Tab\Attachments" name="sales.order.view.tab.attachment" as="sp_attachments" template="order/view/tab/attachments.phtml"/>
            <action method="addTab">
                <argument name="name" xsi:type="string">sp_attachments</argument>
                <argument name="block" xsi:type="string">sp_attachments</argument>
            </action>
        </referenceBlock>
sprankhub commented 2 years ago

25 should fix it.

sandiegobr commented 2 years ago

Solution for blank page on admin order view page:

Replace file app/code/Sp/Orderattachment/view/adminhtml/layout/sales_order_view.xml content by:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Sp_Orderattachment::css/orderattachment.css"/>
    </head>
    <update handle="editor"/>
    <body>
        <referenceContainer name="left">
            <referenceBlock name="sales_order_tabs">
                <block class="Sp\Orderattachment\Block\Adminhtml\Order\View\Tab\Attachments" name="sales.order.view.tab.attachment" as="sp_attachments" template="order/view/tab/attachments.phtml"/>
                <action method="addTab">
                    <argument name="name" xsi:type="string">sp_attachments</argument>
                    <argument name="block" xsi:type="string">sp_attachments</argument>
                </action>
            </referenceBlock>
        </referenceContainer>
    </body>
</page>

than run php bin/magento setup:upgrade php bin/magento setup:static-content:deploy -f --area adminhtml

deepyog2007 commented 2 years ago

@sandiegobr It solved the issue. Thank you!

levelzero-magento commented 2 years ago

Solution for blank page on admin order view page:

Replace file app/code/Sp/Orderattachment/view/adminhtml/layout/sales_order_view.xml content by:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Sp_Orderattachment::css/orderattachment.css"/>
    </head>
    <update handle="editor"/>
    <body>
        <referenceContainer name="left">
            <referenceBlock name="sales_order_tabs">
                <block class="Sp\Orderattachment\Block\Adminhtml\Order\View\Tab\Attachments" name="sales.order.view.tab.attachment" as="sp_attachments" template="order/view/tab/attachments.phtml"/>
                <action method="addTab">
                    <argument name="name" xsi:type="string">sp_attachments</argument>
                    <argument name="block" xsi:type="string">sp_attachments</argument>
                </action>
            </referenceBlock>
        </referenceContainer>
    </body>
</page>

than run php bin/magento setup:upgrade php bin/magento setup:static-content:deploy -f --area adminhtml

Works for version Magento 2.4.3-p1

adamlavery commented 1 year ago

Thanks @sandiegobr. Scary how easily Magento 2 breaks without any clues anywhere as to why.

fdo36 commented 1 year ago

Solution for blank page on admin order view page:

Replace file app/code/Sp/Orderattachment/view/adminhtml/layout/sales_order_view.xml content by:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Sp_Orderattachment::css/orderattachment.css"/>
    </head>
    <update handle="editor"/>
    <body>
        <referenceContainer name="left">
            <referenceBlock name="sales_order_tabs">
                <block class="Sp\Orderattachment\Block\Adminhtml\Order\View\Tab\Attachments" name="sales.order.view.tab.attachment" as="sp_attachments" template="order/view/tab/attachments.phtml"/>
                <action method="addTab">
                    <argument name="name" xsi:type="string">sp_attachments</argument>
                    <argument name="block" xsi:type="string">sp_attachments</argument>
                </action>
            </referenceBlock>
        </referenceContainer>
    </body>
</page>

than run php bin/magento setup:upgrade php bin/magento setup:static-content:deploy -f --area adminhtml

that's the right solution.

Thank you!