$GLOBALS['TL_MODELS'][\Isotope\Model\Payment::getTable()] = 'Isotope\\Model\\Payment'; $GLOBALS['TL_MODELS'][\Isotope\Model\Product::getTable()] = 'Isotope\\Model\\Product'; $GLOBALS['TL_MODELS'][\Isotope\Model\ProductCategory::getTable()] = 'Isotope\\Model\\ProductCategory'; $GLOBALS['TL_MODELS'][\Isotope\Model\ProductCollection::getTable()] = 'Isotope\\Model\\ProductCollection'; $GLOBALS['TL_MODELS'][\Isotope\Model\ProductCollectionDownload::getTable()] = 'Isotope\\Model\\ProductCollectionDownload'; $GLOBALS['TL_MODELS'][\Isotope\Model\ProductCollectionItem::getTable()] = 'Isotope\\Model\\ProductCollectionItem'; $GLOBALS['TL_MODELS'][\Isotope\Model\ProductCollectionSurcharge::getTable()] = 'Isotope\\Model\\ProductCollectionSurcharge'; $GLOBALS['TL_MODELS'][\Isotope\Model\ProductPrice::getTable()] = 'Isotope\\Model\\ProductPrice'; $GLOBALS['TL_MODELS'][\Isotope\Model\ProductCache::getTable()] = 'Isotope\\Model\\ProductCache'; $GLOBALS['TL_MODELS'][\Isotope\Model\ProductType::getTable()] = 'Isotope\\Model\\ProductType'; $GLOBALS['TL_MODELS'][\Isotope\Model\RelatedCategory::getTable()] = 'Isotope\\Model\\RelatedCategory'; $GLOBALS['TL_MODELS'][\Isotope\Model\RelatedProduct::getTable()] = 'Isotope\\Model\\RelatedProduct'; $GLOBALS['TL_MODELS'][\Isotope\Model\RequestCache::getTable()] = 'Isotope\\Model\\RequestCache'; $GLOBALS['TL_MODELS'][\Isotope\Model\Shipping::getTable()] = 'Isotope\\Model\\Shipping'; $GLOBALS['TL_MODELS'][\Isotope\Model\TaxClass::getTable()] = 'Isotope\\Model\\TaxClass'; $GLOBALS['TL_MODELS'][\Isotope\Model\TaxRate::getTable()] = 'Isotope\\Model\\TaxRate'; /** * Checkout steps */ $GLOBALS['ISO_CHECKOUTSTEP'] = array('address' => array('\\Isotope\\CheckoutStep\\BillingAddress', '\\Isotope\\CheckoutStep\\ShippingAddress'), 'shipping' => array('\\Isotope\\CheckoutStep\\ShippingMethod'), 'payment' => array('\\Isotope\\CheckoutStep\\PaymentMethod'), 'review' => array('\\Isotope\\CheckoutStep\\OrderConditionsOnTop', '\\Isotope\\CheckoutStep\\OrderInfo', '\\Isotope\\CheckoutStep\\OrderConditionsBeforeProducts', '\\Isotope\\CheckoutStep\\OrderProducts', '\\Isotope\\CheckoutStep\\OrderConditionsAfterProducts')); /** * Permissions are access settings for user and groups (fields in tl_user and tl_user_group) */ $GLOBALS['TL_PERMISSIONS'][] = 'iso_modules'; $GLOBALS['TL_PERMISSIONS'][] = 'iso_product_types'; $GLOBALS['TL_PERMISSIONS'][] = 'iso_product_typep'; $GLOBALS['TL_PERMISSIONS'][] = 'iso_payment_modules'; $GLOBALS['TL_PERMISSIONS'][] = 'iso_payment_modulep'; $GLOBALS['TL_PERMISSIONS'][] = 'iso_shipping_modules'; $GLOBALS['TL_PERMISSIONS'][] = 'iso_shipping_modulep'; $GLOBALS['TL_PERMISSIONS'][] = 'iso_tax_rates';
<?php /** * Isotope eCommerce for Contao Open Source CMS * * Copyright (C) 2009-2014 terminal42 gmbh & Isotope eCommerce Workgroup * * @package Isotope * @link http://isotopeecommerce.org * @license http://opensource.org/licenses/lgpl-3.0.html */ /** * Table tl_iso_tax_class */ $GLOBALS['TL_DCA']['tl_iso_tax_class'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'closed' => true, 'onload_callback' => array(array('Isotope\\Backend', 'initializeSetupModule'), array('Isotope\\Backend\\TaxClass\\Callback', 'checkPermission')), 'sql' => array('keys' => array('id' => 'primary'))), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('name'), 'flag' => 1, 'panelLayout' => 'filter;search,limit'), 'label' => array('fields' => array('name', 'fallback'), 'format' => '%s <span style="color:#b3b3b3; padding-left:3px;">[%s]</span>'), 'global_operations' => array('back' => array('label' => &$GLOBALS['TL_LANG']['MSC']['backBT'], 'href' => 'mod=&table=', 'class' => 'header_back', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'new' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['new'], 'href' => 'act=create', 'class' => 'header_new', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif', 'button_callback' => array('Isotope\\Backend\\TaxClass\\Callback', 'copyTaxClass')), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"', 'button_callback' => array('Isotope\\Backend\\TaxClass\\Callback', 'deleteTaxClass')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('default' => '{name_legend},name,fallback;{rate_legend},includes,label,rates,applyRoundingIncrement,notNegative'), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'name' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['name'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'fallback' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['fallback'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('fallback' => true, 'tl_class' => 'w50 m12'), 'sql' => "char(1) NOT NULL default ''"), 'includes' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['includes'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\TaxRate::getTable() . '.name', 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'eager')), 'label' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['label'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'rates' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['rates'], 'exclude' => true, 'inputType' => 'checkboxWizard', 'foreignKey' => \Isotope\Model\TaxRate::getTable() . '.name', 'eval' => array('multiple' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'applyRoundingIncrement' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['applyRoundingIncrement'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'notNegative' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_tax_class']['notNegative'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''")));
/** * Set the currency rate from selected store config * @param object */ public function addCurrencyRate($dc) { $objTaxRate = TaxRate::findByPk($dc->id); if ($objTaxRate->config > 0 && null !== $objTaxRate->getRelated('config')) { $GLOBALS['TL_DCA']['tl_iso_tax_rate']['fields']['rate']['options'][''] = $objTaxRate->getRelated('config')->currency; } }
* * Copyright (C) 2009-2014 terminal42 gmbh & Isotope eCommerce Workgroup * * @package Isotope * @link http://isotopeecommerce.org * @license http://opensource.org/licenses/lgpl-3.0.html */ \System::loadLanguageFile(\Isotope\Model\Group::getTable()); /** * Extend tl_user palettes */ $GLOBALS['TL_DCA']['tl_user']['palettes']['extend'] = str_replace('{account_legend}', '{isotope_legend},iso_modules,iso_product_types,iso_product_typep,iso_payment_modules,iso_payment_modulep,iso_shipping_modules,iso_shipping_modulep,iso_tax_classes,iso_tax_classp,iso_tax_rates,iso_tax_ratep,iso_configs,iso_configp,iso_groups,iso_groupp;{account_legend}', $GLOBALS['TL_DCA']['tl_user']['palettes']['extend']); $GLOBALS['TL_DCA']['tl_user']['palettes']['custom'] = str_replace('{account_legend}', '{isotope_legend},iso_modules,iso_product_types,iso_product_typep,iso_payment_modules,iso_payment_modulep,iso_shipping_modules,iso_shipping_modulep,iso_tax_classes,iso_tax_classp,iso_tax_rates,iso_tax_ratep,iso_configs,iso_configp,iso_groups,iso_groupp;{account_legend}', $GLOBALS['TL_DCA']['tl_user']['palettes']['custom']); /** * Add fields to tl_user */ $GLOBALS['TL_DCA']['tl_user']['fields']['iso_modules'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_modules'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkbox', 'options_callback' => array('Isotope\\Backend', 'getIsotopeModules'), 'reference' => &$GLOBALS['TL_LANG']['IMD'], 'eval' => array('multiple' => true, 'helpwizard' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_product_types'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_product_types'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => \Isotope\Model\ProductType::getTable() . '.name', 'eval' => array('multiple' => true, 'helpwizard' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_product_typep'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_product_typep'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('create', 'delete'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('multiple' => true, 'tl_class' => 'w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_payment_modules'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_payment_modules'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => \Isotope\Model\Payment::getTable() . '.name', 'eval' => array('multiple' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_payment_modulep'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_payment_modulep'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('create', 'delete'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('multiple' => true, 'tl_class' => 'w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_shipping_modules'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_shipping_modules'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => \Isotope\Model\Shipping::getTable() . '.name', 'eval' => array('multiple' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_shipping_modulep'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_shipping_modulep'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('create', 'delete'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('multiple' => true, 'tl_class' => 'w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_tax_classes'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_tax_classes'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => \Isotope\Model\TaxClass::getTable() . '.name', 'eval' => array('multiple' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_tax_classp'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_tax_classp'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('create', 'delete'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('multiple' => true, 'tl_class' => 'w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_tax_rates'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_tax_rates'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => \Isotope\Model\TaxRate::getTable() . '.name', 'eval' => array('multiple' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_tax_ratep'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_tax_ratep'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('create', 'delete'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('multiple' => true, 'tl_class' => 'w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_configs'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_configs'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => \Isotope\Model\Config::getTable() . '.name', 'eval' => array('multiple' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_configp'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_configp'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('create', 'delete'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('multiple' => true, 'tl_class' => 'w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_groups'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_groups'], 'exclude' => true, 'inputType' => 'checkbox', 'options_callback' => array('\\Isotope\\Backend\\User\\Callback', 'getGroups'), 'eval' => array('multiple' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => 'blob NULL'); $GLOBALS['TL_DCA']['tl_user']['fields']['iso_groupp'] = array('label' => &$GLOBALS['TL_LANG']['tl_user']['iso_groupp'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('create', 'delete', 'rootPaste'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('multiple' => true, 'tl_class' => 'w50 w50h'), 'sql' => 'blob NULL');