Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Customizing the core code
 
cemcel
Jr. Member
 
Total Posts:  2
Joined:  2013-08-15
 

Hello,

We are building a Magento Marketplace and want to able our sellers to create specific discount groups with selected customers. But we can’t manage this functionality without customizing the core code.

If seller 1 will form a group of customer 1, customer2 and customer 3 and applied discount of 5 % ,then seller 2 can not include customer 1,customer 2, and customer 3 in his group to apply the discount, as these customers will not be visible to seller 2 to apply the discount.

What problems we may face with custom a core code.

Thank you in advance for your answers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Siggi_Schmitz
Enthusiast
 
Avatar
Total Posts:  811
Joined:  2011-07-03
 

You should NEVER change the core code. I can say that 99% of changes can be done with own extension which overwrites (not physically!) via XML <rewrite> the core functions. Rewrite classes, use events / observers etc.

For the 1% of all changes when you cannot overwrite a class with an extension (maybe a Abstract or final class) you can copy the PHP file from the class in app/code/local/Mage/...(and then the correct path) and make your changes there.

When you modify the core code...then on the next update, all you`re changes can be away.

 
Magento Community Magento Community
Magento Community
Magento Community
 
cemcel
Jr. Member
 
Total Posts:  2
Joined:  2013-08-15
 

Hello Siggi,

Thank you for your answer and warning. I hope the development team can manage the process you told, I have already ask them to override it but they said that it is not possible. Also, is it possible to face any issues while integrating new extensions with a modified core code?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Siggi_Schmitz
Enthusiast
 
Avatar
Total Posts:  811
Joined:  2011-07-03
 

Yes, because maybe the other extensions extends core functions with correct xml rewrite but you have changed this core functions...so maybe there will be problems.

Can you tell me about your actually problem to use rewrites? Maybe i can help you.

And remember...when you`re team really want to change core files, then copy the files in app/code/local/Mage/....because the magento autoloader will first look if a core file is an app/code/local/Mage and when it`s not found, he looks in app/code/core/Mage/. So you can edit the functions in the file there and you have not touched a core file. But by the way, this is very ugly too and only for the worst case.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top