-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class rewrite #305
Comments
IF it should be extended from |
I bet a crate of beer on the fact that there are definitely extensions or even core classes which call the methods of the "Mage::getModel('sales/order_shipment')" model. Since Firegento/Pdf redeclares this class through a rewrite, it's not possible anymore to call the parent methods because FireGento_Pdf_Model_Shipment doesn't extend from the sales/order_shipment class. This case is not that improbable. |
we are NOT rewriting |
My fault sorry, that's what I meant. There are totally 3 rewrites. 2 of them don't extend: FireGento_Pdf_Model_Invoice |
Just to make this clear, you are complaining about something you have no clue whether this is a problem or not, right? |
First at all, I don't complain.. I just opened an issue. If you don't see it as a bug, then take it as an enhancement. |
Just to make sure: didn't meant complaining as whiny, english is only a foreign language for me, didn't want to offend you. I take it seriously. My problem is, I don't now which consequences there are and if there is no reason (and as long as no one is reporting a problem, there is no reasin imho) to add more complexity, we sohuldn't. |
Thank you for your clarification :)
Well, here I am :D Let me show you a real world problem: Two extension are installed which rewrite "sales/order_pdf_invoice". It ends with a rewrite conflict (Amasty wins): Current inheritance: To satisfy all the other classes, which expect that "sales/order_pdf_invoice" is an instance of FireGento_Pdf_Model_Invoice, I need to fix the inheritance chain. Consequently, Amasty_Orderattr_Model_Order_Pdf_Invoice needs to inherit the methods from Mage_Sales_Model_Order_Pdf_Invoice, but it can't because FireGento_Pdf_Model_Invoice extends nothing. Can't be more detailed... |
It seems we have a problem, which needs to be fixed. |
There are some firegento classes which rewrite core classes but don't extend from them. So pontentially this could lead to an undefined method error.
E.g:
https://github.com/firegento/firegento-pdf/blob/development/src/app/code/community/FireGento/Pdf/Model/Shipment.php#L28
It should be:
class FireGento_Pdf_Model_Shipment extends Mage_Sales_Model_Order_Shipment
Shouldn't it?
The text was updated successfully, but these errors were encountered: