Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolbar is not showing on product list page #3

Open
PANKAJSNS opened this issue May 10, 2019 · 5 comments
Open

Toolbar is not showing on product list page #3

PANKAJSNS opened this issue May 10, 2019 · 5 comments

Comments

@PANKAJSNS
Copy link

Hi,

I installed this extension but after installed this extension toolbar is missing from product list page. Please help me.
@rudracomputech
Copy link

A quick solution is modify the catalog_category_view.xml and replace the content container with :

<block class="Magento\Catalog\Block\Product\ListProduct" name="category.products.customlist" as="product_customlist" template="Darsh_Callforprice::list.phtml" > <container name="category.product.list.additional" as="additional" /> <block class="Magento\Framework\View\Element\RendererList" name="category.product.type.details.renderers" as="details.renderers"> <block class="Magento\Framework\View\Element\Template" name="category.product.type.details.renderers.default" as="default"/> </block> <block class="Magento\Catalog\Block\Product\ProductList\Item\Container" name="category.product.addto" as="addto"> <block class="Magento\Catalog\Block\Product\ProductList\Item\AddTo\Compare" name="category.product.addto.compare" as="compare" template="Magento_Catalog::product/list/addto/compare.phtml"/> </block> <block class="Magento\Catalog\Block\Product\ProductList\Toolbar" name="product_list_toolbar" template="Magento_Catalog::product/list/toolbar.phtml"> <block class="Magento\Theme\Block\Html\Pager" name="product_list_toolbar_pager"/> </block> <action method="setToolbarBlockName"> <argument name="name" xsi:type="string">product_list_toolbar</argument> </action> </block>

@Tw0bit
Copy link

Tw0bit commented Dec 2, 2021

I have attempted to make your fix @rudracomputech without success; it does not add back the toolbar.

Also the default sort is not right, it goes by the ID in Desc and not by the magento settings..

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="category.products.list" remove="true"/>
        <referenceContainer name="content">
            <block class="Magento\Catalog\Block\Product\ListProduct" name="category.products.customlist" as="product_customlist" template="Darsh_Callforprice::list.phtml" >
                <container name="category.product.list.additional" as="additional" />
                <block class="Magento\Framework\View\Element\RendererList" name="category.product.type.details.renderers" as="details.renderers">
                    <block class="Magento\Framework\View\Element\Template" name="category.product.type.details.renderers.default" as="default"/>
                </block>
                <block class="Magento\Catalog\Block\Product\ProductList\Item\Container" name="category.product.addto" as="addto">
                    <block class="Magento\Catalog\Block\Product\ProductList\Item\AddTo\Compare" name="category.product.addto.compare" as="compare" template="Magento_Catalog::product/list/addto/compare.phtml"/>
                </block>
                <block class="Magento\Catalog\Block\Product\ProductList\Toolbar" name="product_list_toolbar" template="Magento_Catalog::product/list/toolbar.phtml">
                    <block class="Magento\Theme\Block\Html\Pager" name="product_list_toolbar_pager"/>
                </block>
                <action method="setToolbarBlockName">
                    <argument name="name" xsi:type="string">product_list_toolbar</argument>
                </action>
            </block>
        </referenceContainer>
    </body>
</page>

@Tw0bit
Copy link

Tw0bit commented Feb 20, 2022

I have attempted to make your fix @rudracomputech without success; it does not add back the toolbar.

Also the default sort is not right, it goes by the ID in Desc and not by the magento settings..

@rudracomputech
Copy link

did you try to clear cache and generate static files ? btw what Magento version you are using?

@Tw0bit
Copy link

Tw0bit commented Feb 21, 2022

did you try to clear cache and generate static files ? btw what Magento version you are using?

@rudracomputech I have Magento CE 2.3.1. I have just reloaded the latest files from Darash_Callforprice and rebuilt it.

The contents of catalog_category_view.xml are:

product_list_toolbar

I dont really need the CFP, just a link to Contact Us - so next plan is to just make a basic module that does that.

Note- I deleted the file catalog_category_view.xml and rebuilt the cache/upgrade/compile and it works... thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants