Here’s a quick snippet you can simply copy/paste to show a “+” and a “-” on each side of the quantity number input on the WooCommerce single product page.
This snippet comes with a jQuery script as well, as we need to detect whether the plus or minus are clicked and consequently update the quantity input. jQuery might look difficult to many, but the beauty of this is that you don’t need to have a degree in jQuery – just copy/paste and see the magic happen.
Note: you will probably also require some additional CSS, as your theme might give a “float” to the quantity DIV while by default HTML buttons take inline-block. I’ve added some CSS valid for the Storefront theme below. Continue reading WooCommerce: Add Plus & Minus Buttons To Add to Cart Quantity Input
We already have a nice “SALE” badge by default with WooCommerce (as well as the “OUT OF STOCK”) one. These show on the shop page once certain conditions are met.
Now, what if we wanted to show a “NEW” badge for products added in the last 30 days? This would certainly grab the customer attention, and also communicate the fact your shop is constantly updating with new products and content (well, good for Google too, right?).
So, how do they do it? (Sounds like one of those Discovery Channel shows…)
Well, here’s a simple snippet for you; simply copy/paste into your functions.php and magically a “NEW” badge will show (note: CSS is not provided, you’ll need to adjust it based on your current theme and custom styles). Continue reading WooCommerce: Display “NEW” Badge on Recent Products
If you’re familiar with the upcoming Gutenberg editor, you’ll know there have been a million doubts in regard to accessibility. So, accessibility matters – and WooCommerce has a few issues as well.
One interesting accessibility fix is the error notification system on the checkout page. Yes, the missing fields error show on top of the page when trying to place an order, but once you scroll down to fill them out again you might need a reminder of which field is missing without having to scroll back up to check the error.
This is quite difficult to explain, so take a look at the screenshot. The suggestion here is to also add “inline” error notifications (“XYZ is a required field“) right above each field, so that the user knows exactly what to do. So, let’s see how it’s done. Continue reading WooCommerce: Display Required Field Errors “Inline” @ Checkout
A BloomerArmada fan asked me a very interesting question: how can I link each product in the shop page to its own custom landing page as opposed to the default permalink?
Of course this applies when you don’t want to use the default single product page for all or some products. Clearly, you could set up a 301 redirect from the single product page to the landing page – that will help for SEO as well. But if this is temporary, or you need to still give access to the single product page later on, then a redirect is no good.
So, here’s how you can override the default permalink. Continue reading WooCommerce: Change Product Permalinks @ Shop / Loop Pages
Coupons: the good, the bad and the ugly. WooCommerce coupon codes are great to convert more sales – but sometimes they get users to pause / stop placing the order until they find a coupon code online (you did it too, I know).
One good workaround that the internet giants such as Amazon and eBay have implemented is to hide the coupon form until an email is entered, or alternatively to move the coupon code to the bottom of the Cart page. This is a very smart move, and gets the user to concentrate on the Cart / Checkout details before entering or searching for a coupon.
So the question is – how to move the coupon code form in the Cart page and remove it from the Checkout page? Well, as usual, a bit of PHP can help us. Here’s how it’s done! Continue reading WooCommerce: Move / Remove Coupon Form @ Cart & Checkout
The “woocommerce_thankyou” hook fires on the Thank You page once an order is placed. Most tracking functions like Google Analytics, affiliate commission plugins and other WooCommerce extensions rely on “woocommerce_thankyou” to run their code.
Problem is – “woocommerce_thankyou” is ALSO called if an order fails (i.e. payment did not go through). Now, unless the plugin is smart enough in its own functions to exclude failed orders, which doesn’t happen often I’m afraid, we need to find a way NOT to run “woocommerce_thankyou” if an order fails. Case study: a client uses a third party affiliate plugin, this plugin hooks into “woocommerce_thankyou“, but they don’t want to calculate conversions when an order fails.
So here you go! Continue reading WooCommerce: Disable Tracking if Order Failed @ Thank You Page
We’ve already seen how to remove the product permalink from the “order table” (the one you see on the Thank you page, My account pages and emails). Thsi time, we’re looking at doing the same thing on the Cart page, which uses different “hooks” than the order pages and therefore requires its own snippet.
Here’s how it’s done – as usual 1 PHP line is sufficient! Continue reading WooCommerce: Remove Cart Product Link @ Cart Page
When you add a hidden product to Cart, either manually or programmatically, this will be displayed in the Cart, Checkout and Order details pages (I’m not sure why a hidden product behaves like that… but thankfully you can hide hidden products from the Cart/Checkout/Order page with this snippet).
Problem is, even if you hide hidden products from the Cart page, the “Mini-Cart” product counter icon or text (it depends on your theme) will still count them as products (see the screenshot below). So the question is: in conjunction with the snippet aforementioned, how do I exclude hidden products from being counted in the “menu cart” (also called Mini-Cart Widget)? Continue reading WooCommerce: Exclude Hidden Products from Mini-Cart Counter
Storefront theme adds a “Home” H1 title to the homepage by default, no matter if you use the “Default” or the “Homepage” static page template.
Of course, you could do it via CSS, with a simple “display:none”. Even better, you could completely avoid loading the “Home” title by using PHP (SEOs out there: better not to load an H1 than hiding it via CSS, right?).
So, how do they do it (I mean how to hide the Storefront “Home” title)? Here’s the quick fix! Continue reading WooCommerce + Storefront: Hide “Home” Title @ Homepage
If you don’t use an “Image Lazy Load” plugin, it’s time you install one. And if you happen to pick Jetpack’s free Lazy Load module, you probably did the right thing.
However, since I installed Jetpack Lazy Load, I noticed a little “jump” in my Storefront theme header section, where in fact there is an image – my Business Bloomer logo. The same might apply to any WooCommerce image: a category thumbnail, a single product featured image, a cart icon in the header, a homepage hero image, and so on.
Thankfully Jetpack has a useful “filter” you can tap into in order to exclude image classes from lazy loading (yes, I found this out today, it’s not that I know everything!). So, here’s the fix. Enjoy 🙂 Continue reading WooCommerce + Jetpack: Exclude Image From “Lazy Load”
We’ve already seen how to add a custom “Product Sorting” option to the “Default Sorting” dropdown in the Shop page.
The task I was presented with, however, was to display items based on a custom “meta key”. Now, if you have no idea what a “meta key” is, don’t worry too much. For example, “stock status” is one of these keys, and therefore you can sort products by that.
Anyway, let’s abandon the Japanese for now (hey, unless you speak Japanese!) and get into the coding – as usual, simply copy/paste this little plugin in your functions.php and you’ll get the wanted result 🙂 Continue reading WooCommerce: Show In Stock Products First @ Shop
This is a great WooCommerce snippet (or plugin, if you wish to call it like that) for those who want to provide another layer of checkout fees. For example, you might need to display custom checkout radio buttons to pick packaging types, gift wrapping, specific services and whatever can increase your AOV (Average Order Value). Radio button selection must work with “Ajax” – which means as soon as the radio button is chosen, checkout must refresh in order to display the updated fees and totals.
Something similar (and also more complex, such as offering store products) is achieved by the WooCommerce Checkout Add-Ons Plugin sold on the official WooCommerce.com marketplace. But in this article, we take a look at custom coding – either way you’ve got something to play with! Continue reading WooCommerce: Add Checkout Fees Based on Radio Button Choice (Ajax)
Maybe this is the right time to update your clothing WooCommerce store and give a more professional look to your fashion business…
Maybe you also want to build custom pages without getting into coding, as default WooCommerce is too “boring”…
Still think your online project requires a fresh hand?
Well, if that’s the case, feel free to keep reading and view my favorite 15 WooCommerce clothing themes. Continue reading 10 Best Fashion & Clothing WooCommerce Themes
The WooCommerce product short description is that piece of content that appears on the right hand side of the featured image above the add to cart button. This is, of course, unless you forgot to enter the short description under Product > Edit Product!
But in case you forgot to enter it, or alternatively want to display a global short description, here’s a quick PHP snippet for you. Enjoy! Continue reading WooCommerce: Show Custom Short Description When Empty
The WooCommerce Orders Table, which can be found under WP Dashboard > WooCommerce > Orders, provides us with 7 default columns: Order – Date – Status – Billing – Ship to – Total – Actions. This is used by shop managers to have an overview of all orders, before eventually clicking on a specific one.
So the question is: how can we display additional columns to that same orders table, so that we can immediately visualize an order custom field, a specific product contained in the order, or anything order-related that can be “calculated” once we have access to the $order variable? Continue reading WooCommerce: Add Column to Orders Table @ WP Dashboard
If you sell downloadable/virtual products and need to simplify your WooCommerce checkout when such product type is in the Cart, you’ve come to the right place!
Here’s a simple snippet to check if there are only “virtual” products in the Cart and if yes, all the billing fields and order notes are hidden (but name and email address). Go test this on your development environment and let me know if this works! Continue reading WooCommerce: Hide Checkout Billing Fields if Virtual Product @ Cart
If you go to WordPress Dashboard > Products you will find default product admin filters such as “Select a category”, “Filter by product type”, “Filter by stock status”. What if you want to add more custom filters to let your shop managers find products easily?
For example, you could add “Filter by product tag” (“product tags” are one of the two default WooCommerce “taxonomies” together with “product categories”). Or, if you use custom taxonomies such as product brands, you could add a “Filter by product brand” dropdown.
Thankfully this is super easy – and here comes the proof 🙂 Continue reading WooCommerce: Display Custom Filters @ WP Dashboard > Products
All WooCommerce orders go to either “processing”, “completed”, “on-hold” and other default order statuses based on the payment method and product type.
Sometimes these statuses are not enough. For example, you might need to mark certain orders in a different way for tracking, filtering, exporting purposes. Or you might want to disable default emails by bypassing the default order status changes.
Either way, setting a custom order status automatically once the order is processed is quite easy. And today we’ll see which PHP snippets you need in order to make this work! Continue reading WooCommerce: Set Custom Order Status for New Orders
This is a guest post by Simon Tomkins of CommerceGurus – if you like the article, make sure to thank him in the comments!
The speed of your WooCommerce store is incredibly important when it comes to converting visitors into customers. Research has shown that even a one second delay can result in 7% of lost orders.
If your WooCommerce site is making $1,000 per day, that one second delay in load time could potentially cost you $25,000 in annual lost sales – not small change! If you are the lucky owner of Amazon, a one second delay in 2017 could have meant a $178 billions * 0,07 = $12.5 billions loss in net revenue…
Once again, a slow WooCommerce website is costing you money.
I spent a great deal of time researching website speed and performance optimization before creating our Shoptimizer WooCommerce theme. Some of the statistics are staggering:
- 73% of mobile users have abandoned a site due to it taking too long
- 47% of people expect a site to load in 2 seconds or less
- 79% of people who encounter a performance issue won’t return again to buy
So, a slow WooCommerce site means unhappy visitors and the loss of potential revenue to competitors.
And today we’ll briefly see what you can do to speed up your WooCommerce website – these are proven performance optimization tricks that can have an immediate impact on your sales conversion rate 🙂 Continue reading How to Improve the Speed of my WooCommerce Store?
The most efficient way to turn your restaurant / food business into a money-making machine is to cater to your customer’s needs better than you do now. Supposing you have a modern interior design, tasty food, friendly atmosphere, professional personnel, etc… what else can you do for your business?
You need a bombastic online presence. You need to – maybe – rebuild your restaurant website. Thankfully, if you don’t know much about web design, it’s not a big deal. No need to do anything from scratch nowadays (we entrepreneurs value our time and effort, right?).
If you want to enable online food ordering, sell restaurant gift cards, turn your takeaway into an optimized online booking system, or give online users the freedom to build their custom pizza, it’s time to switch to a WooCommerce theme.
By picking one of the 15 themes described in this article (oh, by the way – here’s the full list of 50+ restaurant WooCommerce themes you can pick), you can immediately take advantage of the most popular ecommerce plugin (WooCommerce) and its free or premium extensions to increase your food business sales and profitability. Continue reading 15 Best Food & Restaurant WooCommerce Themes