Skip to content

Instantly share code, notes, and snippets.

@jasontipton
jasontipton / phone.phtml
Created Feb 8, 2015
HTML Phone Link in Magento
View phone.phtml
<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>
@jasontipton
jasontipton / links.phtml
Created Jan 22, 2015
Magento CE 1.9 top.links active class
View links.phtml
@jasontipton
jasontipton / local.xml
Last active Dec 23, 2020
Reorder and Add Class to Top.Links - Magento 1.9 Community Edition
View local.xml
<?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 / attributes.phtml
Created Nov 17, 2014
Adding 'hproduct' Microformat - Magento 1.9 Community Edition
View attributes.phtml
<?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 Nov 17, 2014
rel="prev/next" - Magento 1.9 Community Edition
View local.xml
<?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 / price.phtml
Created Nov 17, 2014
Adding 'hreview-aggregate' Microformat - Magento 1.9 Community Edition
View price.phtml
<?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 Nov 13, 2014
Magento Local.xml NOINDEX/NOFOLLOW Catalog Search
View local.xml
<?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>