내가이 설정으로 OnepageController을 확장하려고 시도하고있어 확장하는 방법 :젠토 1.7 - 코어 컨트롤러에게
응용 프로그램은/etc/모듈/Custom_Checkout.xml
<config>
<modules>
<Custom_Checkout>
<active>true</active>
<codePool>local</codePool>
</Custom_Checkout>
</modules>
</config>
응용 프로그램/지역/사용자 정의/체크 아웃을 /etc/config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Custom_Checkout>
<version>0.0.1</version>
</Custom_Checkout>
</modules>
<frontend>
<routers>
<checkout>
<args>
<modules>
<custom_checkout before="Mage_Checkout">Custom_Checkout</custom_checkout>
</modules>
</args>
</checkout>
</routers>
</frontend>
</config>
응용 프로그램/지역/사용자 정의/체크 아웃/컨트롤러/OnepageController.php
require_once("Mage/Checkout/controllers/OnepageController.php");
class Custom_Checkout_OnepageController extends Mage_Checkout_OnepageController
{
public function indexAction()
{
echo "Index overidden";
}
}
나는이 본 적이 : Extend magento core controller (Checkout/OnepageController)
플러스 좀 더 내가 게시 할 수 있지만, 위의 방법 중 어느 것도 제대로 작동하지 않습니다. 그것은 단지 컨트롤러를 덮어 쓰지 않습니다.
왜 이것이 덮어 쓰지 않는지에 대한 아이디어가 있습니까?
캐시를 새로 고쳤습니까? – ivantedja
당신의'app/local /'경로는'app/code/local'이어야합니다. –
동일한 문제가 있었고 디버깅 후에 다른 모듈이 이미 OnPageCntroller.php에 과부하가 걸린 것을 발견했습니다. 심지어로드. 설치된 다른 모듈도 확인하는 것이 좋습니다. – KoviNET