Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Pager not working in Product List Catalog Block
 
MrFeelgood
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-03-01
Leeuwarden
 

Like many who thought that they could upgrade from 1.3.2.4 to 1.4.0.1 without too many problems because of their programming skills I got stuck with great frustration over the uncovered issues that seem to be unsolvable.

I have a Home Page showing a product/list with a specific category as discribed here:

How To - Display products on home page

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="4" template="catalog/product/list.phtml"}}

The problem is the pager is not showing so customers are able to view basicly only the first page of products.

Strangly enough the pager is working correctly in both the catalog and the search.
I have been breaking my head and keyboard for hours now over trying to fix this bug without ANY succes. I have read all available topics covering the issues with the 1.4.0.1 upgrade, but none seem to address (let alone solve) this specific one.
I am using Magento Classic, a 1.4 compatible skin (beta), but even without it, falling back on default layout /skin the problem occurs.

I’m suspecting the Pager.php located in app\code\core\Mage\Catalog\Block\Product\List\Toolbar of being part of this problem, but at this point I just can’t figure out where the exact problem is.

Has anyone experienced the same problem and managed to fix it? If yes, did you upgrade or a clean install?

Here’s the website I am working on:
Fosse of Norway

 
Magento Community Magento Community
Magento Community
Magento Community
 
altwire
Jr. Member
 
Total Posts:  6
Joined:  2009-07-17
 

We do have the same problem. Unfortunately we have not found a way to fix it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MrFeelgood
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-03-01
Leeuwarden
 
altwire - 01 March 2010 09:48 AM

We do have the same problem. Unfortunately we have not found a way to fix it.

Did you use the upgrade or the fresh install?

 
Magento Community Magento Community
Magento Community
Magento Community
 
altwire
Jr. Member
 
Total Posts:  6
Joined:  2009-07-17
 

Don’t know about the original poster but we used the upgrade / Magento Connect method.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MrFeelgood
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-03-01
Leeuwarden
 
altwire - 02 March 2010 06:54 AM

Don’t know about the original poster but we used the upgrade / Magento Connect method.

I AM the original poster, and I first uploaded the upgrade via FTP and after that used Magento Connect aswell because it strangly enough there were still upgrades available.

 
Magento Community Magento Community
Magento Community
Magento Community
 
altwire
Jr. Member
 
Total Posts:  6
Joined:  2009-07-17
 

We didn’t use FTP. In Magento Connect, we selected “Check for Upgrades” then selected all options available.

I just noticed that the pager does work in the frontend when in “My Account” and looking at “My Orders”. Does yours do the same?

Items 1 to 10 of 17 total Page:  1 2 Next Page Show 10 per page

 
Magento Community Magento Community
Magento Community
Magento Community
 
furniture2home
Jr. Member
 
Total Posts:  29
Joined:  2009-12-18
 

Did you found solution? we have same issue on new install

 
Magento Community Magento Community
Magento Community
Magento Community
 
furniture2home
Jr. Member
 
Total Posts:  29
Joined:  2009-12-18
 

Hi it is not install problem if you look magento official demo page they are missing pagination as well and layout is ......
seems they cant upgrade as well or what what ? i can say that load toolbar from 1.3.2.4 and edit css it works, only you lose prev next text, to fix 1.4.0.1 i have no luck

 
Magento Community Magento Community
Magento Community
Magento Community
 
MrFeelgood
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-03-01
Leeuwarden
 
furniture2home - 08 March 2010 01:51 PM

Hi it is not install problem if you look magento official demo page they are missing pagination as well and layout is ......
seems they cant upgrade as well or what what ? i can say that load toolbar from 1.3.2.4 and edit css it works, only you lose prev next text, to fix 1.4.0.1 i have no luck

Where does the Demo Store use the Product List Catalog Block? As far as I can see this might only be used on this page:

Apparel - Magento Commerce Demo Store

And here the pagination is working correctly. On the catalog and search pages the pagination is also working.
There seems to be a problem connecting the Product List Catalog Block with the Pager function.

Up until now I’ve not been able to solve this neither.

 
Magento Community Magento Community
Magento Community
Magento Community
 
furniture2home
Jr. Member
 
Total Posts:  29
Joined:  2009-12-18
 

look their advanced search with max products and pager is missing smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
juice1492
Jr. Member
 
Total Posts:  20
Joined:  2009-02-18
 

Has there been a solution found for this?  In debugging, I added an echo statement into pager.phtml.  I see the output on category listing and quick search pages, but not on advanced search.  It seems the getPagerHtml() function is not defined for advanced search

 
Magento Community Magento Community
Magento Community
Magento Community
 
juice1492
Jr. Member
 
Total Posts:  20
Joined:  2009-02-18
 

