2016-11-22 9 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をインストールするとき、私はいくつかの問題についてを持っていますアドオンフックはこちらのスクリーンショットです。

enter image description here

新しいタブがモジュールオプション名に来て、製品オプションメニューが表示されません。 hookDisplayAdminProductsExtraが新しいバージョンに変更されましたか?どうすればいいですか?

ありがとうございました。

+0

なぜバージョン1.7を使用するのですか?はい、彼らはそれが安定して使用可能だと言うが、それは私を信用しない... – sarcom

+0

私はちょうど1.7のために私のモジュールを安定させたい – user5510975

答えて

6

PrestaShop 1.7では、hookDisplayAdminProductsExtraフックのロジックが変更されました。このフックを使用するすべてのモジュールは、モジュールごとに別々のタブではなく、「モジュールオプション」という名前のタブに表示されます。

http://build.prestashop.com/news/module-development-changes-in-17/

0

シンプル:それはあなたが次のリンクを訪問することができますPrestaShopの中にフックの詳細についてはPrestaShopの1.7

であなたのモジュールのための個別のタブが表示されないことを意味し

public function hookdisplayProductExtraContent($params) 
{   
    $array = array(); 
    $array[] = (new PrestaShop\PrestaShop\Core\Product\ProductExtraContent()) 
      ->setTitle('tittle') 
      ->setContent('content')); 
    return $array; 
} 
+0

このフックはフロントオフィスの余分な製品のコンテンツに使用されていますオフィス – ArisS

関連する問題