Reputation: 15
Our woocommerce site sells custom cabinet doors and has many customization forms. We are using the Woocommerce Measurement Price Calculator and Product Add on plugins so that we can have the customer give us in detail their specs for the product as well as check off additional options that add fixed charges. However, the plugin does not add a percentage surcharge which is what we need to add to some of our products. Woocommerce confirmed that they don't have any solutions to the problem. Is there any way to take the total price and multiply it by 10% on a product page if a checkbox is checked?
Upvotes: 0
Views: 358
Reputation: 1885
You could create a table in a database with two columns: 'modification' and 'surcharge'. For surcharge just fill in the amount of surcharge and for modification fill in some kind of an ID or name of modification. When a user starts configuring a cabinet door simply create an array that will save all desired modifications. On the checkout page iterate through that array and check the according surcharge in the database. Then just add all surcharges to the product price and echo it out.
Upvotes: 0