This plugin adds product variation markup by attribute to WooCommerce and adjusts product variation regular and sale prices accordingly.
Want to add $5 to every blue product you sell? Maybe you sell jewelry with birthstones, and some stones just cost more than others. If all “X-Large” products cost 7.5% more, you have to manually calculate and change every “X-Large” variation of every product.
Markup by Attribute solves this problem by allowing you to add a markup (or markdown) to global attribute terms. If the attribute is ‘color’, then Markup by Attribute allows you to add “+5″ to Blue while leaving Green and Yellow alone. When you set regular and sale prices, every blue product will be $5.00 more.
Markup by Attribute:
Set regular price
and Set sale price
.Download the Markup by Attribute for WooCommerce ZIP file.
Unzip the plugin files to the /wp-content/plugins/markup-by-attribute-for-woocommerce
directory.
Activate the plugin through the WordPress Plugins
page.
Locate the Markup by Attribute for WooCommerce plugin using the search box on the in WordPress Plugins
⇾ Add New
page.
Install the plugin using the [Install]
button.
The [Install]
button will change to an [Activate]
button. Use it to activate the plugin.
(Detailed instructions can be found at Markup by Attribute Wiki.)
NOTE: These instructions assume you are familiar with WooCommerce global Product Attributes and with WooCommerce Product Variations. If not, you may want to review the WooCommerce documentation on Product Attributes and Variable Products.
Three Easy Steps
Add new attribute
panel or the Edit attribute
panel.Create variations from all attributes
is the easiest way to ensure you have all combinations.Set regular price
and Set sale price
bulk edit functions as you normally would. (NOTE: If you’ve already set the prices before installing Markup-by-Attribute, you will need to do it again to apply the markup). Product Price 18.95
Add 2.00 for Logo
Note the addition of the “Markup (or markdown)” field on the bottom of the Add new *attribute*
panel of the attribute editor.
Note the addition of the “Markup (or markdown)” field on the bottom of the Edit *attribute*
screen of the attribute editor.
The regular price is $18.95. Markup by Attribute added $6 for a logo and $1.42 for extra large.
The customer sees the full range of sale prices available and how much each option costs, plus a clear description of the breakdown.
Markdowns (negative markups) can be used as well.
Markups are applied to sale prices just as they are with regular prices.
The settings page allows configuration of how the markup is displayed.
Markup by Attribute works within the framework provided by WooCommerce and sets product variation markups (or markdowns) during the Set regular price
and Set sale price
actions. Therefore, you must locate the products affected by this change and reset the regular and sale prices.
When I get this question, it is usually because people want the prices to change as soon as they add or adjust a markup. The way Markup by Attribute was built, however, requires that you run the Set regular prices
function for the variations.
If you’ve used Set regular prices
and it still doesn’t update the prices properly, you may have a variation with an “Any” attribute. If you have six sizes, for instance, but you have one product variation with “Any size”, then WooCommerce will pick that one. The important take-away here is that you shouldn’t have a variation with “Any attribute”, if that attribute has a markup.
If it’s neither of these things, please check the support forums.
Then do nothing. Prices, descriptions, and option drop-downs for products will remain at whatever value they were set to last time you ran the Set regular price
or Set sale price
bulk variation activities.
Yes. However, the developer only speaks American English. I can provide ‘Google Translate’ versions of other languages, but I would prefer it if a native speaker translated the text. The .POT file is found in the /languages folder of the plugin. If you don’t have access to your server, you can also find it on GitHub.
What’s a .POT file? If you’d like to help but don’t know how to use a template file, don’t worry. A .POT file is a text file that contains all the English phrases found in Markup-by-Attribute. You can simply open it and translate what you read there. Send me the translations and I will incorporate them in the next release.
Many thanks to Zjadlbymcos on GitHub for his Polish Translation and @silentstepsch for several variations of German.
Thanks! The donation button assumes $5.00 USD. But please don’t hesitate to adjust that amount up or down as you feel it’s appropriate. I’m a retired guy who’s living off his savings, so every bit helps.
If you use Markup by Attribute and want to see me continuing support for it, I encourage you to encourage me with a small donation.
Build 202428.02
* FEATURE: Added a column for the attributes to the ‘All Products’ page. Can also filter on the individual attributes. This will make finding products whose markups have changed much easier. Column can be added or removed on the WooCommerce>>Settings>>Markup-by-Attribute page.
Build 202428.01
* FEATURE: Added a column for the attributes to the ‘All Products’ page. Can also filter on the individual attributes. This will make finding products whose markups have changed much easier.
* MAINTENANCE: Ensured compatibility with current versions of WordPress, WooCommerce, and PHP. New versions of WooCommerce and PHP.
Build 202425.01
* FIX: Correct code to eliminate “Creation of dynamic property” depreciation notices.
* FIX: Hid WooCommerce [Add price] button because it is redundant with ‘Set regular prices’ function, and does not hook into this plugin.
* MAINTENANCE: Ensured compatibility with current versions of WordPress, WooCommerce, and PHP.
Build 202414.01
* FIX: Add code to handle manually added attributes for GitHub issue #28. (https://github.com/Mark-Tomlinson/markup-by-attribute-for-woocommerce/issues/28) Thanks to g-alfieri for suggesting a fix.
Build 202414.01
* MAINTENANCE: Extensive revisions to /src/product.php for readability and performance.
* MAINTENANCE: Smaller revisions throughout code for readability and performance.
* MAINTENANCE: Ensured compatibility with current versions of WordPress, WooCommerce, and PHP.
Build 202343.01
* MAINTENANCE: Ensured compatibility with current versions of WordPress, WooCommerce, and PHP.
* FIX: Added compatibility to WooCommerce HPOS (High-Performance Order Storage). No changes to operation; just added a compatibility declaration and admin message.
Build 202332.01
* MAINTENANCE: Ensured compatibility with current versions of WordPress, WooCommerce, and PHP.
* FIX: Corrected a minor formatting error in the variation descriptions.
Build 202308.01
* MAINTENANCE: Ensured compatibility with current versions of WordPress, WooCommerce, and PHP.
Build 202308.02
* MAINTENANCE: Ensured compatibility with current versions of WordPress, WooCommerce, and PHP.
Build 202245.01
* MAINTENANCE: Ensured compatibility with current versions of WordPress, WooCommerce, and PHP.
* MAINTENANCE: Resolved a PHP ‘depreciation’ warning.
* FIX: Fixed a bug where Markup-by-Attribute would get confused about the decimal separator because the server and WooCommerce localization settings conflict.
Build 202245.02
* MAINTENANCE: Changed the default on Sale Price Markup
to ‘yes’.
Build 202208.01
* FIX: Correct Doubled currency symbol.
* MAINTENANCE: Tested with PHP 8.0.16 and updated PHP tested up to:
information.
* MAINTENANCE: Tested with WordPress 5.9.1 and updated Tested up to:
information.
* MAINTENANCE: Tested with WooCommerce 6.2.1 and updated WC tested up to:
information.
* MAINTENANCE: Added Apache tested up to:
2.4.41 information.
* MAINTENANCE: Added MySQL tested up to:
8.0.28 information.
Build 202208.02
* MAINTENANCE: Corrected versioning information.
Build 202207.01
* FIX: Correct floating-point conversion error for percentage markups over four digits long (< -1,000, > +1,000).
Build 202205.01
* MAINTENANCE: Extensive clean-up.
* MAINTENANCE: Used wc-price() function instead of DIY formatting for better compatibility.
* MAINTENANCE: Tested with PHP 8.0.15 and updated PHP tested up to:
information.
* MAINTENANCE: Tested with WordPress 5.9 and updated Tested up to:
information.
* MAINTENANCE: Tested with WooCommerce 6.1.1 and updated WC tested up to:
information.
Build 202152.01
* FIX: Commented out unneeded module testing because it prevents Markup-by-Attribute from working on some sites. Will re-include after I determine why it did not work.
Build 202152.01
* FEATURE: Allows you to calculate percentage markups on sale prices instead of always using the regular price calculation.
* FEATURE: Adds a sortable Markup column to the attribute list view and eliminates the markup notation from the description.
* MAINTENANCE: Added test to not load unneeded modules.
* MAINTENANCE: Minor code and comment cleanup.
* MAINTENANCE: Tested with PHP 8.0.14 and updated PHP tested up to:
information.
* MAINTENANCE: Tested with WordPress 5.8.2 and updated Tested up to:
information.
* MAINTENANCE: Tested with WooCommerce 6.0.0 and updated WC tested up to:
information.
Build 202113.02
* FIX: Empty and non-zero evaluations are no longer the same in PHP 8. Corrected to check each individually.
* MAINTENANCE: Tested with PHP 8.0.3 and update PHP tested up to:
information.
Build 202113.03
* MAINTENANCE: Add customer facing Swedish translations.
* MAINTENANCE: Tested with PHP 8.0.8, WordPress 5.7.2, WooCommerce 5.4.1.
Tested up to:
information.WC tested up to:
information.Tested to:
information.Tested to:
information.Tested to:
information.Include the Increase (Decrease) in the Term Name
option allows markups to show when the drop-down box is not available.Do NOT show the markup in the options drop-down box
option now doesn’t load the MT2MBA_FRONTEND_OPTIONS class.Settings
page with subheadings.Settings
page.FIX: Eliminate bug where default variation options were not being selected and Choose an Option
was always shown.
FIX: Remove error_log() statement accidentally left in.