2017-09-26 4 views
0

私はモジュールを作成します。製品の新しいタブ、バックオフィスを追加します。このタブでは、すべてのカスタマイズテキストを表示します。カスタマイズタブで定義されています。問題はそれをどうやって行うのか分からないことです。製品、カスタマイズ、またはcustomizationFieldクラスがあります。prestashop 1.6で製品からすべてのカスタマイズを得る方法

私が持っているI私のモジュール:

public function getCustomizationFields(){ 
     $getCustomizationFields = Product::getCustomizationFieldIds(); 
     return $getCustomizationFields; 
    } 

エラーがありません。いつも私はこのような出力を持っています:

​​

私の目的に使用できるクラスはありますか?助けてくれてありがとう。あなたはProductクラスのインスタンスを持っている場合は

種類が

答えて

0

について、あなたはこれを行うことができます。

$instance = new Product($product_id); 
$instance->getCustomizationFields(); 
0

どの程度

public function getCustomizationFields(){ 
      $productId = (int)Tools::getValue('id_product'); 
      $product = new Product($productId); 
      $getCustomizationFields = $product->getCustomizationFieldIds(); 

      return $getCustomizationFields; 
} 
関連する問題