How to give 'view all' in pagination (magento) - magento

I am using magento 1.7.In my home page I want to display product in different categories with pagination. I tried the following code, and pagination is working.How to give 'view all' here.
<reference name="left">
<block type="catalog/layer_view" before="-" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
</reference>
<reference name="root">
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs">
</block>
</reference>
<reference name="content">
<block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml">
<action method="setColumnCount"><column_count>6</column_count></action>
<action method="setProductsCount"><count>0</count></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" template="catalog/product/list/pager.phtml"/>
<action method="setDefaultListPerPage"><limit>15</limit></action>
<action method="setDefaultGridPerPage"><limit>6</limit></action>
<action method="addPagerLimit"><mode>grid</mode><limit>6</limit></action>
</block>
<action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>6</count></action>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
</reference>

Go to your admin system->configuration.
select catalog tab and select frontend option here you can find option Allow All Products per Page select yes and save.
Now view all link is listed in your dropdown.

Related

I cannot find where the static blocks are stacking up from on my home page

<block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
<label>Page Header</label>
<action method="setElementClass"><value>top-container</value></action>
<block type="core/template" name="pageHeader" template="page/html/topcontainer.phtml">
<block type="core/template" name="page.header" template="page/html/page_header.phtml"/>
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</block>
</block>
This block lines up my entire home page. I need to add another block in to this list. This is read from CMS blocks in Admin panel. How can I find the source.
Use this code you will be able to read from CMS blocks in Admin panel with name contact.
<reference name="left">
<block type="cms/block" name="contact" before="-">
<action method="setBlockId"><block_id>contact</block_id></action>
</block>
</reference>

CMS page with layered navigation not working

I've added a CMS page wich shows all the products listed under the "All Products" category by creating a CMS page with a "two column with left sidebar" layout, and in the content tabs, I've added the following code:
{{block type="catalog/product_list" category_id="2" template="catalog/product/list.phtml"}}
I was reading about it and the layered navigation should be showing already. However, I've set "Is anchor" to yes, but it doesn't work. I can't make it to appear. What am I missing here? Is there a better way to create this catalog page?
Thanks in advance.
To display layered navigation on cms page you have to set root category to Is Anchor=Yes.
Please check the below link for calling layer navigation in CMS Page
http://www.webdesign-gm.co.uk/news/web-design/magento-web-design/layered-navigation-on-home-page-or-any-cms-page-magento.php
Or you can try this Design tab->Page Layout->Layout Update XML:
<reference name="left">
<!-- Layered Navigation Block -->
<block type="catalog/layer_view" name="catalog.leftnav" template="catalog/layer/view.phtml" >
<action method="setCategoryId"><category_id>40</category_id></action>
</block>
</reference>
<reference name="content">
<block type="catalog/product_list" name="home" template="catalog/product/list.phtml">
<!-- Product List View -->
<action method="setCategoryId"><category_id>40</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>
Open CMS->Pages->[your page] in Magento Admin Panel.
Add the following layout instructions to Design tab->Page Layout->Layout Update XML
<block type="catalog/product_list" name="product_list"
template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>3</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="addColumnCountLayoutDepend">
<layout>empty</layout>
<count>6</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>one_column</layout>
<count>5</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>two_columns_left</layout>
<count>4</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>two_columns_right</layout>
<count>4</count>
</action>
<action method="addColumnCountLayoutDepend">
<layout>three_columns</layout>
<count>3</count>
</action>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
<block type="catalog/layer_view" name="cms_layer" as="cms_layer" before="-">
<action method="setCategoryId"><category_id>3</category_id></action>
</block>
Also insert ID of desired category in 3 (2 times).
Open desired category of your store through Catalog->Manage Categories. Make sure that Is Anchor=Yes on Display Settings tab.
One possible reason layered navigation does not show is because you also need to configure your attributes to show in layered navigation.

Display Products on Home Page with Pagination in Magento

