2012-09-05 2 views
0

내가 기본 젠토 체크 아웃을 제거하고 사용자 정의 one.Problem를 추가 할 필요가로드되지 않는 것은 사용자 정의 확장 템플릿 http://skit.ch/nwpi젠토 템플릿

코드가 여기 https://gist.github.com/3636029입니다 스크린 샷을 첨부 loading.Log 어떤 errors.I를 표시하지 않습니다가 없습니다

두 개의 질문이 여기에 있습니다.

블록이 렌더링되지 않습니까?

전체 레이아웃을 덤프 할 때 "checkout.onepage" 블록을 설정 해제 했는데도 기본 체크 아웃 레이아웃 코드가 표시됩니다. 정상적인 동작입니까?

+0

바보 같은 질문 : 당신의 모듈이 활성화되어 있습니까? – Kalpesh

+0

정확히 onepagecheckout.xml 레이아웃 파일은 어디에 배치됩니까? 파일 경로를 표시 할 수 있습니까? – ceckoslab

+0

@ceckoslab 코드를 업데이트했습니다. – blakcaps

답변

2

문제는 컨트롤러에있다 :

$this->getLayout()->getBlock('content')->unsetChildren('checkout.onepage');

참조 :

Mage_Core_Block_Abstract 

/** 
* Unset all children blocks 
* 
* @return Mage_Core_Block_Abstract 
*/ 
public function unsetChildren() 
{ 
    $this->_children  = array(); 
    $this->_sortedChildren = array(); 
    return $this; 
} 

/** 
* Unset child block 
* 
* @param string $alias 
* @return Mage_Core_Block_Abstract 
*/ 
public function unsetChild($alias) 
{ 
    if (isset($this->_children[$alias])) { 
     unset($this->_children[$alias]); 
    } 

    if (!empty($this->_sortedChildren)) { 
     $key = array_search($alias, $this->_sortedChildren); 
     if ($key !== false) { 
      unset($this->_sortedChildren[$key]); 
     } 
    } 

    return $this; 
} 

그래서 코드가 있어야 다음 중 하나

$this->getLayout()->getBlock('checkout.onepage')->unsetChildren();

또는

$this->getLayout()->getBlock('content')->unsetChild('checkout.onepage');