How to show My Cart link at top links - magento

I installed a template, and there is no My Cart link at top link.
This in checkout.xml:
<reference name="top.links">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCartLink"></action>
<action method="addCheckoutLink"></action>
</block>
</reference>
I want to show it with item quantity ex: My Cart(1)
Please help me!
Best regards,

One way you can do this is within the template file add this code:
$count = $this->helper('checkout/cart')->getSummaryCount();
This will display the number of items in the cart. If you copy the template and layout files into your theme you should be able to add this in and get it working.

Related

How do I add links to the top menu in Magento?

I want to modify the top level menu using code. I want it to a show list of pages in top level. How is it possible?
You can modify this file '\app\design\frontend\yourtheme\template\page\html\topmenu.phtml' and add custom code there to show list of pages.
`<reference name="top.links">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCartLink"></action>
<action method="addCheckoutLink"></action>
</block>
</reference>

Magento: how to add a static block AFTER product list

In a web site my boss wants me to insert a static block AFTER the product list of that category. Up to now, using the Magento front end application, the one you can see here, I have seen that I can add a static block only before the product list. How can I do to put the block after the product list for each category?
For example this is a page of the site I am working on and I would like to display the block at the bottom of the page, after the product list but before the footer links.
I think I should change some files (like page.xml or local.xml) ma I don't know how and I haven't found anything useful in the net. Can you help?
In your local.xml add the following, replacing cms_extra with the identifier of your CMS block.
<!-- Catalog Category (Anchor) -->
<catalog_category_layered>
<reference name="content">
<block type="cms/block" name="cms_extra" after="category.products">
<action method="setBlockId"><block_id>cms_extra</block_id></action>
</block>
</reference>
</catalog_category_layered>
<!-- Catalog Category (Non-Anchor) -->
<catalog_category_default>
<reference name="content">
<block type="cms/block" name="cms_extra" after="category.products">
<action method="setBlockId"><block_id>cms_extra</block_id></action>
</block>
</reference>
</catalog_category_default>
Alternatively if it needs to be a different CMS block on each category, add the following near the bottom of your catalog/product/list.phtml..
<?php
$catcode = Mage::registry('current_category')->getId();
echo $this->getLayout()->createBlock('cms/block')->setBlockId('category_block_' . $catcode .'')->toHtml();
?>
Create each category's CMS block with identifier of category_block_categoryid

magento add column after product tab in product view page

I am creating a custom module and want to add another tab after product description tab in product detail page. Below is my xml code for execute:
<catalog_product_view>
<reference name="product.description">
<block type="testimonial/monblock" name="stockas">
<action method="setTemplate">
<template>testimonial/viewMore.phtml</template>
</action>
</block>
</reference>
</catalog_product_view>
But it shows under price column. I want to show it under product details tab.
Any one please help me.
Just add this code after Description block in catalog.xml files
<block type="testimonial/monblock" name="stockas">
<action method="setTemplate">
<template>testimonial/viewMore.phtml</template>
</action>
</block>
you can add in the above way for any number of tabs needed hope this helps.

agreements are empty with germansetup in Magento

From my /checkout/onepage/ there is a popup window for the AGB: /germansetup/frontend/agreements/id/1/
Problem is that this page does not show any text. Just a background image from the template.
The popup is defined in germansetup.xml:
<germansetup_frontend_agreements>
<reference name="root">
<action method="setTemplate"><template>page/popup.phtml</template></action>
</reference>
<reference name="content">
<block type="core/text" name="agreement" />
</reference>
</germansetup_frontend_agreements>
I don't know what block he is trying to load here but I would like him to show my static block mrg_business_terms.
This appears to have changed at some point. For me (using Magento 1.9.2.4), what worked was adding 'cms/block' to the list of whitelisted blocks.
Have a look at Sales > Terms and Conditions (German: Verkäufe > Bestellbedingungen).
Here you see the list of checkout agreements. In my case I needed to change the content block id:
{{block type="cms/block" block_id="mrg_business_terms"}}

Magento - add a custom left that appear with the products only

I need to add a custom left to appear on the products pages only.
I hope if you can help
if you want them to appear on the listing page then you have to add your block here :
<catalog_category_layered translate="label">
<label>Catalog Category (Anchor)</label>
<reference name="left">
......Add your block here ..............
</reference>
but if you want it to appear on detail page too then
<catalog_product_view translate="label">
<reference name="left">
......Add your block here ..............
</reference>
You can find both these above in catalog.xml but just in case you use other than default them then you have to do it in local.xml.
Don't forget to vote up or click the answer (tick) on left If this helps you.

Resources