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

How can the site still be running if I remove the PHP code completely? 
 
Lightsource Media
Jr. Member
 
Total Posts:  5
Joined:  2009-01-22
 

After trying to modify an extension and now a core file (I know, I know, I’m not not supposed to) I’ve finally realised that my problems in doing so are stemming from the fact that no matter what changes I make to the file, the site still runs as if I’ve done nothing…

For example, I am currently modifying:

app/code/core/Mage/CatalogSearch/Model/Mysql4/Search/Collection.php

No matter what I do it works as originally intended.
This was really confusing me…

So as an experiment I tried deleting the contents of the file completely.

And yet the search facility on the site still works…

How is this possible?!?!

Or am I modifying the wrong file?  <embarassed shuffling of feet>

This file does contain the code that manages the search queries you enter in the search right?  (ie doing the actual searches?)

 
Magento Community Magento Community
Magento Community
Magento Community
 
vianetz
Guru
 
Avatar
Total Posts:  537
Joined:  2008-04-13
Munich, Germany
 

No, this is the Mysql-Model for the catalog search. Take a look at the controllers directory.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lightsource Media
Jr. Member
 
Total Posts:  5
Joined:  2009-01-22
 

I’ve had a look in there but there’s not much meat…

I’m new to MVC stuff, but doesn’t the actual search work (ie the methods) get done by the controller.php I mentioned?
ie the pulling of the tables and the actual comparisons?

It looks like it does and seems to be what the EnhancedSearch Extension overrides, but as I say, deleting all the functions in that (Magento original or EnhancedSearch extension if present) controller.php file makes no odds, the searches work as before. 

If I’ve got that wrong (highly likely as I’m new to this) which file contains the actual search function code (ie the SQL selects etc)?

Thanks for your help, I appreciate it!

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