0

I have custom attribute called "hasgift" and its Boolean (yes, No), and trying to display it's value in products tab Module in homepage. But Its Only Give Me (No) Vaue. I have Used Same Code in product List Page And It Work Fine But In this Module Not Work. I use the following code:

    $_getMyAttr = $_product->getResource()->getAttribute('hasgift');

    // Get Value
    $attrTestValue = $_getMyAttr->getFrontend()->getValue($_product);

    // Get Label
    $attrTestLabel = $_getMyAttr->getStoreLabel();

    echo $attrTestValue ;

and This is a Full Phtml Page:

 <?php

use Magento\Framework\App\Action\Action;

$_productCollection = $block->getLoadedProductCollection();
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$helper = $this->_helper();
if ($this->_isAjax()) {
    $type_filter = $this->_getConfig('filter_type');
    switch ($type_filter) {
        case 'categories':
            $catid = $this->getRequest()->getPost('categoryid');
            $child_items = $this->_getProductInfor($catid);
            break;
        case 'fieldproducts':
            $field_order = $this->getRequest()->getPost('categoryid');
            $catid = $this->_getCatIds();
            $child_items = $this->_getProductInfor($catid, $field_order);
            break;
    }
}
if (!empty($child_items)) {
    $j = $this->getRequest()->getPost('ajax_listingtags_start', 0);
    $nb_type_show = $this->_getConfig('show_loadmore_slider');
    $nb_rows = $this->_getConfig('nb_rows', 1);
    $i = 0;
    $count = count($child_items);

    foreach ($child_items as $_product) {

        $_getMyAttr = $_product->getResource()->getAttribute('hasgift');

        // Get Value
        $attrTestValue = $_getMyAttr->getFrontend()->getValue($_product);

        // Get Label
        $attrTestLabel = $_getMyAttr->getStoreLabel();

        echo $attrTestValue ;

        $i++;$j++; ?>
        <?php if($nb_type_show == 'slider' && ($i % $nb_rows == 1 || $nb_rows == 1)) { ?>
        <div class="item ltabs-item new-ltabs-item">
        <?php } ?>
        <?php if ($nb_type_show == 'loadmore'){ ?>
        <div class="item ltabs-item new-ltabs-item">
        <?php } ?>
            <div class="item-inner">
                <?php

                if ($_product->_image) { ?>

                    <div class="box-image">
                        <?php if ($_product->getIsSalable()): ?>
                            <span></span>
                        <?php else: ?>
                            <div class="product_unavailable"></div>
                        <?php endif; ?>
                        <a href="<?php echo $_product->link ?>"
                           title="<?php echo $_product->title; ?>"
                            <?php echo $helper->parseTarget($this->_getConfig('target')); ?>
                            >
                            <img src="<?php echo $_product->_image; ?>"
                                 title="<?php echo $_product->title; ?>"
                                 alt="<?php echo $_product->title; ?>" >
                        </a>

                        <?php
                        $specialprice = $_product->getSpecialPrice();
                        $specialPriceFromDate = $_product->getSpecialFromDate();
                        $specialPriceToDate = $_product->getSpecialToDate();

                        $today = time();

                        if ($specialprice) {
                            if ($today >= strtotime($specialPriceFromDate) && $today <= strtotime($specialPriceToDate) || $today >= strtotime($specialPriceFromDate) && is_null($specialPriceToDate)) { ?>
                                <div class="label-product label-sale">
                                                <span class="sale-product-icon">
                                                    <?php echo __('Sale'); ?>
                                                </span>
                                </div>
                            <?php }
                        }
                        ?>

                        <?php
                        $now = date("Y-m-d");
                        $newsFrom = substr($_product->getNewsFromDate(), 0, 10);
                        $newsTo = substr($_product->getNewsToDate(), 0, 10);

                        if ($newsTo != '' || $newsFrom != '') {
                            if (($newsTo != '' && $newsFrom != '' && $now >= $newsFrom && $now <= $newsTo) || ($newsTo == '' && $now >= $newsFrom) || ($newsFrom == '' && $now <= $newsTo)) {?>
                                <div class="label-product label-new">
                                    <span class="new-product-icon"><?php echo __('New'); ?></span>
                                </div>
                            <?php }
                        } ?>

                    </div>
                <?php }?>

                <!-- Begin ltabs-content -->
                <?php  ?>
                <div class="product details product-item-details box-info">

                    <?php if ((int)$this->_getConfig('product_title_display', 1)) { ?>
                        <h2 class="product name product-item-name product-name">
                            <a href="<?php echo $_product->link; ?>" title="<?php echo $_product->title; ?>"
                                <?php echo $helper->parseTarget($this->_getConfig('target')); ?>
                                >
                                <?php echo $helper->truncate($_product->title, $this->_getConfig('product_title_maxlength')); ?>
                            </a>
                        </h2>
                    <?php } ?>

                    <?php if ((int)$this->_getConfig('product_description_display', 1) && $helper->_trimEncode($_product->_description) != '') { ?>
                        <div class="ltabs-description">
                            <?php echo $_product->_description; ?>
                        </div>
                    <?php } ?>

                    <?php if ($this->_getConfig('product_source') != 'media') { ?>
                        <?php if ((int)$this->_getConfig('product_reviews_count', 1)) { ?>
                                <?php 
                                    $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
                                    echo $block->getReviewsSummaryHtml($_product,$templateType,true); 
                                ?>
                        <?php } ?>

                        <?php if ((int)$this->_getConfig('product_price_display', 1)) { ?>
                            <div class="ltabs-price">
                                <div class="sale-price">
                                      <?php echo $this->getProductPrice($_product); ?>
                                </div>
                            </div>
                        <?php } ?>

                        <?php if ((int)$this->_getConfig('product_addcart_display', 1) ||(int)$this->_getConfig('product_addwishlist_display', 1) || (int)$this->_getConfig('product_addcompare_display', 1)) { ?>
                        <div class="bottom-action">
                            <?php if ((int)$this->_getConfig('product_addcart_display', 1)) { ?>
                            <div class="actions-primary">
                                 <?php if ($_product->isSaleable()): ?>
                                    <?php $postParams = $this->getAddToCartPostParams($_product); 
                                    $objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
                                    $session = $objectManager->get('\Magento\Framework\View\Element\FormKey');
                                    ?>
                                    <form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
                                        <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
                                        <input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
                                        <?php echo $block->getBlockHtml('formkey')?>
                                        <input  name="form_key" type="hidden" value="<?php echo $session->getFormKey(); ?>" />
                                        <button type="submit"
                                                title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
                                                class="action tocart btn-action btn-cart">
                                            <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
                                        </button>
                                    </form>
                                <?php else: ?>
                                    <?php if ($_product->getIsSalable()): ?>
                                        <div class="stock available"><span><?php /* @escapeNotVerified */ echo __('In stock') ?></span></div>
                                    <?php else: ?>
                                        <div class="stock unavailable"><span><?php /* @escapeNotVerified */ echo __('Out of stock') ?></span></div>
                                    <?php endif; ?>
                                <?php endif; ?>
                            </div>
                            <?php } ?>

                            <?php if ((int)$this->_getConfig('product_addwishlist_display', 1) || (int)$this->_getConfig('product_addcompare_display', 1)) { ?>
                                <div class="secondary-addto-links actions-secondary" data-role="add-to-links">
                                    <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && (int)$this->_getConfig('product_addwishlist_display', 1) ){ ?>
                                        <a href="#" data-post='<?php  echo $block->getAddToWishlistParams($_product); ?>'  class="action towishlist btn-action link-wishlist" data-action="add-to-wishlist" title="<?php  echo __('Add to Wish List') ?>">
                                            <span><?php  echo __('Add to Wish List') ?></span>
                                        </a>
                                    <?php } ?>
                                    <?php if ($block->getAddToCompareUrl() &&  (int)$this->_getConfig('product_addcompare_display', 1)){ ?>
                                        <?php
                                        $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
                                        ?>
                                        <a href="#" class="action tocompare btn-action link-compare"
                                           data-post='<?php  echo $compareHelper->getPostDataParams($_product);?>'
                                           data-role="add-to-links"
                                           title="<?php  echo __('Add to Compare'); ?>">
                                            <span><?php  echo __('Add to Compare') ?></span>
                                        </a>
                            <?php }; ?>
                                </div>
                            <?php } ?>
                        </div>
                        <?php } ?>
                    <?php } ?>

                    <?php if ($this->_getConfig('product_readmore_display') == 1) { ?>
                        <div class="ltabs-detail">
                            <a class="" href="<?php echo $_product->link ?>"
                               title="<?php echo $_product->title; ?>"
                                <?php echo $helper->parseTarget($this->_getConfig('target')); ?>
                                >
                                <?php echo $this->_getConfig('product_readmore_text', 'Details'); ?>
                            </a>


                        </div>

                    <?php } ?>
                </div>
            </div>
        <?php if($nb_type_show == 'slider' && ($i % $nb_rows == 0 || $i == $count)) { ?>
        </div>
        <?php }
        if ($nb_type_show == 'loadmore'){ ?>
            </div>
        <?php } ?>
        <?php $clear = 'clr1';
        if ($j % 2 == 0) $clear .= ' clr2';
        if ($j % 3 == 0) $clear .= ' clr3';
        if ($j % 4 == 0) $clear .= ' clr4';
        if ($j % 5 == 0) $clear .= ' clr5';
        if ($j % 6 == 0) $clear .= ' clr6';
        ?>
        <?php if( $this->_getConfig('show_loadmore_slider') == 'loadmore'){ ?>
            <div class="<?php echo $clear; ?>"></div>
        <?php } ?>
    <?php
    }
}?>

