Skip to content
Snippets Groups Projects
Commit 60e48eeb authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Fix warnings, correct plugin template

parent c4556fcb
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ class plgVmShopperOrdernumberInstallerScript
public function install(JAdapterInstance $adapter)
{
// enabling plugin
$db =& JFactory::getDBO();
$db = JFactory::getDBO();
$db->setQuery('update #__extensions set enabled = 1 where type = "plugin" and element = "ordernumber" and folder = "vmshopper"');
$db->query();
......
BASE=YOUR_PLUGIN_NAME
PLUGINTYPE=vmshipmentrules
ZIPBASE=opentools_vmshipmentrules
PLUGINTYPE=vmshopper
ZIPBASE=opentools_vmshopper
VERSION=1.0
PLUGINFILES=$(BASE).php $(BASE).script.php $(BASE).xml index.html
TRANSLATIONS=$(call wildcard,language/en*/*.plg_$(PLUGINTYPE)_$(BASE).*ini)
INDEXFILES=language/index.html $(call wildcard,language/**/index.html)
FIELDS=$(call wildcard,fields/*)
ZIPFILE=plg_$(ZIPBASE)_$(BASE)_v$(VERSION).zip
all: zip
zip: $(PLUGINFILES) $(TRANSLATIONS) $(ADVANCEDFILES) $(INDEXFILES)
@echo "Packing all files into distribution file $(ZIPFILE):"
@zip -r $(ZIPFILE) $(PLUGINFILES) $(TRANSLATIONS) $(INDEXFILES)
@zip -r $(ZIPFILE) $(PLUGINFILES) $(TRANSLATIONS) $(INDEXFILES) $(FIELDS)
clean:
rm -f $(ZIPFILE)
......@@ -5,7 +5,6 @@ defined ('_JEXEC') or die('Restricted access');
/**
* Plugin providing Custom variables for the VM Ordernumber plugin
*
* @subpackage Plugins - VmShipmentRules
* @copyright Copyright (C) 2014 Reinhold Kainhofer, office@open-tools.net
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
......@@ -17,13 +16,14 @@ defined ('_JEXEC') or die('Restricted access');
* http://open-tools.net/
*
*/
if (!class_exists ('VmPlugin')) {
require(JPATH_VM_PLUGINS . DS . 'vmplugin.php');
}
if (!class_exists('vmShopperPlugin'))
require(JPATH_VM_PLUGINS . DS . 'vmshopperplugin.php');
/** Extension plugin for the Odernumber plugin for VirtueMart
/** Extension plugin for the Ordernumber plugin for VirtueMart
*/
class plgVmShopperYOUR_PLUGIN_NAME extends VmPlugin {
class plgVmShopperYOUR_PLUGIN_NAME extends VmShopperPlugin {
// Unfortunately, this dummy function needs to be implementd, because it's abstract in the parent class!
public function plgVmOnUpdateOrderBEShopper($_orderID) {}
/** Trigger to add variables to be used in the number formats
* You can add new variables to the $cartvals array or modify existing ones. They will be directly
* available in all formats. This trigger will be called whenever the ordernumber plugin creates a
......
......@@ -49,7 +49,7 @@ class plgVmShopperYOUR_PLUGIN_NAMEInstallerScript
public function install(JAdapterInstance $adapter)
{
// enabling plugin upon installation
$db =& JFactory::getDBO();
$db = JFactory::getDBO();
$db->setQuery('update #__extensions set enabled = 1 where type = "plugin" and element = "YOUR_PLUGIN_NAME" and folder = "vmshopper"');
$db->query();
......
......@@ -18,10 +18,7 @@
</languages>
<scriptfile>YOUR_PLUGIN_NAME.script.php</scriptfile>
<!-- VM 3.x support (fields rather than params): -->
<vmconfig></vmconfig>
<!-- VM 2.0 support (params rather than fields): -->
<params></params>
<!-- Joomla 2.x and 3.x support (fields rather than params): -->
<config></config>
</extension>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment