5/5 - (1 vote)

Within Joomla plugins, there are manifest files that have the name <extension_name>.xml . They contain general information about the installation and parameters for the configuration of the plugin itself.

In VirtueMart, those configuration parameters are used inside the component itself when creating a payment, shipment or a custom field.
Since VirtueMart 3, you can hide those parameters in Joomla Plugin manager by using the tag <vmconfig>.

To do it, you just change the <config>section in the plugin xml to <vmconfig>. If the plugin xml contains a <vmconfig>section, it is now used and does not appear in the Joomla plugin. If a plugin xml does not contain a <vmconfig> section, as a fallback the <config>section is used and in this case, it WILL appear in the Joomla plugin config).

Example:

<?xml version="1.0" encoding="UTF-8" ?>
<extension version="2.5" type="plugin" group="vmshipment" method="upgrade">
    <name>By weight, ZIP and countries</name>
   ....
    <languages>
        <language tag="en-GB">en-GB.plg_vmshipment_weight_countries.ini</language>
    </languages>
    <files>
        <filename plugin="weight_countries">weight_countries.php</filename>
        <folder>weight_countries</folder>
    </files>
    <vmconfig>
        <fields name="params">
            <fieldset name="restrictions">
                <field name="show_on_pdetails" type="radio" scope="com_virtuemart" default="1"
                               label="VMSHIPMENT_WEIGHT_COUNTRIES_SHOW_ON_PRDETAILS"
                               description="VMSHIPMENT_WEIGHT_COUNTRIES_SHOW_ON_PRDETAILS_TIP">
                            <option value="0">COM_VIRTUEMART_NO</option>
                            <option value="1">COM_VIRTUEMART_YES</option>
                </field>
                .....
            </fieldset>
        </fields>
    </vmconfig>
</extension>

If you have any question about this post, don’t hesitate to leave a comment below. And don’t forget to share with your friends if you find it useful! Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

Save 99% money with single purchase! Get All-In-One DEV package: Access all paid products! Unlimited Downloads with more than 300+ PRO items Sign Up Now!
Black Friday & Cyber Monday Sale! Get 50% OFF for your purchase on today! Coupon code: BFCM50 Redeem Now