Sidebar

 

Virtuemart Extensions by RuposTel.com

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

Hacks

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.

Speeding up Virtuemart

One of the common problems with VirtueMart is it's speed. Here we provide advices how you can make your site with 5 thousand products and more to load from 50 to 500 milliseconds (from localhost) depending on actual hardware configration of your server.

 

Firstly it will work only if you don't have any legacy mode plugins in your Joomla installation. The problem with legacy mode plugins is that they don't support caching top speed caching. Therefore,  if you see that all of your plugins are compatible you can disable Lagacy mode in Joomla. How to find out if everything is compatible? Go to Extensions - Install/Uninstall - Components and you will see column Compatiblity. If all your components are checked, than everything is all right.

Attachments:
FileDescriptionFile size
Download this file (cacheHackJoomla.zip)Cache.php Modification for JoomlaThis is a file from Joomla 1.5.15 and is compatible up to Joomla 1.5.18 as far as we tested it.1 Kb
Download this file (cdirs.sh.zip)cdirs.sh.zip 0 Kb
Download this file (createcache.php.zip)createcache.php.zip 1 Kb
Last Updated on Monday, 12 May 2014 12:55 Read more...

Page 5 of 5

You are here