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

Version 1.0: Fixed status selection box

parent 43928984
No related branches found
No related tags found
No related merge requests found
BASE=buyer_assign_group
PLUGINTYPE=vmcustom
ZIPBASE=opentools_vm2
VERSION=0.1
VERSION=1.0
PLUGINFILES=$(BASE).php $(BASE).script.php $(BASE).xml index.html
TRANSLATIONS=$(call wildcard,language/*/*.plg_$(PLUGINTYPE)_$(BASE).*ini) language/index.html $(call wildcard,language/*/index.html)
# INDEXFILES=$(BASE)/index.html
INDEXFILES=$(call wildcard,language/**/index.html) $(call wildcard,elements/*.html)
# ELEMENTS=$(call wildcard,elements/*.php)
ELEMENTS=$(call wildcard,elements/*)
# TMPLFILES=$(call wildcard,$(BASE)/tmpl/*.php) $(BASE)/index.html $(BASE)/tmpl/index.html
# ASSETS=$(call wildcard,$(BASE)/assets/*.png) $(call wildcard,$(BASE)/assets/*.css)
ZIPFILE=plg_$(ZIPBASE)_$(BASE)_v$(VERSION).zip
......
<?xml version="1.0" encoding="UTF-8" ?>
<install version="1.5" type="plugin" group="vmcustom" method="upgrade">
<name>VMCUSTOM_BUYER_GROUP</name>
<creationDate>2013-02-24</creationDate>
<creationDate>2013-09-28</creationDate>
<author>Reinhold Kainhofer</author>
<authorUrl>http://www.open-tools.net/</authorUrl>
<copyright>Copyright (C) 2013 Reinhold Kainhofer. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl.html GNU/GPL v3+</license>
<version>0.1</version>
<version>1.0</version>
<description>VMCUSTOM_BUYER_GROUP_DESC</description>
<files>
<filename plugin="buyer_assign_group">buyer_assign_group.php</filename>
<filename>buyer_assign_group.script.php</filename>
<filename>index.html</filename>
<folder>language</folder>
<folder>elements</folder>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_vmcustom_buyer_assign_group.ini</language>
......@@ -22,7 +23,7 @@
<params addpath="/plugins/vmcustom/buyer_assign_group/elements/" />
<params addpath="/administrator/components/com_virtuemart/elements/">
<param type="vmjpluginwarning" />
<param name="purchased_status" type="vmorderstates" default="C, S" multiple="multiple" label="VMCUSTOM_BUYER_GROUP_STATUS" description="VMCUSTOM_BUYER_GROUP_STATUS_DESC"/>
<param name="purchased_status" type="vmorderstates" default="C,S" multiple="multiple" label="VMCUSTOM_BUYER_GROUP_STATUS" description="VMCUSTOM_BUYER_GROUP_STATUS_DESC"/>
</params>
</install>
......
......@@ -14,13 +14,15 @@ defined ('_JEXEC') or die();
* other free or open source software licenses.
* @version $Id:$
*/
if (!class_exists('VmConfig')) require(JPATH_VM_ADMINISTRATOR.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php');
if(!class_exists('VmModel')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmmodel.php');
/*
* This class is used by VirtueMart Payment or Shipment Plugins
* which uses JParameter
* So It should be an extension of JElement
* Those plugins cannot be configured througth the Plugin Manager anyway.
*/
class JElementVmOrderStates extends JElement {
/**
......@@ -32,22 +34,10 @@ class JElementVmOrderStates extends JElement {
var $_name = 'OrderStates';
function fetchElement ($name, $value, &$node, $control_name) {
$db = JFactory::getDBO ();
$query = 'SELECT `order_status_code` AS value, `order_status_name` AS text
FROM `#__virtuemart_orderstates`
WHERE `virtuemart_vendor_id` = 1
ORDER BY `ordering` ASC ';
$db->setQuery ($query);
$fields = $db->loadObjectList ();
$statusModel = VmModel::getModel('OrderStatus');
$fields = $statusModel->getOrderStatusNames();
$class = 'class="inputbox" multiple="multiple" size="6" ';
foreach ($fields as $field) {
$field->text= JText::_ ($field->text);
}
return JHTML::_ ('select.genericlist', $fields, $control_name . '[' . $name . '][]', $class, 'value', 'text', $value, $control_name . $name);
return JHTML::_ ('select.genericlist', $fields, $control_name . '[' . $name . '][]', $class, 'order_status_code', 'order_status_name', $value, $control_name . $name, true);
}
}
images/vm_buyer_groups_customfield_new.png

103 KiB

images/vm_buyer_groups_customfield_product.png

111 KiB

images/vm_buyer_groups_install.png

41.9 KiB

No preview for this file type
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment