Advanced Dynamic Pricing For WooCommerce

Replace Templates in Theme

The Advanced Dynamic Pricing for WooCommerce plugin displays several dynamic elements on your site. For example, it shows a bulk discount table on product pages, an “amount saved” label in the cart, and a “You saved – xxx” message next to each discounted product in the cart if you enable the Pro version’s Settings > Cart > Show “you saved – xxx” for each product in the cartoption.

You can fully customise the appearance of these elements. The plugin follows the same override principle as WooCommerce itself: copy a template file from the plugin folder to a specific location inside your theme (ideally a child theme), and then edit the copied file. Your changes will not be lost when you update the plugin.

This guide explains the exact folder structure for each type of template. It also lists the variables that are available inside each template, so you know what data you can work with. For a general introduction to overriding WooCommerce plugin templates, we recommend first reading our detailed guide: How to Override Plugin Templates.


Prerequisites

Before you begin, make sure you meet the following conditions.

  • You are using a child theme. Do not override templates directly in your parent theme; updates will erase your changes. If you do not have a child theme, create one first.
  • You have access to your site’s files via FTP, cPanel File Manager, or the file manager of your hosting provider.
  • You understand basic HTML and PHP. The templates use PHP code, so you need some familiarity with it to make changes.

Advertising Templates (Pro Version Only)

The advertising templates control promotional banners or discount badges that appear on product pages or shop archives. You only find these templates inside the Pro version of the plugin.

Follow these steps to override an advertising template.

Step 1: Navigate to the plugin’s advertising templates folder. The full path is:

Step 2: Open the specific template folder that contains the file you want to change. For example, you might find folders such as product-badge or category-badge.

Step 3: Copy the required template file.

Step 4: Go to your child theme’s root directory.

Step 5: Create a new folder named advanced-dynamic-pricing-for-woocommerce inside your child theme.

Step 6: Inside that folder, create another folder named advertising.

Step 7: Paste the copied template file into advanced-dynamic-pricing-for-woocommerce/advertising/.

Step 8: Edit the file to match your design requirements. The plugin will now use your version of the template.

Important: The advertising templates are only available in the Pro version of Advanced Dynamic Pricing for WooCommerce. If you use the free version, you cannot override these templates.


Overriding Other Templates

For standard elements such as the cart totals “amount saved” label, the checkout label, the mini‑cart label, and the bulk discount table, you copy files from the BaseVersion/templates folder. These templates work in both the free and Pro versions.

Step 1: Navigate to the plugin’s base templates folder:

Step 2: Find the template file you want to override. You can replace the following files:

Template FileDescription
cart-totals.phpControls the “amount saved” label in the cart totals section.
cart-totals-checkout.phpControls the “amount saved” label on the checkout page.
mini-cart.phpControls the “amount saved” label in the mini‑cart (header cart dropdown).
bulk-table.phpControls the entire bulk discount table on product pages.

Step 3: Copy the desired file.

Step 4: Go to your child theme’s root directory.

Step 5: Create the folder advanced-dynamic-pricing-for-woocommerce (if it does not yet exist).

Step 6: Paste the copied file directly into that folder (no subfolder required).

Step 7: Edit the file to customise the HTML, CSS classes, or label text.

Available variables for cart‑related templates

The three cart‑related templates (cart-totals.phpcart-totals-checkout.php, and mini-cart.php) share the same set of variables:

  • $title – The label text (e.g., “You saved”). This is a string.
  • $amount_saved – The total amount the customer saved based on the active pricing rules. This is a float.

Example: You can change the label from “You saved” to “Total discount” by editing the $titlevariable inside the template.

Available variables for the bulk table template

The bulk-table.php template provides more complex variables:

  • $header_html – The title of the bulk table (string). You can change the heading text or wrap it in custom HTML.
  • $table_header – An array of the table column headings (e.g., “Quantity”, “Price”).
  • $rows – An array of the table rows. Each row contains the discount information for one tier.
  • $data_rows – An array with detailed information about your bulk rule, including the bulk mode (quantity, subtotal, or weight), the bulk ranges, the discount type (percentage or fixed), and the discount amount.
  • $footer_html – The table footer (string). You can add additional notes or remove the footer entirely.