I am new to magento.
I am creating a products page which will contain large number of products.
I am trying to display them on my CMS page, But i am able to show only 20 records per page. I just want to show pagination, So that user can navigate through the products easily.
I have searched over the net and found this code and updated in Layout Update XML
<reference name="content">
<block type="catalog/product_list" name="featured" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>2</category_id></action>
</block>
</reference>
But it's not working.
Are there any default paging mechanisms in Magento?
i found the solution for my question
here Layout Update XML
<reference name="content">
<block type="catalog/product_list" name="home" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>2</category_id></action>
<action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></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><count>5</count></action>
</block>
</reference>
just change category id you want to paginate.

Change display order of checkout buttons in Magento

I need to place checkout buttons in shopping cart page in order
1) Proceed to checkout
2) Google checkout
3) Paypal Express
checkout.xml
inside
<checkout_cart_index>
<block type="core/text_list" name="checkout.cart.methods" as="methods" translate="label">
<label>Payment Methods After Checkout Button</label>
<block type="checkout/onepage_link" name="checkout.cart.methods.onepage" as="testproceed" after="-" template="checkout/onepage/link.phtml"/>
<block type="checkout/multishipping_link" name="checkout.cart.methods.multishipping" template="checkout/multishipping/link.phtml"/>
</block>
googlecheckout.xml
<reference name="checkout.cart.methods">
<block type="googlecheckout/link" name="checkout.cart.methods.googlecheckout.bottom" after="testproceed" as="testgoogle" template="googlecheckout/link.phtml"/>
</reference>
paypal.xml
<reference name="checkout.cart.methods">
<block type="paypal/express_shortcut" name="checkout.cart.methods.paypal_express.bottom" as="testpaypal" after="testgoogle" template="paypal/express/shortcut.phtml">
<action method="setIsQuoteAllowed"><value>1</value></action>
<action method="setIsInCatalogProduct"><value>1</value></action>
<action method="setShowOrPosition"><value>before</value></action>
</block>
</reference>
But not getting in correct order.
Please help..
I have just change
<block type="paypal/express_shortcut" after="checkout.cart.methods.googlecheckout.bottom" name="checkout.cart.methods.paypal_express.bottom" template="paypal/express/shortcut.phtml">

Edit category lay-out, but apply parts to products

I've got a custom category view.phtml for this category:
http://www.touchfix.nl/onderdelen
The sub-categories use their parent's XML-update, which is:
<reference name="catalog_category_default">
<reference name="content">
<remove name="category.products" />
<block type="catalog/category_view" name="alphabase.parts" template="catalog/category/view.parts.phtml">
<block type="catalog/product_list" name="product_list" template="catalog/product/list.parts.phtml"></block>
</block>
</reference>
</reference>
<reference name="right">
<remove name="cms_waaromkiezen" />
<block type="cms/block" name="block_speerpunten_onderdelen">
<action method="setBlockId"><block_id>block_speerpunten_onderdelen</block_id></action>
</block>
</reference>
<reference name="head">
<action method="addCss"><stylesheet>css/categoryblocks.css</stylesheet></action>
</reference>
I want to achieve that the changes to "right" are also applied to products in these categories.
But when I apply these changes to products too in category settings, the "content" reference screws up my page and it returns a blank page.
How can I reference the catalog_category view, so that the "content" update is only done when in category view and not in product view?
catalog_category_default isn't a reference, it's a handle
have you tried changing to:
<catalog_category_default>
I managed to do the trick with the following:
<reference name="content">
<reference name="category.products">
<action method="setTemplate"><template>catalog/category/view.repair.phtml</template></action>
<reference name="product_list">
<action method="setTemplate"><template>catalog/product/list.repair.phtml</template></action>
</reference>
</reference>
</reference>
<reference name="right">
<remove name="cms_waaromkiezen" />
<block type="cms/block" name="block_speerpunten_reparatie">
<action method="setBlockId"><block_id>block_speerpunten_reparatie</block_id></action>
</block>
</reference>
<reference name="head">
<action method="addCss"><stylesheet>css/categoryblocks.css</stylesheet></action>
</reference>
The difference was not to delete the blocks and add new ones with the correct template, but to change the template files of the corresponding items. I can now also refer to the product view block with <reference name="product.info">, which will be my next step.

Resources