0byt3m1n1-V2
Path:
/
home
/
a
/
c
/
a
/
academiac
/
www
/
[
Home
]
File: mod_virtuemart_category.tar
mod_virtuemart_category.xml 0000666 00000006766 15137277672 0012270 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE install SYSTEM "http://www.joomla.org/xml/dtd/1.5/module-install.dtd"> <install type="module" version="1.5.0"> <name>mod_virtuemart_category</name> <creationDate>January 10 2014</creationDate> <author>The VirtueMart Development Team</author> <authorUrl>http://www.virtuemart.net</authorUrl> <copyright>${PHING.VM.COPYRIGH}</copyright> <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license> <version>2.0.26d</version> <description>MOD_VIRTUEMART_CATEGORY_DESC</description> <files> <filename module="mod_virtuemart_category">mod_virtuemart_category.php</filename> <filename>helper.php</filename> <filename>index.html</filename> <filename>tmpl/all.php</filename> <filename>tmpl/current.php</filename> <filename>tmpl/default.php</filename> <filename>tmpl/index.html</filename> <folder>language</folder> </files> <languages folder="language"> <language tag="en-GB">en-GB/en-GB.mod_virtuemart_category.ini</language> <language tag="en-GB">en-GB/en-GB.mod_virtuemart_category.sys.ini</language> </languages> <params addpath="/administrator/components/com_virtuemart/elements"> <param name="Parent_Category_id" type="vmcategories" value_field="category_name" label="MOD_VIRTUEMART_CATEGORY_PARENT_CATEGORY" description="MOD_VIRTUEMART_CATEGORY_PARENT_CATEGORY_DESC" /> <param name="layout" type="filelist" label="MOD_VIRTUEMART_CATEGORY_LAYOUT" description="MOD_VIRTUEMART_CATEGORY_LAYOUT_DESC" directory="/modules/mod_virtuemart_category/tmpl" default="default" hide_default="1" hide_none="1" stripext="1" filter="\.php$" exclude="^_" /> <param name="cache" type="radio" default="0" label="Enable Cache" description="Select whether to cache the content of this module"> <option value="0">No</option> <option value="1">Yes</option> </param> <param name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="A suffix to be applied to the css class of the module (table.moduletable), this allows individual module styling" /> <param name="class_sfx" type="text" default="" label="Menu Class Suffix" description="A suffix to be applied to the css class of the menu items" /> </params> <config> <fields name = "params"> <fieldset name="basic" addfieldpath="/administrator/components/com_virtuemart/elements"> <field name="Parent_Category_id" type="vmcategories" value_field="category_name" label="MOD_VIRTUEMART_CATEGORY_PARENT_CATEGORY" description="MOD_VIRTUEMART_CATEGORY_PARENT_CATEGORY_DESC" /> <field name="layout" type="filelist" label="MOD_VIRTUEMART_CATEGORY_LAYOUT" description="MOD_VIRTUEMART_CATEGORY_LAYOUT_DESC" directory="/modules/mod_virtuemart_category/tmpl" default="default" hide_default="1" hide_none="1" stripext="1" filter="\.php$" exclude="^_" /> <field name="cache" type="list" default="1" label="COM_MODULES_FIELD_CACHING_LABEL" description="COM_MODULES_FIELD_CACHING_DESC" > <option value="0">No</option> <option value="1">Yes</option> </field> <field name="moduleclass_sfx" type="text" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" /> <field name="class_sfx" type="text" default="" label="Menu Class Suffix" description="A suffix to be applied to the css class of the menu items" /> </fieldset> </fields> </config> </install> mod_virtuemart_category.php 0000666 00000004640 15137277672 0012244 0 ustar 00 <?php defined('_JEXEC') or die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); /* * Best selling Products module for VirtueMart * @version $Id: mod_virtuemart_category.php 1160 2008-01-14 20:35:19Z soeren_nb $ * @package VirtueMart * @subpackage modules * * @copyright (C) John Syben (john@webme.co.nz) * Conversion to Mambo and the rest: * @copyright (C) 2004-2005 Soeren Eberhardt * * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * VirtueMart is Free Software. * VirtueMart comes with absolute no warranty. * * www.virtuemart.net *---------------------------------------------------------------------- * This code creates a list of the bestselling products * and displays it wherever you want *---------------------------------------------------------------------- */ /* Load VM fonction */ require('helper.php'); if (!class_exists( 'VmConfig' )) require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'helpers'.DS.'config.php'); VmConfig::loadConfig(); VmConfig::loadJLang('mod_virtuemart_category', true); vmJsApi::jQuery(); vmJsApi::cssSite(); /* Setting */ $categoryModel = VmModel::getModel('Category'); $category_id = $params->get('Parent_Category_id', 0); $class_sfx = $params->get('class_sfx', ''); $moduleclass_sfx = $params->get('moduleclass_sfx',''); $layout = $params->get('layout','default'); $active_category_id = JRequest::getInt('virtuemart_category_id', '0'); $vendorId = '1'; $categories = $categoryModel->getChildCategoryList($vendorId, $category_id); // We dont use image here //$categoryModel->addImages($categories); if(empty($categories)) return false; foreach ($categories as $category) { //$category->childs = VirtueMartModelCategory::getChildCategoryList($vendorId, $category->virtuemart_category_id); //$category->childs = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $category->virtuemart_category_id ); $category->childs = $categoryModel->getChildCategoryList($vendorId, $category->virtuemart_category_id) ; // No image used here //$categoryModel->addImages($category->childs); } // $catTree = $categoryModel->getCategoriesInfo($vendorId=1 ); // echo json_encode($catTree,JSON_FORCE_OBJECT); $parentCategories = $categoryModel->getCategoryRecurse($active_category_id,0); /* Laod tmpl default */ require(JModuleHelper::getLayoutPath('mod_virtuemart_category',$layout)); ?>