cancel
Showing results for 
Search instead for 
Did you mean: 

Vendor Module Issue

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. 
3 REPLIES 3

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 to encourage to write more answers !

Re: Vendor Module Issue

Change module name and correct namespace properly will help you.

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.