I finally traced down the problem.  The getToolbarBlockName() function in app/code/core/Mage/Catalog/Block/Product/List.php attempts to retrieve a value (ToolBarBlockName) that is set in the layout template (xml document).  In catalogsearch.xml, you need to explicitly set the toolbarblockname in the product_list_toolbar blocks:

<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                        <
block type="page/html_pager" name="product_list_toolbar_pager"  template="page/html/pager.phtml"/>
                    </
block>
                    <
action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
                </
block>

The catalogsearch.xml that comes with the latest Modern Theme has it set for the catalogsearch_result_index block but not the catalogsearch_advanced_result block.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MrFeelgood
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-03-01
Leeuwarden
 
furniture2home - 10 March 2010 05:40 PM

look their advanced search with max products and pager is missing smile

juice1492 - 22 March 2010 05:32 AM

Has there been a solution found for this?  In debugging, I added an echo statement into pager.phtml.  I see the output on category listing and quick search pages, but not on advanced search.  It seems the getPagerHtml() function is not defined for advanced search

juice1492 - 23 March 2010 11:08 AM

I finally traced down the problem.  The getToolbarBlockName() function in app/code/core/Mage/Catalog/Block/Product/List.php attempts to retrieve a value (ToolBarBlockName) that is set in the layout template (xml document).  In catalogsearch.xml, you need to explicitly set the toolbarblockname in the product_list_toolbar blocks:

<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                        <
block type="page/html_pager" name="product_list_toolbar_pager"  template="page/html/pager.phtml"/>
                    </
block>
                    <
action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
                </
block>

The catalogsearch.xml that comes with the latest Modern Theme has it set for the catalogsearch_result_index block but not the catalogsearch_advanced_result block.

Actually that is not the original problem I started this topic for, but good that is resolved aswell.

Now, finally after spending hours and hours of trying to find the culprit file and not being able to do so, I have find a rather simple work around. It does not involve changing core code and is fairly simple to use. I am currently using this solution until the ‘bug’ is fixed in a future version.

Instead of using the Magento block code:

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="4" template="catalog/product/list.phtml"}}
,

I added layout code for the Catalog Block Product List in the Layout update XML at Admin > CMS > Pages.

<reference name="content">
    <
block type="catalog/product_list" name="home" template="catalog/product/list.phtml">
        <
action method="setCategoryId"><category_id>14</category_id></action>
        <
block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                        <
block type="page/html_pager" name="product_list_toolbar_pager"/>
        </
block>
        <
action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
    </
block>
</
reference>

I still suspect this bug to be in a layout xml file for the catalog blocks or in a handler for the CMS page blocks.
Hopefully this issue will be resolved in the upcoming version of Magento.
Until then you can use this workaround.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Cyclops19
Sr. Member
 
Total Posts:  134
Joined:  2008-06-11
 

If any one comes up with answer let me know geegadget@yahoo.com I did fresh install upgrade to magento 1.4.0.  I thought everything was ok so I started building themes , Main page 2 themes then decided I better check products etc. It seems no matter what I do all I get is a image of a product sitting there all by its little old self wondering what the (*&^%) And what is a-
pagination -? I think I saw one running down the road the other day so I tried to run it over.  - page is www.imaginethemes.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
MrFeelgood
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-03-01
Leeuwarden
 
cyclops - 03 April 2010 04:42 PM

If any one comes up with answer let me know geegadget@yahoo.com I did fresh install upgrade to magento 1.4.0.  I thought everything was ok so I started building themes , Main page 2 themes then decided I better check products etc. It seems no matter what I do all I get is a image of a product sitting there all by its little old self wondering what the (*&^%) And what is a-
pagination -? I think I saw one running down the road the other day so I tried to run it over.  - page is www.imaginethemes.com

I just gave the answer to this topic’s question. If you would have read it you’d have known.

Furthermore: a fresh install is by definition not an upgrade. It seems like you are addressing a totally different issue concerning themes. This topic is not about a theme-related problem, so maybe you should concider opening a seperate new topic.

The pagination is the numbers with links to the other product pages:

Definition of pagination

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagThemes
Jr. Member
 
Total Posts:  5
Joined:  2010-03-23
 

Instead of using the Magento block code:

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="4" template="catalog/product/list.phtml"}}
,

I added layout code for the Catalog Block Product List in the Layout update XML at Admin > CMS > Pages.

<reference name="content">
    <
block type="catalog/product_list" name="home" template="catalog/product/list.phtml">
        <
action method="setCategoryId"><category_id>14</category_id></action>
        <
block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                        <
block type="page/html_pager" name="product_list_toolbar_pager"/>
        </
block>
        <
action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
    </
block>
</
reference>

I still suspect this bug to be in a layout xml file for the catalog blocks or in a handler for the CMS page blocks.
Hopefully this issue will be resolved in the upcoming version of Magento.
Until then you can use this workaround.

Works beautifully. You have saved us hours of trouble shooting. Many thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2