0

How i can change the product toolbar limiter dropdown to links,

like: 9 | 15 | 30 | All

  • When I click on the link it only adds '?product_list_limit=' not the limit in URL. – Wargis Mehta Apr 13 at 10:23
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review – Teja Bhagavan Kollepara Apr 13 at 10:47
1

It can be done by replacing the following code in Magento_Catalog/templates/product/list/toolbar/limiter.phtml

<select id="limiter" data-role="limiter" class="limiter-options">
            <?php foreach ($block->getAvailableLimit() as $_key => $_limit): ?>
                <option value="<?php /* @escapeNotVerified */ echo $_key ?>"<?php if ($block->isLimitCurrent($_key)): ?>
                    selected="selected"<?php endif ?>>
                    <?php /* @escapeNotVerified */ echo $_limit ?>
                </option>
            <?php endforeach; ?>
 </select>

with

<?php foreach ($block->getAvailableLimit() as $_key => $_limit): ?>
        <a data-role="limiter" href="#" data-value="<?php /* @escapeNotVerified */ echo $_key ?>"<?php if ($block->isLimitCurrent($_key)): ?>
            class="selected"<?php endif ?>>
            <?php /* @escapeNotVerified */ echo $_limit ?>
        </a>
<?php endforeach; ?>

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.