- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2020
10:32 PM
08-18-2020
10:32 PM
Vendor Module Issue
Hi,
I'm copying file
from "vendor/magento/module-sales/Model/Order/Pdf/Invoice.php"
to "app/code/Magento/Sales/Model/Order/Pdf/Invoice.php"
and editing this invoice but the function is still calling from vendor module.
How can I make this to work from app/code.
Please let me know.
Labels:
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2020
11:18 PM
08-18-2020
11:18 PM
Re: Vendor Module Issue
Hello @gkarthick87
As per my guess it's because of your module name, because you are using namespace in custom module as
namespace Magento\Sales\Model\Order\Pdf;
which might pick the core class so it will be good if you change your module/vendor name.
and assuming that you've added preference in di.xml.
hope it helps.
Problem Solved ? Click on 'Kudos' & Accept as Solution !

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2021
01:48 AM
07-24-2021
01:48 AM
Re: Vendor Module Issue
Change module name and correct namespace properly will help you.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2021
08:52 AM
07-29-2021
08:52 AM
Re: Vendor Module Issue
@gkarthick87 mythdhr wrote:Hi,
I'm copying file
from "vendor/magento/module-sales/Model/Order/Pdf/Invoice.php"
to "app/code/Magento/Sales/Model/Order/Pdf/Invoice.php"
and editing this invoice but the function is still calling from vendor module.
How can I make this to work from app/code.
Please let me know.
Mine is doing the same. Wish they would fix the problem.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2023
12:37 AM