このチュートリアルから拡張機能の属性を作成しました -
それは私がグーグルで見つけた最高のものです。
実際に、product のカスタム タイプも作成しました。タイプ名は「custom_product」、ラベルは「custom product」です。属性を追加した後、それがすべての製品タイプに適用されていることがわかりました。それを「カスタム製品」タイプに適用するにはどうすればよいですか? それで、それが新しい「カスタム製品」ページにのみ表示されたときは?
ありがとう。
このチュートリアルから拡張機能の属性を作成しました -
それは私がグーグルで見つけた最高のものです。
実際に、product のカスタム タイプも作成しました。タイプ名は「custom_product」、ラベルは「custom product」です。属性を追加した後、それがすべての製品タイプに適用されていることがわかりました。それを「カスタム製品」タイプに適用するにはどうすればよいですか? それで、それが新しい「カスタム製品」ページにのみ表示されたときは?
ありがとう。
これを使って:
$this->addAttribute('catalog_product', 'custom_product', array(
'type' => 'int',
'label' => 'Custom Product',
'input' => 'select',
'required' => false,
'user_defined' => true,
'searchable' => true,
'filterable' => true,
'comparable' => true,
'visible_in_advanced_search' => true,
//this is the line that adds it to a type of product
'apply_to' => Mage_Catalog_Model_Product_Type::TYPE_SIMPLE.','.Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE,
'group' => 'General',
));
Mage_Catalog_Model_Product_Type
利用可能なすべてのタイプのクラスを確認し、あなたのものを選択してください。コンマで区切って、必要な数のタイプを追加できます。