-
Notifications
You must be signed in to change notification settings - Fork 5
CMS features
Moved out of Mventory_TM, I presume. This has to be an extension of its own, combined with widgets.
Anything that goes on product details page.
The tabbed area of the page can be built dynamically from static blocks based on its ID or values in specified attributes.
Sample layout update:
<reference name="product.info.tabs">
<action method="addCmsBlockAsTabByAttr">
<alias>door_color_tab</alias>
<code>door_color_</code>
</action>
</reference>
where, door_color_tab
is an ID of the tab (make one up, something unique) and door_color_
is the name of the attribute to take the ID of the static block from.
Sample layout update:
<reference name="product.info.tabs">
<action method="addCmsBlockAsTab">
<alias>some_unique_tab_id</alias>
<title>tab_title</title>
<id>id_of_the_static_block</id>
</action>
</reference>
If the attribute is not present in the product or there is no static block with the specified ID the tab will not show.
The layout update can be done at the category level or at the product level.
Note: do not forget to set Apply To Products to Yes on Custom Design tab of category's settings to apply layout changes on category's products.
The tab shows different information about a seller of the viewed product. Such as store's name, its address, phone number, e-mail and URL of the website.
It's not enabled in the M.'s default theme. You need to add the tab in category's settings or globally in default theme's local.xml file.
Put the following code snippet into Custom Layout Update field on Custom Design tab of category's settings and set Apply To Products to Yes there.
<reference name="product.info">
<block type="mventory_tm/product_view_store"
name="product.store"
as="store"
after="product.description"
template="catalog/product/view/store.phtml">
<action method="addToParentGroup"><group>detailed_info</group></action>
</block>
</reference>
Add the code above to the theme's local.xml file in catalog_product_view tag.
Example of local.xml file:
<layout version="0.1.0">
...
<catalog_product_view>
...
<reference name="product.info">
<block type="mventory_tm/product_view_store"
name="product.store"
as="store"
after="product.description"
template="catalog/product/view/store.phtml">
<action method="addToParentGroup"><group>detailed_info</group></action>
</block>
</reference>
....
</catalog_product_view>
...
</layout>
The code of seller details' tab works out of the box with default theme and with other custom themes which use similar tab's code and layout.
Template and layout code of the tab may vary for other themes and should be adapted.