我想在Magento 2中添加所有父类别的自定义图像图标

时间:2016-12-31 11:54:59

标签: html magento icons glyphicons

我需要一些帮助才能在“类别”图层中添加图片图标。请看下面的图片。我只想添加一个如下图所示的图标。

我将在我创建的代码之下分享我的代码。现在我正在使用字体真棒图标。但我想添加图片。请发给我代码和文件路径

image

<div class="block-vmagicmenu-content">
    <ul class="nav-desktop vmagicmenu-narrow clearfix">
        <?php echo $vdrawHomeMenu ?>
        <?php 
            $vdrawMainMenu = str_replace('Kikinben Launching Offer', '<i class="fa fa-tablet fa-lg" aria-hidden="true"></i>&nbsp;Kikinben Launching Offer', $vdrawMainMenu);
            $vdrawMainMenu = str_replace('Phones, Tablets & Accessories', '<i class="fa fa-tablet fa-lg" aria-hidden="true"></i>&nbsp; Phones, Tablets & Accessories', $vdrawMainMenu);
            $vdrawMainMenu = str_replace('Computers & Electronics', '<i class="fa fa-laptop fa-lg" aria-hidden="true"></i>&nbsp; Computers & Electronics', $vdrawMainMenu);
            $vdrawMainMenu = str_replace('TV, Audio & Gaming', '<i class="fa fa-desktop" aria-hidden="true"></i>&nbsp; TV, Audio & Gaming', $vdrawMainMenu);

            $vdrawMainMenu = str_replace('Makeup & Glam', '<i class="fa fa-paint-brush " aria-hidden="true"></i>&nbsp; Makeup & Glam', $vdrawMainMenu);

            $vdrawMainMenu = str_replace('Men\'s Fashion', '<i class="fa fa-male fa-lg" aria-hidden="true"></i>&nbsp; Men\'s Fashion', $vdrawMainMenu);
            $vdrawMainMenu = str_replace('Women\'s Fashion', '<i class="fa fa-female fa-lg" aria-hidden="true"></i>&nbsp; Women\'s Fashion', $vdrawMainMenu);
            $vdrawMainMenu = str_replace('Toys, Kids & Baby', '<i class="fa fa-futbol-o" aria-hidden="true"></i>&nbsp; Toys, Kids & Baby', $vdrawMainMenu);
            $vdrawMainMenu = str_replace('Kitchen & Home Appliances', '<i class="fa fa-cutlery fa-lg" aria-hidden="true"></i>&nbsp; Kitchen & Home Appliances', $vdrawMainMenu);
            $vdrawMainMenu = str_replace('Home & Decor', '<i class="fa fa-bed fa-lg" aria-hidden="true"></i>&nbsp; Home & Decor', $vdrawMainMenu);
            $vdrawMainMenu = str_replace('Car & Motorbike', '<i class="fa fa-car" aria-hidden="true"></i>&nbsp; Car & Motorbike', $vdrawMainMenu);
            $vdrawMainMenu = str_replace('Building & Constructions', '<i class="fa fa-building-o fa-lg" aria-hidden="true"></i>&nbsp; Building & Constructions', $vdrawMainMenu);
            $vdrawMainMenu = str_replace('Beauty & Fragrances', '<i class="fa fa-magic fa-lg" aria-hidden="true"></i>&nbsp; Beauty & Fragrances', $vdrawMainMenu);
            echo $vdrawMainMenu 
        ?>
        <?php echo $vdrawExtraMenu ?>
    </ul>
    <div class="all-cat"><span><?php echo __('All Categories')?></span><span style="display:none"><?php echo __('Close')?></span></div>
</div>

0 个答案:

没有答案