(written by Grok and reviewed by Max Milbers)

Audience: Core contributors and extension authors who copy core patterns
Status: VirtueMart 5 — Joomla is the test host, not the public API of the component

1. Why this exists

VirtueMart 4 called JFactory, JText, JRequest everywhere. That tied the shop to Joomla internals. VirtueMart 5 is developed standalone. A WordPress host (or a CLI script) should talk to VirtueMart helpers, not to Joomla’s application object.

VirtueMart’s answer: a thin VM API in administrator/components/com_virtuemart/helpers/. New core uses that. Plugins may still speak Joomla until VirtueMart 6.

2. Map

Old Joomla facade VirtueMart 5
JFactory vmFactory
JRequest / raw JInput vRequest
JSession::getFormToken() vRequest::getFormToken()
JSession::checkToken() vRequest::vmCheckToken()
JText vmText
JLanguage vmLanguage
JDispatcher / ad-hoc plugin import vDispatcher::trigger()
JHtml for VM forms VmHtml
JFile / JFolder / JPath vFile / vFolder / vPath
JUri vmUri
JRoute::_() still JRoute::_() — no vmRoute yet

Inside a proxy, Joomla may still be called. vmFactory is allowed to use JFactory. Your code is not allowed to call vmFactory from a method that is vmFactory. Do not replace the Joomla call inside the proxy with the proxy.

3. Tokens

<input type="hidden" name="<?php echo vRequest::getFormToken(); ?>" value="1" />

vRequest::vmCheckToken() or vmExit('Invalid Token');

State-changing form POSTs: token. PayPal webhooks: PayPal signature, not this token. JSON getMedia / getRelated: token and ACL.

4. Do’s and don’ts

  • Core / new helpers: VM names. Do not add JFactory in new core.
  • Third-party plugins: Joomla APIs still work in VM5. VM6 is when the plugin API itself gets typed and stricter.
  • Frontend layouts: no namespace VirtueMart (shop template BC). Backend layouts may use it.
  • Do not write bare Route::_(). The leftover is JRoute::_().

Plugin import order is a separate article: vDispatcher.