I tried to do the same.
I followed several tutorials and tried several things. As a result, I had 503 errors all the time (without any maintanance.flag files - they worked well on other sites).
But I managed to fix it. I will show you what I have now, as well as what the reason is for 503 if someone encounters this problem:
I named the company Module / CatalogSearch and consists of three files:
app / code / local / Company / Catalog Search / Model / Layer.php:
<?php class Company_CatalogSearch_Model_Layer extends Mage_CatalogSearch_Model_Layer { public function prepareProductCollection($collection) { parent::prepareProductCollection($collection);
app / code / local / Company / CatalogSearch / etc / config.xml:
<?xml version="1.0"?> <config> <modules> <Company_CatalogSearch> <version>0.1</version> </Company_CatalogSearch> </modules> <global> <models> <catalogsearch> <rewrite> <layer>Company_CatalogSearch_Model_Layer</layer> </rewrite> </catalogsearch> </models> </global> </config>
app / etc / modules / Company_CatalogSearch.xml:
<?xml version="1.0"?> <config> <modules> <Company_CatalogSearch> <active>true</active> <codePool>local</codePool> </Company_CatalogSearch> </modules> </config>
And it's all.
To problem 503: In the file app / code / local / Company / CatalogSearch / etc / config.xml I had
<rewrite> <layer> Company_CatalogSearch_Model_Layer </layer> </rewrite>
instead
<rewrite> <layer>Company_CatalogSearch_Model_Layer</layer> </rewrite>
Hope this helps!
source share