bạn có thể kiểm tra của bạn ứng dụng \ thiết kế \ frontend [bạn dự án] \ default \ layout \ catalog.xml & Tìm dòng này.
<block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml">
<action method="addToParentGroup"><group>detailed_info</group></action>
<action method="setTitle" translate="value"><value>Description</value></action>
</block>
trong dòng này. Thêm mã này
<block type="catalog/product_view_attributes" name="product.sizes" as="sizes" template="catalog/product/view/sizes.phtml">
<action method="addToParentGroup"><group>detailed_info</group></action>
<action method="setTitle" translate="value"><value>Store Locator</value></action>
Và tạo của bạn tập tin size.phtml riêng & tiết kiệm catalô/sản phẩm/xem/sizes.phtml & thêm mã này.
<?php $_product = $this->getProduct();
$attribute = $_product->getResource()->getAttribute('store_locator');
if (is_object($attribute)) {
$identifier = $_product->getData("store_locator");
}?>
<?php if ($_sizeBlock = Mage::app()->getLayout()->createBlock('cms/block')->setBlockId($identifier)): ?>
<div class="std">
<?php echo $_sizeBlock->toHtml() ?>
</div>
<?php endif; ?>
bộ nhớ cache rõ ràng & Nạp lại trình duyệt của bạn Ngay See cuối cùng tab của riêng bạn Nhưng mã của bạn không nhìn thấy nhưng becoz bạn cần phải tạo thuộc tính & mà khối tĩnh muốn xem đặt tên định danh trong thuộc tính.
Nguồn
2014-12-27 06:08:47
OK, nhưng điều gì xảy ra nếu thuộc tính sẽ trống - trống. Các tab sẽ vẫn xuất hiện. –
có nó sẽ hiển thị dưới dạng tab trống nhưng bạn cũng có thể đặt một số thông báo tại tab hiện tại trống. – liyakat