次のコードを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を取得する方法。ありがとうございました