Post by kroozing » Thu May 13, 2010 2:23 am

I have searched the forum with no avail, I need to be able to put the price including tax (17.5%) instead of the price excluding tax when entering a new product.
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

New member

Posts

Joined
Thu Apr 29, 2010 2:01 am

Post by Xsecrets » Thu May 13, 2010 3:54 am

in the settings there is an option show prices with tax just choose yes.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by kroozing » Thu May 13, 2010 4:21 am

Thanks for your reply,
I have set that setting to yes and it does what i want on the front end. I am wanting to input the sale price in admin including the tax, otherwise i have to have a calculator with me all the time.

New member

Posts

Joined
Thu Apr 29, 2010 2:01 am

Post by Xsecrets » Thu May 13, 2010 4:34 am

ahhh there was another thread at one point in time with someone wanting that same thing. Not sure if they ever got it working or not.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by kroozing » Thu May 13, 2010 4:41 am

Yeah i saw that however no body posted a solution.
Was hoping i could be more lucky

Thanks anyway

New member

Posts

Joined
Thu Apr 29, 2010 2:01 am

Post by mcs107 » Wed Jun 02, 2010 8:50 am

Yes, I am needing the same thing (to add product price including tax). If anyone has a solution, it will much appreciated.

Newbie

Posts

Joined
Tue Jun 01, 2010 12:10 pm

Post by kroozing » Wed Jun 02, 2010 2:03 pm

I'm sorry but I am yet to find a solution

New member

Posts

Joined
Thu Apr 29, 2010 2:01 am

Post by Smile » Tue Sep 14, 2010 3:29 am

Well maybe we should make a donation for the person who fix this problem! I really would love to see this as well!

Newbie

Posts

Joined
Sun Sep 12, 2010 5:48 pm

Post by i2Paq » Wed Sep 15, 2010 12:44 am

There is a solution on the Dutch forums Here.

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>
Replace with:

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/>';
tested on 1.4.8a
($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.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Qphoria » Wed Sep 15, 2010 2:28 am

You got some addimage code that doesn't look like it should be there

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by i2Paq » Wed Sep 15, 2010 2:57 am

Qphoria wrote:You got some addimage code that doesn't look like it should be there
Well, it is not my code, I just copied it here ;)

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.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by karmadjez » Fri Oct 07, 2011 8:39 pm

the above code works in 1.5.1 althoug there are two things that happen

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

Newbie

Posts

Joined
Fri Oct 07, 2011 8:36 pm

Post by uksitebuilder » Fri Oct 07, 2011 9:19 pm

You have replied to a post that is 12 months old, I'm shocked it works at all in 1.5.x

I believe this may be a better solution for you: http://forum.opencart.com/viewtopic.php ... 0&p=198242

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by guntis.e » Wed Jun 24, 2015 8:00 pm

Here is commercial solution:

ImageFor Opencart 1.5.x: Price Input Helper - Entering Price With Tax Included
ImageFor 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

Imagepossibility to edit and save the price modifyer (or myltiplyer)
Imagepossibility to auto-detect the tax rate based on product tax class
Imagehelper field available in all places where the price input is done:
Imageproduct price
Imageoptions prices
Imagediscounts prices
Imagespecial prices
ImageProduct list page has additional column with price incl. tax

Image
Last edited by guntis.e on Sat Oct 29, 2016 4:39 pm, edited 1 time in total.

Guntis
ImagePartneris.net


New member

Posts

Joined
Fri Jan 28, 2011 4:20 am

Post by PSMDanny » Sat Oct 29, 2016 6:22 am

Another solution would be:

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

Newbie

Posts

Joined
Fri Apr 04, 2014 3:38 am
Who is online

Users browsing this forum: Bing [Bot] and 24 guests