My list Page (whit the same Code And Work good):

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php
/**
 * Product list template
 *
 * @see \Magento\Catalog\Block\Product\ListProduct
 */
?>
<?php
$_config = $this->helper('Sm\Lovefashion\Helper\Data');

if (!$this->_getConfig('isactive', 1)) return;
use Magento\Framework\App\Action\Action;
$start = microtime(true);
$_productCollection = $block->getLoadedProductCollection();
$_helper = $this->helper('Magento\Catalog\Helper\Output');
?>

<?php if (!$_productCollection->count()): ?>
<p class="message note"><?php /* @escapeNotVerified */ echo __('We can\'t find products matching the selection.') ?></p>
<?php else: ?>
    <?php if (!$this->getRequest()->isAjax()): ?>
        <div id="ajax-errors" style="display: none;">
            <ul class="messages">
                <li class="error-msg">
                    <ul>
                        <li><span><?php echo __('An error occurred, please try again later.'); ?></span></li>
                    </ul>
                </li>
            </ul>
        </div>
    <?php endif; ?>
<div id="catalog-listing">  
<?php echo $block->getToolbarHtml() ?>
<?php
    if ($block->getMode() == 'grid') {
        $viewMode = 'grid';
        $image = 'category_page_grid';
        $showDescription = false;
        $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
    } else {
        $viewMode = 'list';
        $image = 'category_page_list';
        $showDescription = true;
        $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::FULL_VIEW;
    }
    $pos = $block->getPositioned();
