 Welcome back to the channel. In a previous video we were able to create a new course that added to a sub-toto and created a new total in about 5 lines of code. So this time around I'm going to do something different. I want you to imagine that we had created our products and they included the prices with their taxes in them. But at the end of the day we want to show the custom how much they're paying in tax and how much of money was charged before the taxes. So that's what we're going to dive in and that's what this question was asking from the drone who asked in the comments on that particular video. So let's jump into that. There are two ways of doing this. One is by using the add action and then you target this particular location and add some code to it. But I'm going to show you another way that deals with the theme and also just adding different template files from Wukamas. So Wukamas allows us to edit the themes. If you come to the docs you will see that they allow you to edit the themes by adding a new file inside your theme. Add one of the files from the templates from the plugin and that will work very well. So what do I mean? Let me show you that. We're going to open our editor here and I'm going to go and open our plugin inside WP content of our site. Now inside here I'll open the Wukamas plugin and I'm going to look at the templates folder that we do have here. So inside here, since we're on the checkout page, you will see that most of these templates are well named to the areas where they are attached. So we'll go to the checkout and we'll see the part that talks about reviewing the order because this is the part we review. The order will open that up in our editor and I'm going to just go down to the part where we have the total right here. And I'm going to duplicate this table row and I'm going to add something new and call this information. And once I save this and come back and reload, you will see that we have a new section that's talking about information and it's not affecting our total even if we have a figure thrown in there. So this is how we do it but unfortunately we can't edit that in the plugins itself because once we update to a later version of Wukamas, all our changes will be lost because this particular file will be overwritten with the new file that comes from Wukamas. So what do we do? We just need to copy this file and then we're going to come back to our active theme inside our themes folder. Go to 2019 which is our current theme, create a new folder called Wukamas and then inside this we'll create a new folder called checkout because in our templates we went into the checkout folder and then we're going to paste our review order. Please notice that we don't add a templates folder inside here. We'll go straight away from Wukamas and start adding the different templates and layouts. So from here we're going to edit this file and because we copied it directly it will still have the information we had added but I need to go back to my plugin and restore what was originally there. So if we try to reload this here you will see that we still have our information working out here and that is coming from our themes and let me show you if I just make a small change or add a new word and say here and you'll see information will be here. So since we have this I'm going to now attach something we don't want this to be bold we want it to be like the subtoto. So I'll copy the class that comes with a subtoto and that is just cut subtoto here copy it then paste it here and save. And we're going to change the functions that do work in the PHP in this particular file. So let's create some space here and we're going to say we're going to get we're going to get our subtoto is equal to WC which is a global from Wukamas and we're going to get the cut and we're going to chain on get subtoto function to get us the subtoto. Now what we're going to do in this particular case is we want to echo the taxable amount and what do I mean by taxable amount that is how much tax we're going to pay. So you can say taxable amount and here the taxable amount we usually get it by multiplying our value our tax rate and our total. So we shall also get a value of rate and we're going to say it's 18% but remember 18 out of 100 is the same as 0.18. We don't add this percentage sign because a percentage sign means something different in programming. It's a modulus. It means you're looking for a remainder after dividing an odd number with an even number. So we'll just make our tax rate as 0.18 for 18%. So what we're going to do now is we're going to echo the subtoto times the rate. And then we are going to set this so when we come back here and reload we'll see that our taxable amount changes and we have the value written right here but of course it's not adopting this currency. We need to get that currency symbol right here and we shall get that symbol before the 162 by using this function which is a get wukamas currency and then we shall just chain I'll just add our math inside some brackets to make sure that it goes through. So let me reload this and you see that we have a figure here and it's still not affecting our total that we had here. So I'll just quickly go and turn off that flagging that shows the extra costs when I reload here you'll see that we have our 900 as subtoto and our taxable amount is still this. So let me push this a little step further and I am also going to show the client the amount before the tax so we have amount before tax and that we usually get by getting the subtoto and then we remove the taxable amount so we're going to do some more math so get the subtoto then we'll subtract the subtoto times the rate and so if we save this we're going to see that we get this value but of course we can also chain on our function which is a get wukamas currency and then we'll use a dot to do that I can also wrap this inside the brackets just to make our code more readable so I'll say this when I reload you'll see that we have our amount before tax we have our taxable amount and our amount is still 900 and it's the one that will get paid so if we place our order you'll see that our order goes through and we are charged 900 for cash on delivery so that's how you can also use the theming in wukamas to make your whole experience of your shop unique so you can actually end up doing a one page shopping site so that people order only on the front and then they go to the checkout so we're going to attempt that in the near future I'm going to come and show you how we can do a design a whole complete design of our one page shopping wukamas site so keep blue to the screen keep watching the channel subscribe if you haven't and click the notification bell to always get the latest coming from the channel share the video with your friend if you enjoyed it give it a thumbs up or just simply leave a comment with a question or an answer thank you for watching and cheers