Skip to content

Instantly share code, notes, and snippets.

View tonyoconnell's full-sized avatar

Tony O'Connell tonyoconnell

View GitHub Profile
@tonyoconnell
tonyoconnell / gist:2011725
Created March 10, 2012 15:14
Get Skin URL
<img class="cards" src="<?php echo $this->getSkinUrl('images/logo-credit-cards.png'); ?>"/>
@tonyoconnell
tonyoconnell / gist:2013665
Created March 10, 2012 22:30
Featured Products Block
{{block type="catalog/product_list" column_count="5" category_id="2" template="catalog/product/listhome.phtml"}}
@tonyoconnell
tonyoconnell / gist:2022960
Created March 12, 2012 15:59
Add This Pinterest
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
@tonyoconnell
tonyoconnell / gist:2023032
Created March 12, 2012 16:10
Google Plus
<div class="social-top">
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone align="right"></g:plusone>
</div>
<div class="header-top">
<div class="top-left">
<div class="language">
<?php echo $this->getChildHtml('store_language') ?>
</div>
</div>
{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
@tonyoconnell
tonyoconnell / gist:2351252
Created April 10, 2012 13:11
Reset File Permissions Magento
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 550 mage
@tonyoconnell
tonyoconnell / gist:2351492
Last active August 21, 2023 17:35
Install Magento 1.8 With Sample Data By SSH
mkdir demo
cd demo
wget http://www.magentocommerce.com/downloads/assets/1.8.1.0/magento-1.8.1.0.tar.gz
wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz
tar -zxvf magento-1.8.1.0.tar.gz
tar -zxvf magento-sample-data-1.6.1.0.tar.gz
mv magento-sample-data-1.6.1.0/media/* magento/media/
mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql magento/data.sql
mv magento/* magento/.htaccess .
chmod o+w var var/.htaccess app/etc
@tonyoconnell
tonyoconnell / gist:3337622
Created August 13, 2012 07:04
Set number of columns in product listing
<reference name="product_list">
<action method="setColumnCount"><columns>5</columns></action>
</reference>
@tonyoconnell
tonyoconnell / gist:3337662
Created August 13, 2012 07:12
Featured carosel
<p class="featured-social">{{block type="catalog/product_list" category_id="49" template="catalog/product/featured.phtml"}}</p>