1

Doase anybody know how to disable pagination on mysite.com/checkout/cart/ page ?

enter image description here

I Want all my cart items to appear on the same page.

How to do it using XML config ( if possible ) ?

Thanks a lot!

  • 1
    an image will talk more than this. :) please share screenshots. – Shyam Krishna Sreekumar Feb 26 '18 at 8:57
  • Is there a special reason why you want to use config.xml file? Just ask because the config setting does it's job :) – sv3n Mar 1 '18 at 12:32
6

Follow this step

Stores > Configuration > Sales > Checkout > Shopping Cart > Number of Items to Display Pager = 0

  • Do you know how to disable it from layout xml ? Thanks! – Supersonic Feb 26 '18 at 9:28
  • Ronak, I'd like to accept your answer, but please say how to do int from the XML. Thanks! – Supersonic Feb 26 '18 at 15:18
  • I tried but i did't find any solution using .xml file. – Ronak Patel Feb 26 '18 at 17:02
  • I tried too before posting this question. Let's hope someone will give us the answer. – Supersonic Feb 26 '18 at 17:10
  • @Supersonic if you really need this disable functionality using .xml than edit your question. – Ronak Patel Feb 28 '18 at 5:48
2

Create your module with sequence from Magento_Checkout:

app/code/Vendor/Module/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_Module" setup_version="1.0.0">
        <sequence>
            <module name="Magento_Checkout" />
        </sequence>
    </module>
</config>

Override default configuration value:

app/code/Vendor/Module/etc/config.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <checkout>
            <cart>
                <number_items_to_display_pager>0</number_items_to_display_pager>
            </cart>
        </checkout>
    </default>
</config>

Don't forget clear cache. Write me if you have any issues.

  • This sets only the default value, but when you save config section with a different value it's overriden. Or am I wrong? – sv3n Mar 1 '18 at 12:33
  • No, you are right – Evgeny Levinsky Mar 1 '18 at 12:35
  • Just say why it is so and I accept your answer. Thanks! – Supersonic Mar 1 '18 at 13:58

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.