A client asked to show a “Product Inquiry” button on the Single Product Page which would display, upon click, a Contact Form with an automatically populated subject (Contact Form 7 plugin must be installed of course). Here’s how I did it! Continue reading WooCommerce: Product Enquiry Form @ Single Product Page (CF7)
A #CustomizeWoo student reached out for premium support in regard to “WooCommerce taxonomies”. The question was: How do I change the label “tag” into something else, for example “brand”? Well, this is how it’s done!
Please note that this does not change the “tag” permalinks (URL, slug, etc), but only the “Tags” label on the frontend, and only on the Single Product Page. Continue reading WooCommerce: Rename “Tags” Label @ Single Product Page
A Business Bloomer fan asked me an interesting question this week: how to apply CSS on the single product page based on the product category? Well, the answer is pretty simple: if we’re able to add the category name to the HTML “body”, this can then be targeted in your custom CSS. So, let’s see how this is done!Continue reading WooCommerce: Category as “Body” Class @ Single Product Page
A very nice client 🙂 had a very nice challenge the other day, so I thought of “donating” this valuable snippet to all of you!
Here’s what I came up with – enjoy! Continue reading WooCommerce: Add Next/Previous @ Single Product Page
Today’s challenge has been on the top of my to-write list for a while. And thanks to one of Business Bloomer’s subscribers, I finally decided to post a quick tutorial. Here’s how to align the “Product Gallery” thumbnails to the side of the main Single Product Page image, no matter the device. Continue reading WooCommerce: Display Product Gallery Vertically (Single Product Page)
Hello WooCommerce Customizers! Today we take a look at the WooCommerce Single Product Page and specifically at how to display the product/post published date. It might be useful to users in case you need to show how “new” a product is, or if you have specific needs. Enjoy 🙂 Continue reading WooCommerce: Show Published Date @ Single Product
Unless your theme is overriding the WooCommerce sidebar, removing this from the single product page is quite easy! Continue reading WooCommerce: Remove Sidebar @ Single Product Page
Here’s a visual HTML hook guide for the WooCommerce Single Product Page. This is part of my “Visual Hook Guide Series“, through which you can find WooCommerce hooks quickly and easily by seeing their actual locations (and you can copy/paste). If you like this guide and it’s helpful to you, let me know in the comments!
Now that you know the Single Product Page hooks, all you need to do in your functions.php is “add_action(‘place-hook-here’,’your-PHP-function-here’);” and you can place your custom functions exactly where you like them to show! Need a video tutorial? Watch it now → Continue reading WooCommerce Visual Hook Guide: Single Product Page
I’ve seen many snippets that change the “In Stock” text on the single product page, but not the FULL string. In this particular case, not only I needed to change the text, but also edit the order of display: from “2 In stock” to “Quantity: 2”.Continue reading WooCommerce: Edit “# in stock” @ Single Product Page
A client of mine decided to add a little notice (“30-day return policy offered”) just above the Add to Cart button on the WooCommerce single product page. There is no need to say this will allow her to increase the click-through rate and her sales conversion rate. Continue reading WooCommerce: Display Content Above Add to Cart @ Single Product Page
JetPack sharing (and other social media sharing plugins) allow you to add social media sharing to your woocommerce products. However, the sharing buttons will only show at the bottom of the “Long description”.
How to move that up a bit, say between the short description and the product tabs? Simply add this function to your functions.php file editor: Continue reading WooCommerce: Move Social Sharing @ Single Product Page
The “Additional Information” tab on the single product page is somewhat annoying and, honestly, quite useless.
There are 2 simple methods to “hide” it or delete it completely: a CSS and a PHP solution. In the first case, you can input the code in your style.css; in the second case use your child theme’s functions.php.
However, Always remember that PHP is better than CSS: with CSS you load the element and then hide it, while with PHP you stop the element from loading. Clearly, PHP is a better way to do it!Continue reading WooCommerce: Remove Additional Information Tab @ Single Product
WooCommerce product reviews shows by default in the “Reviews” tab in the single product page. But what if, like me, you’re using custom sales pages and need to show such reviews elsewhere – by using a shortcode?
I’ve spent some time doing this for two Business Bloomer pages, the contact page (beside the request a quote form) and the Bloomer Armada sales page (just above the pricing table), so I thought it would have been great sharing the snippet with you. Enjoy!Continue reading WooCommerce: Display Product Reviews @ Custom Page (Shortcode)
We already studied how to set min/max WooCommerce add to cart quantity programmatically. That was an easy one. This time, I want to expand on the topic, and define a “minimum order amount on a per-product basis”.
Which, translated in plain English, would be something along the lines of “set the minimum purchase amount for product XYZ to $50”. And once we do that, I expect that the add to cart quantity does non start from 1 – instead it defaults to “$50 divided by product price”. If product price is $10, I would want to set the minimum add to cart quantity to “5” on the single product and cart pages.
Makes sense? Great – here’s how it’s done.Continue reading WooCommerce: Set Min Purchase Amount for Specific Product
We’ve already seen how to open the External Product “Buy Product” button in a new browser tab – and now it’s time to complete the full picture for External/Affiliate WooCommerce Products: how do we also link the “featured” image to the same external URL?Continue reading WooCommerce: Edit External Product Image URL
A nice way to avoid user frustration is to never let them pick a product / variation that is out of stock, only to realize later they can’t purchase it.
A variable product comes with a “select dropdown” on the single product page, from which customers can pick their favorite variation. Problem is that ONLY after selecting this they will find out about price, stock status and may be able to add to cart.
Today, we’ll completely disable (grey-out) those select dropdown options (variations) that are out of stock, so that users don’t waste time and only pick one of those that are in stock. Enjoy!Continue reading WooCommerce: Disable Out of Stock Variations @ Variable Product Dropdown
The default WooCommerce Dashboard Products page (/wp-admin/edit.php?post_type=product page) shows the list of products in a table. Default fields are: Image, SKU, Stock, Price, Categories, Tags, Featured and Date.
Sometimes, these columns are not enough and you need more. For example, you might want to quickly take a look at a product custom field, such as “visibility” (whether the product is hidden or not).Continue reading WooCommerce: Additional Products Table Column @ Admin
WooCommerce picks related products on the Single Product Page based on product categories and/or product tags. Related products are very important to the shopping experience, and sometimes this is not enough – what if you want to automatically show certain products based on different criteria?
So, here’s a quick snippet to e.g. get related products with the same product title of the current one. A very strange example, but you can use this as reference in case you want to get products based on different criteria.
The get_posts() function, in fact, can be customized to get products with a given stock, specific price range, same custom field value, search term, and so on.Continue reading WooCommerce: Custom Related Products
We already talked about displaying the total number of sales for a given product ID, however what if you just want to calculate sales in the last week?
This is a much better option when you have a busy WooCommerce shop and want to increase your sales conversion rate.
So, here’s the snippet – paste to your functions.php and enjoy!Continue reading WooCommerce: Count Product Recent Sales
Let’s say you’re developing a custom sales page or a landing page. A great way to increase your conversion rate is by showing the number of purchases close to the “add to cart” button.
We’ve already seen how to do this on the single product page, but what if you need to show this on a custom page, and therefore you need a shortcode?
Well, this is super easy and I’m currently using the snippet below on my own website, and specifically in the pricing table of my #CustomizeWoo online course sales page. So, here you go – enjoy!Continue reading WooCommerce: Calculate Sales by Product ID (Shortcode)