WooCommerce reviews + tutorials

Create an Overrideable WooCommerce Template File

Sometimes when developing a WooCommerce plugin you want to output a snippet of HTML, and do so in such a way that the content can be easily overridden by a theme. It’s part of the process of crafting a well-engineered, customizable plugin. The best way to achieve this is by using WooCommerce’s own templating mechanism, and what once took some effort and some filters is now a snap thanks to one of the recent WooCommerce…

Read More

WooCommerce reviews + tutorials

How to Determine the WooCommerce Current Page

WooCommerce makes it a snap to programmatically determine the current page through the use of their Conditional Tags. These functions can be used to check whether the current page is the shop page: is_shop(), or a product page: is_product(). See WooCommerce Conditional for the full list. These functions are based on the standard WordPress Conditional Tags, and thus behave in the same manner. Meaning that if you try to determine your current page from within…

Read More

WooCommerce reviews + tutorials

Add ‘Sold Out’ to WooCommerce Variable Product Dropdown

Note: Due to a change in WooCommerce 2.0 the following code no longer works, and I’m not seeing any way of making it compatible again – Justin This is a quick little ‘how to’ that came up in a recent client WooCommerce request. The client wanted to add the text ‘sold out’ to the variable product configuration dropdowns on the product page to make it more clear to customers when a variation was out of…

Read More

WooCommerce reviews + tutorials

WooCommerce Sample Data

A sometimes overlooked, but useful feature of WooCommerce 1.5.3 is the included dummy data file, which can be imported to create a number of products, and even attaches product images! This is useful when setting up test/development environments and you want a range of products available without having to manually create them. Step 1 – Locate the Dummy Data File The sample data file is included with the woocommerce plugin. To verify you do indeed…

Read More

WooCommerce reviews + tutorials

Theming WooCommerce: How to Override WooCommerce Template Files

To override WooCommerce template files in your theme (or better yet, child theme) simply make a folder named ‘woocommerce’ within your theme directory, and then create the folders/template file you wish to override within it. Example As an example, lets override the price template for the single product page to add a notice. First we locate the template file in question at: woocommerce/templates/single-product/price.php (see the full list of templates). Next, copy price.php to the following…

Read More

WooCommerce vs. Jigoshop

If you’re considering ECommerce options in general, and especially WordPress ECommerce in particular, you may find yourself asking whether WooCommerce or Jigoshop is the best fit for your online storefront. Maybe these are the only two ECommerce solutions you’re considering, and just maybe you’re not even interested in reading a lengthy article comparing and contrasting and delving into the minutia of what are still two very similar options. If you’re merely looking for an anonymous…

Read More