简体   繁体   中英

Product Specification in table grid view in magento..!

I m inserting the data in description in magento...!! but I'm getting a paragraph...!! but inorder to get tabular format I had to write the HTML code manually. So is there any solutions to get the tabular format autmatically.

For example follow below pic:

在此处输入图片说明

Create maximum attributes for specification add those.

like spec_1.spec_2,......

then display those attributes values in specification section in table format.

For example:

    <table class="data-table" id="product-attribute-specs-table-4">
        <col width="25%" />
        <col />
        <tbody>
        <?php if (0 == strcmp($attributeSetName, 'Clothing')): ?>
            <tr>
                <th class="label">Clothing Shape</th>
                <td class="data"><?php echo $_product->getClothing_shape() ?></td>
            </tr>
            <tr>
                <th class="label">Outer Fabric</th>
                <td class="data"><?php echo $_product->getOuter_fabric() ?></td>
            </tr>   
            <tr>
                <th class="label">Clothing Lining</th>
                <td class="data"><?php echo $_product->getClothing_lining() ?></td>
            </tr>   
        <?php elseif (0 == strcmp($attributeSetName, 'Sleeping Bags')): ?>      
            <tr>
                <th class="label">Outer Fabric</th>
                <td class="data"><?php echo $_product->getOuter_fabric() ?></td>
            </tr>
            <tr>
                <th class="label">Inner Fabric</th>
                <td class="data"><?php echo $_product->getInner_fabric() ?></td>
            </tr>   
            <tr>
                <th class="label">Filling</th>
                <td class="data"><?php echo $_product->getFilling() ?></td>
            </tr>   
        <?php endif; ?>     
        </tbody>
    </table>

<script type="text/javascript">decorateTable('product-attribute-specs-table-4')</script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM