Sidebar

 

Virtuemart Extensions by RuposTel.com

  • Full Screen
  • Wide Screen
  • Narrow Screen
  • Increase font size
  • Default font size
  • Decrease font size

How to preselect VAT in product form in VirtueMart

We are very glad to run our own servers, so we can use Midnight Commander in Putty over SSH console and search all the files in matter of couple seconds. How do we debug VirtueMart? We have FireBug installed in Mozzila and if any form doesn't seem to show what we would like, we search all VirtueMart for css class of the element. And than search for appropriate functions and classes.

To the point of this article:

Modify your ps_tax.php in /administrator/components/com_virtuemart/classes/ps_tax.php, search for function list_tax_value( ... and right after $db = new ps_DB( ); around line 235 and insert following line if your tax ID is 3.

 

if (!isset($selected_value_id)) $selected_value_id = 3;

 

How to get your Tax Id? It is shown in product form when adding products in VAT listbox as "3 (19 %)" where 3 is the ID.

 

This will show your default VAT for every form which gives you the option. We know, this is not a nice hack but works.

You are here