Author Topic: How to use the virtuemart.cfg, change defaults and use hidden options  (Read 4026 times)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9336
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
The VirtueMart configuration has its defaults delivered in the virtuemart.cfg-dist. The configuration loader tries first to load the configuration from the virtuemart_configs table. If not accessible it tries to load the virtuemart.cfg, which is not in the installation package and therefore not overwritten. If there is no virtuemart.cfg available, the virtuemart.cfg-dist is copied as virtuemart.cfg.

So if you want to use an option for the installation like dblayoutstrict, dbpsdescsize, dbnamesize. Or an rarely used pro option which has no GUI, then you just need to get this into your configuration.

Just open the virtuemart.cfg (at /administrator/components/com_virtuemart/virtuemart.cfg) and you can preset any value used in VmConfig::get('myvalue',default). In the example it would be just the line myvalue=default. Save the file and enter the virtuemart backend.

If you use Vm3, just store the vm config 1 time. The configuration file is load first and overwritten by the form and you should keep all settings.
In Vm2, you must use the button in tools "udpate config by file", be aware that you loose your settings then.

Of course you could theoretically set all config defaults into the virtuemart.cfg (interesting for retailers actually).
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/