Skip to content

Instantly share code, notes, and snippets.

@jasontipton
jasontipton / local.xml
Created November 13, 2014 20:06
Magento Local.xml NOINDEX/NOFOLLOW Catalog Search
<?xml version="1.0"?>
<layout version="0.1.0">
<!-- Search Results page -->
<catalogsearch_result_index>
<reference name="head">
<action method="setRobots"><value>NOINDEX,NOFOLLOW</value></action>
</reference>
</catalogsearch_result_index>
@jasontipton
jasontipton / price.phtml
Created November 17, 2014 01:27
Adding 'hreview-aggregate' Microformat - Magento 1.9 Community Edition
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
@jasontipton
jasontipton / local.xml
Created November 17, 2014 02:32
rel="prev/next" - Magento 1.9 Community Edition
<?xml version="1.0"?>
<layout version="0.1.0">
<!-- add rel="prev" and rel="next" for Google SEO -->
<catalog_category_default>
<reference name="head">
<block type="page/html_pager" name="relprev.next" as="rel_prev_next" template="page/html/rel_prev_next.phtml"/>
</reference>
</catalog_category_default>
@jasontipton
jasontipton / attributes.phtml
Created November 17, 2014 04:18
Adding 'hproduct' Microformat - Magento 1.9 Community Edition
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
@jasontipton
jasontipton / local.xml
Last active December 23, 2020 16:49
Reorder and Add Class to Top.Links - Magento 1.9 Community Edition
<?xml version="1.0"?>
<!--
[Your site name] XML overrides
-->
<layout version="0.1.0">
<!-- updating top.links to add class names -->
<!-- Section 1: Removing Current Links -->
<default>
<reference name="top.links">
<!-- Removes 'My Account' link -->
@jasontipton
jasontipton / links.phtml
Created January 22, 2015 17:19
Magento CE 1.9 top.links active class
@jasontipton
jasontipton / phone.phtml
Created February 8, 2015 17:30
HTML Phone Link in Magento
<a href="tel:<?php echo preg_replace('/[^0-9]/','',$storePhone = Mage::getStoreConfig('general/store_information/phone')); ?>"><?php echo $storePhone = Mage::getStoreConfig('general/store_information/phone'); ?></a>