You can use PHP loops inside the template to iterate over $rows and build a completely custom table structure.


Overriding the “You Saved – xxx” Label per Product in the Cart (Pro Only)

The Pro version includes an option to show how much the customer saved on each individual product inside the cart. You enable this option at Advanced Dynamic Pricing → Settings → Cart → Show “you saved – xxx” for each product in the cart.

The template for this feature resides in a special folder. Overriding it requires a slightly different process.

Step 1: Navigate to the Pro version templates folder:

Step 2: Locate the folder named item-amount-saved. This folder contains the file cart.php.

Step 3: Copy the entire folder item-amount-saved (including the cart.php file inside it).

Step 4: Go to your child theme’s root directory.

Step 5: Create the folder advanced-dynamic-pricing-for-woocommerce (if it does not exist).

Step 6: Paste the item-amount-saved folder into advanced-dynamic-pricing-for-woocommerce/.

Step 7: Edit the cart.php file to change the label or the formatting of the saved amount.

Available variables for this template

  • $title – The label text (string). For example, “You saved”.
  • $amountSaved – The amount saved for that specific product (float). This value is formatted according to your WooCommerce currency settings.

You can change the label to something like “Discount” or add an icon next to the saved amount.


Troubleshooting Template Overrides

SymptomLikely CauseSolution
My changes do not appear on the site.You placed the template in the wrong folder or used the wrong file name.Double‑check the folder structure. For advertising templates, the path must be child-theme/advanced-dynamic-pricing-for-woocommerce/advertising/. For other templates, the path is child-theme/advanced-dynamic-pricing-for-woocommerce/.
The site shows a PHP error after I edited the template.Your code contains a syntax error (e.g., a missing semicolon or bracket).Revert to the original template file. Edit incrementally and test after each small change. Enable WordPress debugging to see the exact error.
The override works in the cart but not on the checkout page.You may have copied only one of the cart‑related templates.The cart and checkout use separate templates. Make sure you override both cart-totals.php and cart-totals-checkout.php if you need consistent changes.
The bulk table uses the new HTML, but the data is missing.You removed or misused the PHP variables inside the template.Restore the original bulk-table.php and test. Then add your custom HTML while keeping the PHP loops intact.
The “You saved – xxx” label disappears completely.You placed the item-amount-saved folder in the wrong location.The correct location is child-theme/advanced-dynamic-pricing-for-woocommerce/item-amount-saved/. Do not place the folder directly inside child-theme/advanced-dynamic-pricing-for-woocommerce/advertising/.
The Pro feature works, but only for some products.The discount rule may not apply to those products.Check your pricing rules. The “You saved” label only appears for products that actually receive a discount from an active rule.

Summary

Template TypeSource FolderDestination Folder (in child theme)Version
Advertising (badges, banners)Pro Version/templates/advertising/advanced-dynamic-pricing-for-woocommerce/advertising/Pro only
Cart “amount saved”BaseVersion/templates/cart-totals.phpadvanced-dynamic-pricing-for-woocommerce/Free + Pro
Checkout “amount saved”BaseVersion/templates/cart-totals-checkout.phpadvanced-dynamic-pricing-for-woocommerce/Free + Pro
Mini‑cart “amount saved”BaseVersion/templates/mini-cart.phpadvanced-dynamic-pricing-for-woocommerce/Free + Pro
Bulk discount tableBaseVersion/templates/bulk-table.phpadvanced-dynamic-pricing-for-woocommerce/Free + Pro
“You saved – xxx” per productProVersion/templates/item-amount-saved/advanced-dynamic-pricing-for-woocommerce/item-amount-saved/Pro only

Always use a child theme for template overrides. Test your changes on a staging site before deploying them to production. If you run into issues, consult the troubleshooting section or contact our support team.

Have questions? Please submit a support request. We're always happy to help!

Advanced Dynamic Pricing
for WooCommerce
PRO

From $60
Buy
✓ 30-day money-back guarantee