?>
    <div class="category-product products  wrapper <?php /* @escapeNotVerified */ echo $viewMode; ?> products-<?php /* @escapeNotVerified */ echo $viewMode; ?>">
            <?php $iterator = 1;?>

            <?php if ($viewMode == 'grid') {?>
                <ol class="products list items product-items row">
                <?php foreach ($_productCollection as $_product): ?>
                    <li class="item product product-item">
                        <div class="product-item-info">
                            <div class="item-inner">
                                <div class="box-image">
                                    <?php
                                    $_getMyAttr = $_product->getResource()->getAttribute('hasgift');

                                    // Get Value
                                    $attrTestValue = $_getMyAttr->getFrontend()->getValue($_product);

                                    // Get Label
                                    $attrTestLabel = $_getMyAttr->getStoreLabel();
                                    ;?>
                                    <?php echo $attrTestValue ;?>
                                    <?php $productImage = $block->getImage($_product, $image); ?>

                                    <a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">
                                        <?php echo $productImage->toHtml(); ?>
                                    </a>

                                    <!--LABEL PRODUCT-->

                                        <?php
                                            $specialprice = $_product->getSpecialPrice();
                                            $specialPriceFromDate = $_product->getSpecialFromDate();
                                            $specialPriceToDate = $_product->getSpecialToDate();

                                            $today = time();

                                            if ($specialprice) {
                                                if ($today >= strtotime($specialPriceFromDate) && $today <= strtotime($specialPriceToDate) || $today >= strtotime($specialPriceFromDate) && is_null($specialPriceToDate)) { ?>
                                                    <div class="label-product label-sale">
                                                        <span class="sale-product-icon">
                                                            <?php echo __('Sale'); ?>
                                                        </span>
                                                    </div>
                                                <?php }
                                            }
                                        ?>

                                        <?php
                                        $now = date("Y-m-d");
                                        $newsFrom = substr($_product->getNewsFromDate(), 0, 10);
                                        $newsTo = substr($_product->getNewsToDate(), 0, 10);

                                        if ($newsTo != '' || $newsFrom != '') {
                                            if (($newsTo != '' && $newsFrom != '' && $now >= $newsFrom && $now <= $newsTo) || ($newsTo == '' && $now >= $newsFrom) || ($newsFrom == '' && $now <= $newsTo)) {?>
                                                    <div class="label-product label-new">
                                                        <span class="new-product-icon"><?php echo __('New'); ?></span>
                                                    </div>
                                            <?php }
                                        } ?>


                                    <!--END LABEL PRODUCT-->
                                </div>

                                <div class="product details product-item-details box-info">
                                    <?php
                                        $_productNameStripped = $block->stripTags($_product->getName(), null, true);
                                    ?>
                                    <h2 class="product name product-item-name product-name">
                                        <a class="product-item-link"
                                           href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>">
                                            <?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
                                        </a>
                                    </h2>

                                    <?php echo $block->getReviewsSummaryHtml($_product, $templateType,true); ?>
                                    <?php /* @escapeNotVerified */ echo $block->getProductPrice($_product) ?>
                                    <?php echo $block->getProductDetailsHtml($_product); ?>

                                    <div class="bottom-action">
                                        <?php if($_config->getAdvanced('show_addtocart_button')){?>
                                            <?php if ($_product->isSaleable()): ?>
                                                <?php $postParams = $block->getAddToCartPostParams($_product); ?>
                                                <form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
                                                    <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
                                                    <input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
                                                    <?php echo $block->getBlockHtml('formkey')?>
                                                    <button type="submit" title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" class="action tocart primary  btn-cart">
                                                        <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
                                                    </button>
                                                </form>
                                            <?php else: ?>
                                                <?php if ($_product->getIsSalable()): ?>
                                                    <div class="stock available"><span><?php /* @escapeNotVerified */ echo __('In stock') ?></span></div>
                                                <?php else: ?>
                                                    <div class="stock unavailable"><span><?php /* @escapeNotVerified */ echo __('Out of stock') ?></span></div>
                                                <?php endif; ?>
                                            <?php endif; ?>
                                        <?php } ?>

                                        <?php if($_config->getAdvanced('show_wishlist_button')){?>
                                            <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
                                                <a href="#" class="action towishlist btn-action link-wishlist" title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"  aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" data-post='<?php /* @escapeNotVerified */ echo $block->getAddToWishlistParams($_product); ?>' data-action="add-to-wishlist"  role="button">
                                                    <span><?php /* @escapeNotVerified */ echo __('Add to Wish List') ?></span>
                                                </a>
                                            <?php endif; ?>
                                        <?php } ?>

                                        <?php if($_config->getAdvanced('show_compare_button')){?>
                                            <?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); ?>
                                            <a href="#"  class="action tocompare btn-action link-compare"  title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"  data-post='<?php /* @escapeNotVerified */ echo $compareHelper->getPostDataParams($_product); ?>' role="button">
                                                <span><?php /* @escapeNotVerified */ echo __('Add to Compare') ?></span>
                                            </a>
                                        <?php } ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </li>
                <?php endforeach; ?>
                </ol>
            <?php } else {?>
                <ol class="products list items product-items">
                    <?php foreach ($_productCollection as $_product): ?>
                        <li class="item respl-item-list product product-item">
                            <div class="product-item-info" data-container="product-grid">
                                <div class="item-inner">
                                    <div class="box-image-list">
                                        <?php
                                            $productImage = $block->getImage($_product, $image);
                                        ?>

                                        <!--LABEL PRODUCT-->

                                        <?php
                                            $specialprice = $_product->getSpecialPrice();
                                            $specialPriceFromDate = $_product->getSpecialFromDate();
                                            $specialPriceToDate = $_product->getSpecialToDate();

                                            $today = time();

                                            if ($specialprice) {
                                                if ($today >= strtotime($specialPriceFromDate) && $today <= strtotime($specialPriceToDate) || $today >= strtotime($specialPriceFromDate) && is_null($specialPriceToDate)) { ?>
                                                    <div class="label-product label-sale">
                                                        <span class="sale-product-icon">
                                                            <?php echo __('Sale'); ?>
                                                        </span>
                                                    </div>
                                                <?php }
                                            }
                                        ?>

                                        <?php
                                        $now = date("Y-m-d");
                                        $newsFrom = substr($_product->getNewsFromDate(), 0, 10);
                                        $newsTo = substr($_product->getNewsToDate(), 0, 10);

                                        if ($newsTo != '' || $newsFrom != '') {
                                            if (($newsTo != '' && $newsFrom != '' && $now >= $newsFrom && $now <= $newsTo) || ($newsTo == '' && $now >= $newsFrom) || ($newsFrom == '' && $now <= $newsTo)) {?>
                                                    <div class="label-product label-new">
                                                        <span class="new-product-icon"><?php echo __('New'); ?></span>
                                                    </div>
                                            <?php }
                                        } ?>


                                        <!--END LABEL PRODUCT-->

                                        <a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">
                                                <?php echo $productImage->toHtml(); ?>
                                        </a>

                                    </div>

                                    <div class="product details product-item-details box-info-list">
                                        <?php
                                            $_productNameStripped = $block->stripTags($_product->getName(), null, true);
                                        ?>
                                        <h2 class="product name product-item-name product-name">
                                            <a class="product-item-link" href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>">
                                                <?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
                                            </a>
                                        </h2>

                                        <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>
                                        <?php /* @escapeNotVerified */ echo $block->getProductPrice($_product) ?>
                                        <?php echo $block->getProductDetailsHtml($_product); ?>

                                        <div class="product-item-inner">
                                            <?php if ($showDescription):?>
                                                <div class="product description product-item-description">
                                                    <?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
                                                    <a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" title="<?php /* @escapeNotVerified */ echo $_productNameStripped ?>"
                                                       class="action more"><?php /* @escapeNotVerified */ echo __('Learn More') ?></a>
                                                </div>
                                            <?php endif; ?>
                                        </div>

                                        <div class="bottom-action">
                                            <?php if($_config->getAdvanced('show_addtocart_button')){?>
                                                <?php if ($_product->isSaleable()): ?>
                                                    <?php $postParams = $block->getAddToCartPostParams($_product); ?>
                                                    <form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
                                                        <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
                                                        <input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
                                                        <?php echo $block->getBlockHtml('formkey')?>
                                                        <button type="submit" title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" class="action tocart  btn-cart">
                                                            <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
                                                        </button>
                                                    </form>
                                                <?php else: ?>
                                                    <?php if ($_product->getIsSalable()): ?>
                                                        <div class="stock available"><span><?php /* @escapeNotVerified */ echo __('In stock') ?></span></div>
                                                    <?php else: ?>
                                                        <div class="stock unavailable"><span><?php /* @escapeNotVerified */ echo __('Out of stock') ?></span></div>
                                                    <?php endif; ?>
                                                <?php endif; ?>
                                            <?php } ?>

                                            <div class="add-to-links" data-role="add-to-links" class="actions-secondary">
                                                <?php if($_config->getAdvanced('show_wishlist_button')){?>
                                                    <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
                                                        <a href="#" class="action towishlist btn-action link-wishlist" title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"  aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" data-post='<?php /* @escapeNotVerified */ echo $block->getAddToWishlistParams($_product); ?>' data-action="add-to-wishlist"  role="button">
                                                            <span><?php /* @escapeNotVerified */ echo __('Add to Wish List') ?></span>
                                                        </a>
                                                    <?php endif; ?>
                                                <?php } ?>

                                                <?php if($_config->getAdvanced('show_compare_button')){?>
                                                    <?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); ?>
                                                    <a href="#"  class="action tocompare btn-action link-compare"  title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"  data-post='<?php /* @escapeNotVerified */ echo $compareHelper->getPostDataParams($_product); ?>' role="button">
                                                        <span><?php /* @escapeNotVerified */ echo __('Add to Compare') ?></span>
                                                    </a>
                                                <?php } ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </li>
                    <?php endforeach; ?>
                </ol>
            <?php } ?>
    </div>
<?php echo $block->getToolbarHtml() ?>
<?php endif; ?>
</div>
<script type="text/javascript">
    require([
        "jquery"
    ], function ($) {
        $(document).ready(function($){
            $("#sorter").removeAttr("data-role");
            $("#limiter").removeAttr("data-role");
            $("#mode-list").removeAttr("data-role");
            $(".sorter-action").removeAttr("data-role");
            $(".sorter-options").removeAttr("data-role");
            $(".limiter-options").removeAttr("data-role");
        });
    });
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.