Nicola Mustone

Happiness Lead @ Automattic



Create a Dynamic Pricing Discount Table on the Product Page

The WooCommerce Dynamic Pricing extension does not print a discount table on the single product page. This is due to the complexity of the discount rules you can create, which makes it impossible for the plugin to create a discount table.

But you can still do it manually. Learn this in this article using Dynamic Pricing and the WordPress block and site editors.

Tools Required

  • Dynamic Pricing – This premium extension allows you to create simple and advanced discount setups.
  • WordPress Synced Blocks – This is included in WordPress to create blocks that can be reused and synced in your site.

Step 1. Creating the Discount Table

After installing and activating Dynamic Pricing and WooCommerce Custom Product Tabs Lite, create a discount rule for some products. In this example I’ll do it only on one product. I configured it as such:

A screenshot of the Dynamic Pricing table on a single product showcasing a discount rule based on product quantity with progressively incremental discounts.

Step 2. Creating a Discount Table Block

Edit any page or post and create the table in the content. Once you are done creating the table block, click on the 3 dots as shown in the screenshot below and select Create Pattern.

The WordPress content editor showing how to create a pattern

This will create a block that can be reused anywhere. If you edit the block anywhere on the site, it will change everywhere it is used.

Step 3. Use the Block in Your Site

You can now open Appearance > Site Editor and use this block in the Single Product Template. You can also use it on any page or post if you need to.

If you have a plugin that allows you to edit the product description via blocks or when WooCommerce finally adds this feature, you should be able to use it there as well.


Subscribe to This Blog

Receive new articles from this blog directly in your inbox! No spam guaranteed!

Join 669 other subscribers

12 responses to “Create a Dynamic Pricing Discount Table on the Product Page”

  1. Hi Nicola. Thanks for this very useful post. It’ll be perfect for an commerce site I’m building that supports both Wholesale and Retail customers. I have a question though… suppose I want show or hide these elements based on user type? How can I hide them from retail customers and make them visible to wholesale customers?

    1. Hi David, thanks for reading!

      You can use Groups with its shortcodes. It allows you to hide/show contents based on the user role/group.

  2. So this discount table is hard-coded, which is NOT sync with the real pricing, right? How can I do it to make it change automatically on the front-end after I change the real pricing in the back-end?

    1. Hi John,
      Yes, it is hard-coded. If you want an automatic one you can use this plugin.

  3. any way to show the prices on product page?

  4. i mean directly next to “put int cart” its the law in germany :/

    1. Hi Maz,
      you should use one of those plugins for the German market. They make WooCommerce reliable for the German law about eCommerce.

      You can find one here: https://wordpress.org/plugins-wp/woocommerce-germanized/

      There are others if you Google “WooCommerce German Market”.

  5. Hi, the plugin Global Content Blocks is no longer available, do you have another suggestion for implementing this?

  6. WooCommerce Dynamic Pricing 3.0.7 Extension | Plugins

    […] Since there are many ways in which an advanced rule can be triggered and these are dependent on the quantity of products in the cart, there is no practical way to calculate what and what not might apply to a particular customer when using advanced rules until the item has been added to the cart. The most common approach to this, and the way that is used on most big box retailers, is to advertise the sale in the sidebar, banner or somewhere else on the site. The alternate approach is to use actions from WooCommerce to add a description to individual products or entire categories of products. See this quick example for an idea of where to get started: Creating a Dynamic Pricing Discount table in the product page. […]

  7. Hello Nicola,
    Great way to show a price table on the product page.
    Is there a piece of code to show the product name in the table. I mean, I have variable products and the price tables show, but there is no way to figure out for the customer which product the price table is for.
    Kind regards,

    1. Hi Marianne,
      since the table is manually created you can simply add a title before it in the content editor.

      I think that would be the best and fastest way.

  8. WooCommerce Dynamic Pricing – WooCommerce Docs – alephmarket

    […] The most common approach to this, and the way that is used on most big box retailers, is to advertise the sale in the sidebar, banner or somewhere else on the site. The alternate approach is to use actions from WooCommerce to add a description to individual products or entire categories of products. See this quick example for an idea of where to get started: Creating a Dynamic Pricing Discount table in the product page. […]

Leave a Reply

You Might Also Like These Articles


Contribute to Improving This Blog

Did you enjoy this article? Was it helpful? Contribute to help me write more articles! The funds collected from this blog are reinvested directly into improving my skills or the blog so that I can provide more and better content!

One-Time
Monthly
Yearly

Make a one-time donation

Make a monthly donation

Make a yearly donation

Choose an amount

€1.00
€5.00
€10.00
€5.00
€15.00
€100.00
€5.00
€15.00
€100.00

Or enter a custom amount


Your contribution is appreciated.

Your contribution is appreciated.

Your contribution is appreciated.

DonateDonate monthlyDonate yearly

Don't Miss a Thing!

Receive new articles from this blog directly in your inbox!

No spam guaranteed!

Join 669 other subscribers

Continue Reading

Discover more from Nicola Mustone

Subscribe now to keep reading and get access to the full archive.

Continue reading