Skip to content

Instantly share code, notes, and snippets.

<?php
/*
If your products have been deleted but not your media gallery images you
can use the following SQL statement to remove these dormant records.
Please make sure you backup your installation and database before running this
SQL statement. It has been used on Mage 1.8.1 system:
@millejano
millejano / gist:3149637
Created July 20, 2012 08:33
Magento: show only simple products for Report Products Ordered (Mage_Reports_Model_Resource_Product_Sold_Collection)
/**
* Add ordered qty', but only simple products
*
* @param string $from
* @param string $to
* @return Mage_Reports_Model_Resource_Product_Collection
*/
public function addOrderedQty($from = '', $to = '')
{
$adapter = $this->getConnection();
@speedupmate
speedupmate / gist:2005826
Created March 9, 2012 09:26
mod_rewrite mobile users to regular checkout
RewriteCond %{HTTP_USER_AGENT} ^.*(iPhone|iPod|BlackBerry|Palm|Googlebot\-Mobile|Mobile|mobile|mobi|Windows\ Mobile|Safari\ Mobile|Android|Opera\ Mini).*$ [NC]
RewriteCond %{REQUEST_URI} ^.*(onestepcheckout)
RewriteRule .* /checkout/onepage/ [R,L]
@oodavid
oodavid / README.md
Last active March 11, 2025 21:41 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@redoPop
redoPop / .gitignore
Created June 18, 2010 22:08
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your