次のコードをmagentoベーステンプレートファイルに入れましたview.phtml
。
$ category = $ _product-> getCategoryIds(); print_r($ category)
サンプルデータを使用して、Ottoman
製品ページに表示されている場合、どのブレッドクラムが
Home / Furniture / Living Room / Ottoman
出力はArray ( [0] => 22 )
22isidLiving Room
です。Furniture and Living Room
IDを取得する方法。ありがとうございました