I have tried the tax change contribution posted in this forum however it doesn't work.
Has anyone got a solution to this?
i am only selling to the uk with a standard tax of 17.5%
Many thanks
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Find in admin\view\template\catalog\product_form.tpl
Code: Select all
<tr>
<td><?php echo $entry_price; ?></td>
<td><input type="text" name="price" value="<?php echo $price; ?>" /></td>
</tr>
Code: Select all
<!-- TAXMOD1 BEGIN -->
<tr>
<td><?php echo $entry_price_gross; ?></td>
<td><input type="text" id="grossprice" name="grossprice" onkeyup="updateNet()" value="<?php print ($price*1.19); ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_price; ?></td>
<td><input type="text" id="price" name="price" onkeyup="updateGross()" value="<?php echo $price; ?>" /></td>
</tr>
<!-- TAXMOD1 END -->
<script type="text/javascript"><!--
var image_row = <?php echo $image_row; ?>;
function addImage() {
html = '<tbody id="image_row' + image_row + '">';
html += '<tr>';
html += '<td class="left"><input type="hidden" name="product_image[' + image_row + ']" value="" id="image' + image_row + '" /><img src="<?php echo $no_image; ?>" alt="" id="preview' + image_row + '" class="image" onclick="image_upload(\'image' + image_row + '\', \'preview' + image_row + '\');" /></td>';
html += '<td class="left"><a onclick="$(\'#image_row' + image_row + '\').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>';
html += '</tr>';
html += '</tbody>';
$('#images tfoot').before(html);
image_row++;
}
//--></script>
<script type="text/javascript" src="view/javascript/jquery/ui/ui.datepicker.js"></script>
<script type="text/javascript"><!--
$(document).ready(function() {
$('.date').datepicker({dateFormat: 'yy-mm-dd'});
});
//--></script>
<script type="text/javascript"><!--
$.tabs('#tabs a');
$.tabs('#languages a');
//--></script>
<!-- TAXMOD1 BEGIN -->
<script type="text/javascript"><!--
function doRound(x, places) {
return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);
}
function updateGross() {
var taxRate = 19; //TAXVALUE - ENTER DIRECTLY
var grossValue = document.forms["form"].price.value;
if (taxRate > 0) {
grossValue = grossValue * ((taxRate / 100) + 1);
}
document.forms["form"].grossprice.value = doRound(grossValue, 4);
}
function updateNet() {
var taxRate = 19; //TAXVALUE - ENTER DIRECTLY
var netValue = document.forms["form"].grossprice.value;
if (taxRate > 0) {
netValue = netValue / ((taxRate / 100) + 1);
}
document.forms["form"].price.value = doRound(netValue, 4);
}
//--></script>
<!-- TAXMOD1 END -->
Add to admin\language\dutch\catalog\product.php
Code: Select all
$_['entry_price_gross'] = 'Price (incl Tax): <strong>Use .<strong/>';
($price*1.19) this is set to Tax beeing 19%, adjust this to fit your own need eg. Tax 20% = ($price*1.20)
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Well, it is not my code, I just copied it hereQphoria wrote:You got some addimage code that doesn't look like it should be there
I do think that if you would have a look at this code, adjust it to your standard, a lot of OC-users would benefit from it
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
1. on the product entry page you get Notice: Undefined variable: entry_price_gross in /var/www/vhosts/bedstorquay.co.uk/httpdocs/admin/view/template/catalog/product_form.tpl on line 66
although it does not stop it working it is untidied
2. if you enter say 79.00 in the gross price it works the vat out (at 20% for uk) but once saved it reverts to 79.8884 and it looks rather untidy again
any offers of how to cure these two irritants
in the whole though made life alot easier
I believe this may be a better solution for you: http://forum.opencart.com/viewtopic.php ... 0&p=198242
For Opencart 1.5.x: Price Input Helper - Entering Price With Tax Included
For Opencart 2.x: Price Input Helper 2 - Enter price with tax
This OpenCart extension allows e-commerce store owner to input prices with tax on product edit form. The price without tax will be automatically calculated and saved with the form.
Features
possibility to edit and save the price modifyer (or myltiplyer)
possibility to auto-detect the tax rate based on product tax class
helper field available in all places where the price input is done:
product price
options prices
discounts prices
special prices
Product list page has additional column with price incl. tax
Guntis
Partneris.lv - opencart web site development and support
https://www.opencart.com/index.php?rout ... n_id=28303
this modification allows you to insert prices with tax in:
- Product Price
- Product Options
- Product Discounts
- Product Specials
click the demo button and see it in action
Best Regards,
Danny
Users browsing this forum: Semrush [Bot] and 38 guests