Magento コマースの製品ページにいくつかのカスタム タブを追加しようとしています。他のチュートリアルに従いましたが、役に立ったものは何もありませんでした。
このチュートリアルで指定されているように、 DESCRIPTION、SUPPLEMENT FACTS、LABEL、RATING AND REVIEWS、Q & A (チュートリアル リンクから)などのカスタム タブをいくつか追加します。
customtab.phtml には次のものがあります。
<?php
//Load the product
$_helper = $this->helper('catalog/output');
$_product = $this->getProduct()
//Get additional data if the product has it
if($_additional = $this->getAdditionalData()):
//Finally, get the attribute label and close your if statement. Remember to change ingredients to the label you created.
?>
<?php echo $_product->getResource()->getAttribute('customtab')->getFrontend()->getValue($_product); ?>
<?php endif;?>
注: 「customtab」は、既定の属性セットに属性として既に追加されています
レイアウトのために、私は持っています:
<block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml"><br/>
<action method="addToParentGroup"><group>detailed_info</group></action>
<action method="addTab" translate="title" module="catalog">
<alias>customtab</alias>
<title>Custom Tab</title>
<block>catalog/product_view_attributes</block>
<template>catalog/product/view/customtab.phtml</templat>
</action>
</block>
そのカスタムタブを追加する方法はありますか?