2016-11-22 1 views
0

hookDisplayAdminProductsExtra 훅을 사용하고 있습니다. 1.6 버전의 prestashop 버전입니다. 그러나 1.7의 경우 작동하지 않습니다. 여기 Prestashop 1.7 hookDisplayAdminProductsExtra가 작동하지 않습니까?

1.6 enter image description here

에서 screenshoot prestshop 여기에 1.6에 대한 작업 내 코드

public function hookDisplayAdminProductsExtra($params) 
{ 
    $this->smarty; 

    $id_product = Tools::getValue('id_product'); 

    $get_values = $this->getProductCurrencyRow($id_product); 
    $this->smarty->assign('get_values',$get_values); 
    $this->smarty->assign('id_product',$id_product); 

    $currencies = $this->getDefaultRates(); 
    $this->smarty->assign('currencies',$currencies); 

    return $this->display(__FILE__, '/views/templates/admin/productcurrency.tpl'); 
} 

이 코드입니다하지만 난 내 플러그인 PrestaShop 버전 버전 1.7를 설치할 때 나는 몇 가지 문제에 대한이 여기 관리 제품 추가 후크는 1.7

enter image description here

에서 스크린 샷입니다

새 탭이 모듈 옵션 이름으로 와서 제품 옵션 메뉴가 들리지 않습니다. hookDisplayAdminProductsExtra가 새 버전으로 변경 되었습니까? 어떻게하면 되나요?

고마워.

+0

하지만 버전 1.7을 사용해야하는 이유는 무엇입니까? 예, 그들은 그것이 안정적이고 쓸모 있다고 말하지만, 나를 신뢰하지 않습니다 ... – sarcom

+0

방금 ​​1.7 모듈을 안정시키고 싶습니다. – user5510975

답변

0

간단한 :

public function hookdisplayProductExtraContent($params) 
{   
    $array = array(); 
    $array[] = (new PrestaShop\PrestaShop\Core\Product\ProductExtraContent()) 
      ->setTitle('tittle') 
      ->setContent('content')); 
    return $array; 
} 
즉, 다음 링크를 방문 할 수 PrestaShop 버전의 후크에 대한 자세한 내용은 PrestaShop 버전 1.7

에서 모듈에 대한 별도의 탭을 표시 할 수 없습니다 의미

+0

이 후크는 프론트 오피스에있는 여분의 제품 컨텐츠를 위해 사용됩니다. -사무실 – ArisS

관련 문제