I have to say that the stable version of magento 1.4.1 is not that stable!!
Please release the CE version with checking the unimplemented methods in the core code.
I have found and solve the problem of toolbars display error for the new magento 1.4.1
first of all, for more developers if you want to see the errors prints in the frontend without checking errors using a reference number
do the following in the SSH or use your ftp.
cd errors/ cp local.xml.sample ./local.xml
which means you can just rename the local.xml.sample to local.xml to make all the error message print in the frondend.
Now you may have the errors for the toolbar pager as most of CE user will have their custom theme and the 1.3.2 and older all follow the same theme structure but in 1.4.0+ they change the toolbar class
but they have not implement the method of setUseContainer(false) and setShowAmounts(false)
to solve this problem first you need to add a child to toolbar which is too simple in their release note saying “In layout of any custom theme the usage of catalog/product_list_toolbar block should be changed to page/html_pager:
1) Replace the catalog/product/list/toolbar.phtml of your theme by the new one
2) Update catalog.xml layout: <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml"> should be replaced into <block type="page/html_pager" name="product_list_toolbar_pager"/> “
the correct way should be add this to the catalog.xml
<catalog_category_default> <!-- <reference name="left"> <block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/> </reference> --> <reference name="content"> <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml"> <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml"> <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml"> <!-- The following code shows how to set your own pager increments --> <!-- <action method="setDefaultListPerPage"><limit>4</limit></action> <action method="setDefaultGridPerPage"><limit>9</limit></action> <action method="addPagerLimit"><mode>list</mode><limit>2</limit></action> <action method="addPagerLimit"><mode>list</mode><limit>4</limit></action> <action method="addPagerLimit"><mode>list</mode><limit>6</limit></action> <action method="addPagerLimit"><mode>list</mode><limit>8</limit></action> <action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action> --> <block type="page/html_pager" name="product_list_toolbar_pager"/> </block> <action method="setToolbarBlockName"><name>product_list_toolbar</name></action> </block> </block> </reference> </catalog_category_default>
there is 2 place to add <block type="page/html_pager" name="product_list_toolbar_pager"/> within the <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
which can make it as a child of toolbar otherwise you can’t call method of getChild in the toolbar.php
after that you may need to add the method to page/html/pager.php which i will hack the core code as I can handle all the update and even though make a local overwrite class is better but I don’t want any more update as they release all the errors “stable” version I will have to check everything after updated so I prefer hard code it.
public function setShowAmounts($varName) { $this->_showAmount = $varName; return $this; } public function getShowAmounts() { return $this->_showAmount; } public function setUseContainer($varName) { $this->_showContainer = $varName; return $this; } public function getShowContainer() { return $this->_showContainer; }
then you still need to change the pager.phtml file
<?php /** * Pager template * * @see Mage_Page_Block_Html_Pager */ ?> <?php if($this->getCollection()->getSize()): ?> <?php if($this->getShowContainer()): ?> <div class="pager"> <!-- this is the container --> <?php endif; ?> <?php if($this->getShowAmounts()): ?> <p class="amount"> <!-- this is the show amounts--> <?php if($this->getLastPageNum()>1): ?> <?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> <?php else: ?> <?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?> <?php endif; ?> </p> <?php endif; ?>
Thanks!
After reading hundreds(!) of posts this one solved my problems (no products showing, no “next page”...) with my theme ("Freemagetheme") after installing magento 1.4.
best regards
Patrick
Well, I just added <block type="page/html_pager" name="product_list_toolbar_pager"/> after <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml"> and it solve my problem at categories pages.
The problem of many pages still remains at result search page, I tried to tweak according your thread but nothing happens, that´s the same result as just add the portion of code that I said above.
Continue for the search result page toolbar template fixed.
As the toolbar using the same toolbar function in product list and the only thing you need to change is the catalogsearch.xml
to update the new changes in 1.4.0.1 as they have modified a little of the template structure.
just look for the code like below in catalogsearch.xml
you can see there is 2 result page for simple query search and the advanced search, in these pages you may have a problem of showing the result pages, you can’t choose the page to view as the pager is not loaded according to the old version of magento 1.3.2 ot 1.3.4
now all you need to do is to add the following code to both result index reference block
the only thing changed is to add “<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>"
the toolbar block name seems important but I don’t have time to find out the code, and it works perfectly so I don’t care right now.
the more thing you can look at is just to compare your custom theme to the new template of 1.4.0.1 “base” folder, it is all the required base template for magento 1.4 so if any wrong in your theme happens that means you have to change them to something according to the new template in the “base” folder. Hope this will help you guys!
Currently I am still developing the supplier portal of magento which is not supported by either enterprice edition or CE which can allow provider to update and create product themselve. Even though you can use the api they provide, it can be a solution, but you still have to change a lot of api code and it do not support many functions especially the custom option added to the products. But I can do it and making it uses the customer session and make the process all AJAX which is good for load time. Hope I can come up with something.
Thanks!
After reading hundreds(!) of posts this one solved my problems (no products showing, no “next page”...) with my theme ("Freemagetheme") after installing magento 1.4.
best regards
Patrick
I will try this fix. My products aren’t showing either.
How did they miss this? We need an updated installation. I wish I had not!
You must reindex all data. Go to “Configuration” -> “Index Managment” and reindex all points. If one of them don’t update that’s it, the reason for no products.
When adding <block type="page/html_pager" name="product_list_toolbar_pager"/> to catalog.xml, you have to know that there are two “catalog/product_list_toolbar” blocks—under <catalog_category_default> and next section, <catalog_category_layered>. So be sure to add “product_list_toolbar_pager” block into both sections. That helped me.
thanks @willbe!! This saved me from my headache.... although, after using @bzhang’s code....nothing happened but now my admin area is completely blank.... It doesn’t even spit out any HTML!!! HELP!! I need to fix this!!!!
Any suggestions? I removed all the code supplie from @bzhang, but the problem is still there!
solved my problem. In the process of that I copied my extensions into the modules folder and found the Fooman Speedster extension was blocking my admin area. Make sure you disable Fooman Speedster!!
Solved most of the problems I was having with the pager. Only thing I did differently was merge pager.phtml with the one from 1.4. Seemed to work better than replacing.
Strangely, all the categories and both searches are working correctly now except for my first category… which still does not show pages in the pager.
I have refreshed all cache and indexes.
I\’m just writing to say thank you. It helped me a lot. I spend the whole night awaken trying to solve the issue of no paginantion in search results, and now, at 7 am, I found this thread, and it solved my problem. Now I can sleep!
Great work. Solved my entire pager problem in 1.4
You do make it clear, but needs to be restated, that your amendments need to be made on *both* base search and advanced search blocks in catalogsearch.xml
As you can see, I believe I have the new code addition <block type="page/html_pager" name="product_list_toolbar_pager"/> in the correct place in both places of my catalog.xml file. I applied this change on my frontend to base, default, and my own store folders’ catalog.xml files and still no effect.
I also went further and applied the changes to my pager.phtml and .php files as was suggested. I reindexed after everything. I’m still getting the same error when I visit my categories.