Remove PDF invoice Button

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
Hi,
In Nopcommerce 4.30, I want to remove Always PDF invoice button from order details.
Kindly suggest me the best way.

Regards
3 years ago
in \Presentation\Nop.Web\Areas\Admin\Views\Order\Edit.cshtml

comment out code:


  <a asp-action="PdfInvoice" asp-route-orderId="@Model.Id" class="btn bg-purple">
                <i class="fa fa-file-pdf-o"></i>
                @T("Admin.Orders.PdfInvoice")
    </a>



dimsolutions wrote:
Hi,
In Nopcommerce 4.30, I want to remove Always PDF invoice button from order details.
Kindly suggest me the best way.

Regards
3 years ago
[quote=JonQuick]in \Presentation\Nop.Web\Areas\Admin\Views\Order\Edit.cshtml

comment out code:


  <a asp-action="PdfInvoice" asp-route-orderId="@Model.Id" class="btn bg-purple">
                <i class="fa fa-file-pdf-o"></i>
                @T("Admin.Orders.PdfInvoice")
    </a>


i could not find the said directory in my server where i have hosted, can someone help?
3 years ago
Maybe something like C:\inetpub\wwwroot\website\Areas\Admin\Views\Order\Edit.cshtml
or if at the root of website
Areas\Admin\Views\Order\Edit.cshtml
3 years ago
Yidna wrote:
Maybe something like C:\inetpub\wwwroot\website\Areas\Admin\Views\Order\Edit.cshtml
or if at the root of website
Areas\Admin\Views\Order\Edit.cshtml



yes i found it and changed the edit.cshtml file and uploaded it to the server and restarted the application, but the button is still there and working properly. Do i need to build or do something to make the changes?
3 years ago
If you are sure you have changed the correct file you may need to restart the webserver / app pool
3 years ago
Yidna wrote:
If you are sure you have changed the correct file you may need to restart the webserver / app pool


I did restarted the app pool but it's still there and working totally fine even with new orders.
3 years ago
Try the clear cache next to the restart app in admin
3 years ago
glhays wrote:
Try the clear cache next to the restart app in admin

Did this as well but it's still working, i even deleted the code from source code and run it on my local machine, it was working there as well.
may be you can try it on your site, if possible and tell me some other way out. Still thank you for your efforts.
3 years ago
Just a quick note - are you trying to remove the button of the admin panel or front end for the customer? The above answers were related to the admin panel.

If you want to remove the button at the front end just remove this.
Please note, that is the default view which should not be changed. If you are using any theme find that file at your /Themes/THEME folder and comment on it. If you using the default clean one, copy from /Views folder file and do modification of that file at /Theme/DefaultClean/Views/Order/Details.cshtml file directory.

Regards,
Tom
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.