Adding Price without Tax - inline calculation
Posted: Tue Mar 27, 2012 7:14 am
Hi Guys,
As you all know, OpenCart is forcing you to write the price without tax and it adds it for you automatically (if you select the tax). And many of us calculate the prices separately. Otherwise you must purchase all sorts of extensions and addons for one simple thing. Well I got tired to calculate the price without VAT every time I added a product.
And I came up with a simple solution for adding prices without tax, at the Price field, when adding the data. It's not automatic but semi-automatic (copy/paste)
Attached you will find a rar file with a html file inside. You can modify that file according to your country/needs. This should take exactly 3 minutes.
Here are the instructions:
1. Place the file vat.html in the root of you website/store.
2. Open with a HTML editor the file product_form.tpl from this location:
/admin/view/template/catalog
3. Search for "<?php echo $price; ?>" . You will find it around line 78/79.
4. Add the following code after it:
That line should look like this:
That's all! Try to edit your product! You must see the fields near "Price" field to calculate the price without VAT.
I tried to implement it in the code but it didn't work. Maybe someone will help with that and keep it simple.
Thanks and hope it will be useful.
As you all know, OpenCart is forcing you to write the price without tax and it adds it for you automatically (if you select the tax). And many of us calculate the prices separately. Otherwise you must purchase all sorts of extensions and addons for one simple thing. Well I got tired to calculate the price without VAT every time I added a product.
And I came up with a simple solution for adding prices without tax, at the Price field, when adding the data. It's not automatic but semi-automatic (copy/paste)
Attached you will find a rar file with a html file inside. You can modify that file according to your country/needs. This should take exactly 3 minutes.
Here are the instructions:
1. Place the file vat.html in the root of you website/store.
2. Open with a HTML editor the file product_form.tpl from this location:
/admin/view/template/catalog
3. Search for "<?php echo $price; ?>" . You will find it around line 78/79.
4. Add the following code after it:
Code: Select all
<iframe src="../vat.html" height="29" width="600" frameborder="0"></iframe>
Code: Select all
<td><input type="text" name="price" value="<?php echo $price; ?>" /> <iframe src="../tva.html" height="29" width="600" frameborder="0"></iframe></td>
Thanks and hope it will be useful.