Have you ever thought what will you do as developer when you will need to change the product toolbar limiter dropdown into the links?
Well, here I’m going to guide you about it. All you need to do is to replace below code,
1 2 3 4 5 6 7 8 |
<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:
1 2 3 4 5 6 |
<?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; ?> |
You need to do replacement in this file -> Magento_Catalog/templates/product/list/toolbar/limiter.phtml
Well, once you’re clear with the code replacement, you will able to see toolbar limiter like: 9 | 15 | 30 | All as links.
[crayon-63d3dfde28dba784432697/] Using above fucntion Images can be imported directly from...
Override view block using di.xml and add the below code...
You can check a list of called layout XML for...
Follow the below steps to install and set up PWA...
If you want to remove all leading zero's from order,...
Let our Magento expert connect to discuss your requirement.
We offer Magento
certified developers.
Our Magento clientele
is 500+.
We sign NDA for the
security of your projects.
We’ve performed 100+
Magento migration projects.
Free quotation
on your project.
Three months warranty on
code developed by us.