Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
PHPを使用して、テンプレートの特定のカテゴリから名前、画像などを含む製品のリストを呼び出そうとしています。
これは簡単にできるように思えますが、私はこれに何時間も取り組んできましたが、何の進展もありませんでした。誰もこれを行う方法を知っていますか?
あなたのmagento phtmlファイルに追加します
<?php $category_id = xx; echo $this->getLayout() ->createBlock('catalog/product_list') ->setTemplate('catalog/product/list.phtml') ->setCategoryId($category_id) ->toHtml(); ?>