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!

2
  • 1
    an image will talk more than this. :) please share screenshots. Commented Feb 26, 2018 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
    Commented Mar 1, 2018 at 12:32

2 Answers 2

6

Follow this step

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

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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