Adding magento menu to custom page - magento

I have a magento custom page which is the homepage for our site - the guy before me however for some reason did not add the main menu to this page. How would I go about doing this?

The way i work with menus in Magento is:
First, i create a custom block, from the cms menu, in that block i add the li:
<li>Home</li>
Then in your template, edit the following file: app/desing/frontend/yourtheme/default/page/html/topmenu.phtml
you will see: <?php echo $_menu ?> before it add:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('yourblockname')->toHtml() ?>
And then you will be able to manage the menu option from your admin panel in your custom block.
I hope this help.

Related

Magento remove customer review block from product view page

I am creating custom module for customer review so I need to delete the Magento customer review functionality from product view page. There is any XML code which don't show the Magento customer review on product view page.
try this code i have already used...
<catalog_product_view ranslate="label">
<remove name="product.reviews"/>
</catalog_product_view>
Go to your theme folder> template> catalog> product> open view.phtml then just find the code in this page:<?php echo $this->getReviewsSummaryHtml($_product, 'default', false)?>
Now remove the code and check. I think it solve your issue.
You do not need any xml code to remove customer review block from product view page. Go to System > Configuration > Advanced then look for Mage_Review and disable it.

How to add logout button to my page in Joomla

I am using Joomla 2.5 inbuilt User registration form. I wanted to add registration,log-in,log-out menu to my page and i got the link of registration and Log-in by selecting user manager in menu item type. But how to get Log-out link ? to add my menu Please help me .Thanks in Advance .
You can always try to do that with the standard Joomla! module for login/logout.
To make this module, go to: Module Manager => New => Select type Login.
The code below worked for me in Joomla version 2.5
Log Out
The code below will work for Joomla 3.x
Logout
This should work for you in your template index.php
<?php if(JFactory::getUser()->guest): ?>
...do something...
<?php else: ?>
...do something...
<?php endif; ?>

how to show recent view products on home page in magento

I want to how recently viewed products on home page in magento.
Currently I am using below code but this is now working. so please help!!
getLayout()->createBlock('reports/product_viewed')->setTemplate('reports/product_viewed.phtml')->toHtml(); ?>
Did you forget to echo?
<?php echo $this->getLayout()->createBlock('reports/product_viewed')->setTemplate('reports/product_viewed.phtml')->toHtml(); ?>
By the way if you're doing it from the CMS you need to use:
{{block type="reports/product_viewed" template="reports/product_viewed.phtml"}}

how to add Home menu in magento home page

How to add Home menu in magento home page. I add the code In this location
magento\app\design\frontend\default\grayscale\template\catalog\navigation
<li>
<a href="<?php echo $this->getUrl('') ?>">
<?php echo $this->__('Home'); ?>
</a>
</li>
But home menu not displayed on the home page of Magento
You have to keep the categories you want to display in menu under the root directory.
There may be more cases possible on why menu is not appearing.
Please consider following these guides :
http://www.magentocommerce.com/wiki/3_-_store_setup_and_management/catalog/enable_top_menu_navigation
http://www.atwix.com/magento/how-to-add-a-new-item-to-the-navigation-menu/
http://www.youtube.com/watch?v=w4z1RyyFHhU
Are you sure this is the template you're store is using?
You can check by enabling template hints in the developer section of the admin area.
this will hiliight all the blocks/templates for you and show the path to each file used. You will be able to check if the template you have modified is the template being used.

How to add share buttons in magento CMS pages?

I have created CMS pages in Magento and I want to share with Social site using share buttons Facebook, Twitter, Google+ so any one to tell me how to do that ?
Add this part to :
your_package/your_theme/template/page/html/head.phtml
before this line --> <?php echo $this->helper('core/js')->getTranslatorScript() ?>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "ur-c297c92f-9661-1cf3-697d-47c19ab7e281"});</script>
Add this part to your cms page :
<span class='st_facebook_hcount' displayText='Facebook'></span>
<span class='st_twitter_hcount' displayText='Tweet'></span>
<span class='st_googleplus_hcount' displayText='Google +'></span>
NOTE: using sharethis extension
You can check below URL for Addthis button, select style of button you want to share, grab the code and add that code to Magento Admin >> CMS >> Pages. click on to Html view of Editor and paste the code which you have grab from Addthis site, and you will see share buttons on front end. Another method is you can add this code to your template file commonly used for Example 1column.phtml is used for CMS pages and you need Share buttons on all CMS pages then you can paste the same code in .phtml template file.
Add this : https://www.addthis.com/get/sharing#.UK8_PoafHcc
Although this is an old thread i would like to share my answer which i found.
Add a meta tag in
template/page/html/head.phtml
<meta property="og:site_name" content="yoursite.com"/>
Create a Custom Variable from System/Custom Variables by pasting the Facebook sharing button code to Variable HTML Value.
To add like/share button to cms or static block, use the “Insert Variable” button to insert the Custom Variable you have just created.

Resources