을 확장 :젠토는 내가 잘못 뭘하는지 잘 모르겠어요 getCssJsHtml()
을 나는이 일어나고있다 :
app/code/local/Company/etc/confix.xml:
<?xml version="1.0"?>
<config>
<modules>
<Company_Core>
<version>0.1.0</version>
</Company_Core>
</modules>
<global>
<models>
<core>
<rewrite>
<store>Company_Page_block_Html_Head</Store>
</rewrite>
</core>
</models>
</global>
</config>
그리고
app/code/local/Company/Page/Block/Html/Head.php:
include('Mage/Page/Block/Html/Head.php');
class Company_Page_block_Html_Head extends Mage_Catalog_Model_Product {
/**
* Get HEAD HTML with CSS/JS/RSS definitions
* (actually it also renders other elements, TODO: fix it up or rename this method)
*
* @return string
*/
public function getCssJsHtml()
{
echo 'asd';
return parent::getCssJsHtml();
}
}
그러나 아무것도 변경되지 않습니다, 내 디버그 텍스트 "asd"가 전혀 표시되지 않고 있으며 내가 잘못하고있는 것에 대해 단서가 없습니다. 당신의 목표는 getCssJsHtml()
다음 코드를 getCssJsHtml()
방법을 대체 할 코드 아래 확인 ..just 완전히 잘못 오버라이드 (override)하는 경우
나는 젠토 1.9 CE를
시도해주세요. 귀하의 사례를 수정하십시오 – RichTea
도움이된다면 답변을 받아주십시오 –