Magento Duplicate Orders MySQL Search

A handy MySQL query to check a Magento DB for potential duplicate orders!

SELECT `quote_id`,
	COUNT(`quote_id`) AS `qty_duplicates`,
	`increment_id` AS `first_increment_id`,
	GROUP_CONCAT( `increment_id` SEPARATOR ' | ' ) AS `increment_ids`,
	`created_at`,
	`state`,
	`status`,
	`customer_firstname`,
	`customer_lastname`,
	`customer_email`,
	`grand_total`
FROM `sales_flat_order`
GROUP BY `quote_id`
HAVING COUNT(`quote_id`) > 1
ORDER BY `created_at` ASC

Need a category index page?

Why not just use a normal page?

Oh, sure, you want a dynamically loading list of the categories.

Try this on for size:


add_shortcode( 'taxonomy-list', 'my_taxonomy_list' );
function my_taxonomy_list( $atts ) {
    $args = shortcode_atts( array(
        'taxonomy' => 'category',
        'title_li' => '',
        'depth' => 1,
        'hide_empty' => 1,
    ), $atts );

    ob_start();
    ?>
        <ul class="taxonomy-list taxonomy-<?php echo $args['taxonomy']; ?>-list" data-taxonomy="<?php echo $args['taxonomy']; ?>">
            <?php wp_list_categories( $args ); ?>
        </ul>
    <?php
    return ob_get_clean();
}

CSS3 Snow!

So I got a bit irked the other day when looking to sort out what sort of method I’d like to use for putting snow on a website.  All the options just looked bad.  Some were using images (which I’d prefer to avoid) — others were using crazy javascript hijinks.  I figured there’d have to be a simpler way.

So I wrote one.  It’s not perfect, and it’s not quite a ‘drop-in’ (read: you’ll need to test it before pushing it live.  Tweak the speed, height, etc to your heart’s content).  It was originally written to only put snow in the header of the site — not over the whole page.

http://dl.dropbox.com/u/5581009/snow.html

Enjoy!  Any questions about implementation are welcome!