Hide Certain WooCommerce Sub-Categories in Catalog

WooCommerce provides some coarse control over displaying sub categories in your shop/category pages with the “Show subcategories on category pages” and “Show subcategories on the shop page” options on the WooCommerce > Settings > Catalog > Catalog Options section. These controls are all-or-nothing though: show all subcategories on the category pages, or show all subcategories on the shop page. If you want finer-grained control, for instance displaying only certain subcategories on the shop or particular…

Read More

WP Development

Debugging WordPress

The following are some techniques I use nearly every day for debugging WordPress and WooCommerce, and can be used for plugin or theme development equally. Echoing or printing to the screen will only get you so far when debugging, especially in a complex framework like WordPress; to really understand the code flow, and to trace and fix issues, you need to be able to log messages to a file. For this WordPress makes use of…

Read More

GitHub Repository Not Found Workaround

Today I encountered an issue with GitHub where I was unable to fetch a remote repository to merge into my local clone. Everything seemed to be configured correctly, and I am able to fetch repositories from the same user without a problem, so it seems like there is some issue with this particular repository. Although I have a support ticket open with GitHub to try and determine the root cause of the issue, for now…

Read More

How to Upgrade Magento

I’ve been meaning to write an article on safely upgrading Magento for some time now, and with the release of Magento CE version 1.7.0 yesterday, April 24, 2011, now seems like a great time. These steps and commands are the actual ones I follow to upgrade client Magento sites, and I perform these core upgrades from the command line only. Please read through and understand all the steps before starting to follow them. Backup –…

Read More

Import Remote Repository with EGit on Windows

Honestly sometimes I’m not sure why I continue to persist in using Eclipse as my editor of choice for most projects. Maybe it’s that I’ve been using it for so long now (7 years) and it’s gone the distance for me, though as with any long term relationship there are fights. Today was one of those fights, as I attempted to import a remote Git repository and create a project for it on a Windows…

Read More

Configure Magento Products by URL

Being able to link to a configurable product page with particular product options configured is clearly a valuable feature to have in an ecommerce platform. Both to satisfy one of the primary goals of ecommerce: reducing friction in the sales process (by having a product configured and ready for purchase for a visitor), and to meet requirements of services like Google Checkout by providing unique URLs to pre-configured products, are among the many reasons. Happily…

Read More

Date Range Picker Similar to Google Analytics

I’ve always loved the calendar date range selector in Google Analytics, it’s extremely user-friendly for the task of selecting a range of dates; much more so than the typical dual input boxes with independent calendars. There are a few options out there for replicating the Google Analytics range picker, however I couldn’t seem to find any that offered the functionality, looks, and ease of use right out of the box. The closest I could find…

Read More

How to Exclude Traffic From Google Analytics in Magento

The Problem There are two typical ways of stopping your internal requests from appearing in and skewing your Google Analytics metrics. Both are outlined in this article from Google, but they boil down to two options: Filter by IP Filter by cookie Both are ok choices, but the first becomes unmanageable without a static IP, and doesn’t fit the laptop-based mobile development style that I prefer; and the second relies upon your ability to set…

Read More