how to add extra tab without any extension in product page in opencart

被刻印的时光 ゝ 提交于 2019-12-23 03:15:34

问题


how to add extra tab without any extension in product page in opencart may be this is the code for extra tabs any one help? regards

<div class="tabs-group"> <div id="tabs" class="htabs clearfix"><a href="#tab-description">Delivery </a>
        <?php if ($attribute_groups) { ?>
        <a href="#tab-attribute"><?php echo $tab_attribute; ?></a>
        <?php } ?>
        <?php if ($review_status) { ?>
        <a href="#tab-review"><?php echo $tab_review; ?></a>
        <?php } ?>
        <?php if( $productConfig['enable_product_customtab'] && isset($productConfig['product_customtab_name'][$languageID]) ) { ?>
        <a href="#tab-customtab"><?php echo $productConfig['product_customtab_name'][$languageID]; ?></a>
        <?php } ?>

    </div>
    <div id="tab-description" class="tab-content"><?php echo $description; ?></div>
    <?php if ($attribute_groups) { ?>
    <div id="tab-attribute" class="tab-content">
        <table class="attribute">
            <?php foreach ($attribute_groups as $attribute_group) { ?>
            <thead>
            <tr>
                <td colspan="2"><?php echo $attribute_group['name']; ?></td>
            </tr>
            </thead>
            <tbody>
            <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
            <tr>
                <td><?php echo $attribute['name']; ?></td>
                <td><?php echo $attribute['text']; ?></td>
            </tr>
            <?php } ?>
            </tbody>
            <?php } ?>
        </table>
    </div>
    <?php } ?>

may be this is the code for extra tabs any one help? regards


回答1:


Add a link to div id="tabs" with a href to your custom tab's id

 <div class="tabs-group"> 
   <div id="tabs" class="htabs clearfix">
     <a href="#tab-description">Delivery </a>
     <a href="#tab-my-tab">My Tab</a> //Your custom tab
     ....

Then add your tab div after

<div id="tab-description" class="tab-content"><?php echo $description; ?></div>
<div id="tab-my-tab" class="tab-content">Your html content goes here</div>


来源:https://stackoverflow.com/questions/28956949/how-to-add-extra-tab-without-any-extension-in-product-page-in-opencart

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!