Esempio n. 1
0
 /**
  * Fill the object's arrProducts array
  * @param   array|null
  * @return  array
  */
 protected function findProducts($arrCacheIds = null)
 {
     $t = Product::getTable();
     $arrColumns = array();
     $arrCategories = $this->findCategories();
     $arrProductIds = \Database::getInstance()->query("SELECT pid FROM " . ProductCategory::getTable() . " WHERE page_id IN (" . implode(',', $arrCategories) . ")")->fetchEach('pid');
     $arrTypes = \Database::getInstance()->query("SELECT id FROM " . ProductType::getTable() . " WHERE variants='1'")->fetchEach('id');
     if (empty($arrProductIds)) {
         return array();
     }
     list($arrFilters, $arrSorting, $strWhere, $arrValues) = $this->getFiltersAndSorting();
     if (!is_array($arrValues)) {
         $arrValues = array();
     }
     $arrColumns[] = "(\n            ({$t}.id IN (" . implode(',', $arrProductIds) . ") AND {$t}.type NOT IN (" . implode(',', $arrTypes) . "))\n            OR {$t}.pid IN (" . implode(',', $arrProductIds) . ")\n        )";
     if (!empty($arrCacheIds) && is_array($arrCacheIds)) {
         $arrColumns[] = Product::getTable() . ".id IN (" . implode(',', $arrCacheIds) . ")";
     }
     // Apply new/old product filter
     if ($this->iso_newFilter == 'show_new') {
         $arrColumns[] = Product::getTable() . ".dateAdded>=" . Isotope::getConfig()->getNewProductLimit();
     } elseif ($this->iso_newFilter == 'show_old') {
         $arrColumns[] = Product::getTable() . ".dateAdded<" . Isotope::getConfig()->getNewProductLimit();
     }
     if ($this->iso_list_where != '') {
         $arrColumns[] = Haste::getInstance()->call('replaceInsertTags', $this->iso_list_where);
     }
     if ($strWhere != '') {
         $arrColumns[] = $strWhere;
     }
     $objProducts = Product::findAvailableBy($arrColumns, $arrValues, array('order' => 'c.sorting', 'filters' => $arrFilters, 'sorting' => $arrSorting));
     return null === $objProducts ? array() : $objProducts->getModels();
 }
Esempio n. 2
0
 /**
  * Handle the paste button callback for tl_iso_product
  * @param DataContainer
  * @param array
  * @param string
  * @param bool
  * @param array
  * @return string
  * @link http://www.contao.org/callbacks.html#paste_button_callback
  */
 public function generate(\DataContainer $dc, $row, $table, $cr, $arrClipboard = false)
 {
     // Disable all buttons if there is a circular reference
     if ($arrClipboard !== false && ($arrClipboard['mode'] == 'cut' && ($cr == 1 || $arrClipboard['id'] == $row['id']) || $arrClipboard['mode'] == 'cutAll' && ($cr == 1 || in_array($row['id'], $arrClipboard['id'])))) {
         return '';
     }
     $objProduct = \Database::getInstance()->prepare("SELECT p.*, t.variants FROM " . \Isotope\Model\Product::getTable() . " p LEFT JOIN " . ProductType::getTable() . " t ON p.type=t.id WHERE p.id=?")->execute($arrClipboard['id']);
     // Copy or cut a single product or variant
     if ($arrClipboard['mode'] == 'cut' || $arrClipboard['mode'] == 'copy') {
         return $this->pasteVariant($objProduct, $table, $row, $arrClipboard);
     } elseif ($arrClipboard['mode'] == 'cutAll' || $arrClipboard['mode'] == 'copyAll') {
         return $this->pasteAll($objProduct, $table, $row, $arrClipboard);
     }
     $this->Session->set('CLIPBOARD', null);
     throw new \InvalidArgumentException('Unhandled paste_button_callback mode "' . $arrClipboard['mode'] . '"');
 }
<?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
 */
/**
 * Load tl_iso_product data container and language files
 */
$this->loadDataContainer('tl_iso_product');
\System::loadLanguageFile('tl_iso_product');
/**
 * Table tl_iso_shipping
 */
$GLOBALS['TL_DCA']['tl_iso_shipping'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'closed' => true, 'onload_callback' => array(array('Isotope\\Backend', 'initializeSetupModule'), array('Isotope\\Backend\\Shipping\\Callback', 'checkPermission')), 'sql' => array('keys' => array('id' => 'primary'))), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('name'), 'flag' => 1, 'panelLayout' => 'sort,filter;search,limit'), 'label' => array('fields' => array('name', 'type'), '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_shipping']['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_shipping']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif', 'button_callback' => array('Isotope\\Backend\\Shipping\\Callback', 'copyShippingModule')), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['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\\Shipping\\Callback', 'deleteShippingModule')), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => array('Isotope\\Backend\\Shipping\\Callback', 'toggleIcon')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type', 'protected'), 'default' => '{title_legend},name,label,type', 'flat' => '{title_legend},name,label,type;{note_legend:hide},note;{price_legend},price,tax_class,flatCalculation;{config_legend},countries,subdivisions,postalCodes,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,minimum_weight,maximum_weight,product_types,product_types_condition,config_ids;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'group' => '{title_legend},name,label,type;{note_legend:hide},note;{config_legend},group_methods;{price_legend},group_calculation,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},enabled'), 'subpalettes' => array('protected' => 'groups'), '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_shipping']['name'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'label' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['label'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['type'], 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'default' => 'flat', 'options_callback' => function () {
    return \Isotope\Model\Shipping::getModelTypeOptions();
}, 'eval' => array('helpwizard' => true, 'submitOnChange' => true, 'chosen' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'note' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['note'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('rte' => 'tinyMCE', 'decodeEntities' => true), 'sql' => "text NULL"), 'countries' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['countries'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => function () {
    return \System::getCountries();
}, 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'w50 w50h', 'chosen' => true), 'sql' => "blob NULL"), 'subdivisions' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['subdivisions'], 'exclude' => true, 'sorting' => true, 'inputType' => 'conditionalselect', 'options_callback' => array('Isotope\\Backend', 'getSubdivisions'), 'eval' => array('multiple' => true, 'size' => 8, 'conditionField' => 'countries', 'tl_class' => 'w50 w50h'), 'sql' => "longblob NULL"), 'postalCodes' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['postalCodes'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('style' => 'height:40px', 'tl_class' => 'clr'), 'sql' => "text NULL"), 'minimum_total' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['minimum_total'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 13, 'rgxp' => 'price', 'tl_class' => 'w50'), 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'maximum_total' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['maximum_total'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 13, 'rgxp' => 'price', 'tl_class' => 'w50'), 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'minimum_weight' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['minimum_weight'], 'exclude' => true, 'default' => array('unit' => 'kg'), 'inputType' => 'timePeriod', 'options' => array('mg', 'g', 'kg', 't', 'ct', 'oz', 'lb', 'st', 'grain'), 'reference' => &$GLOBALS['TL_LANG']['WGT'], 'eval' => array('rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'maximum_weight' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['maximum_weight'], 'exclude' => true, 'default' => array('unit' => 'kg'), 'inputType' => 'timePeriod', 'options' => array('mg', 'g', 'kg', 't', 'ct', 'oz', 'lb', 'st', 'grain'), 'reference' => &$GLOBALS['TL_LANG']['WGT'], 'eval' => array('rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'quantity_mode' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['quantity_mode'], 'exclude' => true, 'inputType' => 'select', 'options' => array('cart_items', 'cart_products'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['quantity_mode'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'minimum_quantity' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['minimum_quantity'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'clr w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'maximum_quantity' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['maximum_quantity'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'product_types' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['product_types'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\ProductType::getTable() . '.name', 'eval' => array('multiple' => true, 'size' => 8, 'chosen' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'product_types_condition' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['product_types_condition'], 'exclude' => true, 'inputType' => 'select', 'options' => array('onlyAvailable', 'allAvailable', 'oneAvailable', 'calculation'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_shipping'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'config_ids' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['config_ids'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\Config::getTable() . '.name', 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'clr w50 w50h', 'chosen' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'price' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['price'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 16, 'rgxp' => 'surcharge', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'tax_class' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['tax_class'], 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\TaxClass::getTable() . '.name', 'options_callback' => array('\\Isotope\\Model\\TaxClass', 'getOptionsWithSplit'), 'eval' => array('includeBlankOption' => true, 'blankOptionLabel' => &$GLOBALS['TL_LANG']['MSC']['taxFree'], 'tl_class' => 'w50'), 'sql' => "int(10) NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'flatCalculation' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['flatCalculation'], 'exclude' => true, 'inputType' => 'select', 'options' => array('flat', 'perProduct', 'perItem'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_shipping'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'group_methods' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['group_methods'], 'exclude' => true, 'inputType' => 'checkboxWizard', 'options_callback' => function ($dc) {
    $objShipping = \Isotope\Model\Shipping::findBy(array($dc->table . '.id!=?'), $dc->id);
    return null === $objShipping ? array() : $objShipping->fetchEach('name');
}, 'eval' => array('mandatory' => true, 'multiple' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => "blob NULL"), 'group_calculation' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['group_calculation'], 'exclude' => true, 'inputType' => 'select', 'options' => array('first', 'lowest', 'highest', 'summarize'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_shipping'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'guests' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['guests'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'protected' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['protected'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'groups' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['groups'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => 'tl_member_group.name', 'eval' => array('multiple' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'enabled' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_shipping']['enabled'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''")));
Esempio n. 4
0
$GLOBALS['TL_MODELS'][\Isotope\Model\Document::getTable()] = 'Isotope\\Model\\Document';
$GLOBALS['TL_MODELS'][\Isotope\Model\Download::getTable()] = 'Isotope\\Model\\Download';
$GLOBALS['TL_MODELS'][\Isotope\Model\Gallery::getTable()] = 'Isotope\\Model\\Gallery';
$GLOBALS['TL_MODELS'][\Isotope\Model\Group::getTable()] = 'Isotope\\Model\\Group';
$GLOBALS['TL_MODELS'][\Isotope\Model\Label::getTable()] = 'Isotope\\Model\\Label';
$GLOBALS['TL_MODELS'][\Isotope\Model\OrderStatus::getTable()] = 'Isotope\\Model\\OrderStatus';
$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';
Esempio n. 5
0
<?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_group
 */
$GLOBALS['TL_DCA']['tl_iso_group'] = array('config' => array('dataContainer' => 'Table', 'label' => &$GLOBALS['TL_LANG']['tl_iso_group']['label'], 'backlink' => \Input::get('popup') ? null : 'do=iso_products', 'enableVersioning' => true, 'onload_callback' => array(array('Isotope\\Backend\\Group\\Callback', 'checkPermission')), 'ondelete_callback' => array(array('Isotope\\Backend\\Group\\Callback', 'deleteGroup')), 'sql' => array('keys' => array('id' => 'primary', 'pid' => 'index'))), 'list' => array('sorting' => array('mode' => 5, 'fields' => array('sorting'), 'flag' => 1, 'icon' => 'system/modules/isotope/assets/images/folders.png'), 'label' => array('fields' => array('name'), 'format' => '%s', 'label_callback' => array('Isotope\\Backend\\Group\\Callback', 'addIcon')), 'global_operations' => array('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_group']['edit'], 'href' => 'table=tl_iso_group&amp;act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_group']['copy'], 'href' => 'table=tl_iso_group&amp;act=paste&amp;mode=copy', 'icon' => 'copy.gif', 'attributes' => 'onclick="Backend.getScrollOffset()"', 'button_callback' => array('Isotope\\Backend\\Group\\Callback', 'copyButton')), 'copyChilds' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_group']['copyChilds'], 'href' => 'table=tl_iso_group&amp;act=paste&amp;mode=copy&amp;childs=1', 'icon' => 'copychilds.gif', 'attributes' => 'onclick="Backend.getScrollOffset()"', 'button_callback' => array('Isotope\\Backend\\Group\\Callback', 'copyButton')), 'cut' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_group']['cut'], 'href' => 'table=tl_iso_group&amp;act=paste&amp;mode=cut', 'icon' => 'cut.gif', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_group']['delete'], 'href' => 'table=tl_iso_group&amp;act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"', 'button_callback' => array('Isotope\\Backend\\Group\\Callback', 'deleteButton')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_group']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('default' => '{group_legend},name,product_type;'), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'pid' => array('foreignKey' => 'tl_iso_group.name', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'belongsTo', 'load' => 'lazy')), 'sorting' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'name' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_group']['name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'product_type' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_group']['product_type'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\ProductType::getTable() . '.name', 'options_callback' => array('Isotope\\Backend\\ProductType\\Callback', 'getOptions'), 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'eager'))));
<?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_payment
 */
$GLOBALS['TL_DCA']['tl_iso_payment'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'closed' => true, 'onload_callback' => array(array('Isotope\\Backend', 'initializeSetupModule'), array('Isotope\\Backend\\Payment\\Callback', 'checkPermission'), array('Isotope\\Backend\\Payment\\Callback', 'loadShippingModules')), 'sql' => array('keys' => array('id' => 'primary'))), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('name'), 'flag' => 1, 'panelLayout' => 'sort,filter;search,limit'), 'label' => array('fields' => array('name', 'type'), '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_payment']['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_payment']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif', 'button_callback' => array('Isotope\\Backend\\Payment\\Callback', 'copyPaymentModule')), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['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\\Payment\\Callback', 'deletePaymentModule')), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => array('Isotope\\Backend\\Payment\\Callback', 'toggleIcon')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type', 'protected'), 'default' => '{type_legend},name,label,type', 'cash' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'paybyway' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},paybyway_merchant_id,paybyway_private_key;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'paypal' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},paypal_account;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'postfinance' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},psp_pspid,psp_http_method,psp_hash_method,psp_hash_in,psp_hash_out,psp_dynamic_template,psp_payment_method;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'viveum' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},psp_pspid,psp_http_method,psp_hash_method,psp_hash_in,psp_hash_out,psp_dynamic_template;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'datatrans' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,trans_type,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},datatrans_id,datatrans_sign;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'innopay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},vads_site_id,vads_certificate;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'sparkasse' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend:hide},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},sparkasse_paymentmethod,trans_type,sparkasse_sslmerchant,sparkasse_sslpassword,sparkasse_merchantref;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'sofortueberweisung' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend:hide},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},trans_type,sofortueberweisung_user_id,sofortueberweisung_project_id,sofortueberweisung_project_password;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'saferpay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},saferpay_accountid,trans_type,saferpay_description,saferpay_vtconfig,saferpay_paymentmethods;{price_legend:hide},price,tax_class;{enabled_legend},enabled', 'billpay_saferpay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},saferpay_accountid,trans_type,saferpay_description,saferpay_vtconfig,saferpay_paymentmethods;{price_legend:hide},price,tax_class;{enabled_legend},enabled', 'expercash' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},expercash_popupId,expercash_profile,expercash_popupKey,expercash_paymentMethod;{price_legend:hide},price,tax_class;{template_legend},expercash_css;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'epay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},trans_type,epay_windowstate,epay_merchantnumber,epay_secretkey;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'payone' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},trans_type,payone_clearingtype,payone_aid,payone_portalid,payone_key;{price_legend:hide},price,tax_class;{enabled_legend},debug,enabled', 'worldpay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},worldpay_instId,worldpay_callbackPW,worldpay_signatureFields,worldpay_md5secret,worldpay_description;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'quickpay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,trans_type,quantity_mode,minimum_quantity,maximum_quantity,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},quickpay_merchantId,quickpay_agreementId,quickpay_apiKey,quickpay_privateKey,quickpay_paymentMethods;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled'), 'subpalettes' => array('protected' => 'groups'), '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_payment']['name'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'label' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['label'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['type'], 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'default' => 'cash', 'options_callback' => function () {
    return \Isotope\Model\Payment::getModelTypeOptions();
}, 'eval' => array('includeBlankOption' => true, 'helpwizard' => true, 'submitOnChange' => true, 'chosen' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'note' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['note'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('rte' => 'tinyMCE'), 'sql' => "text NULL"), 'new_order_status' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['new_order_status'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\OrderStatus::getTable() . '.name', 'options_callback' => array('\\Isotope\\Backend', 'getOrderStatus'), 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "int(10) NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'price' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['price'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 16, 'rgxp' => 'surcharge', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'tax_class' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['tax_class'], 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\TaxClass::getTable() . '.name', 'options_callback' => array('\\Isotope\\Model\\TaxClass', 'getOptionsWithSplit'), 'eval' => array('includeBlankOption' => true, 'blankOptionLabel' => &$GLOBALS['TL_LANG']['MSC']['taxFree'], 'tl_class' => 'w50'), 'sql' => "int(10) NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'allowed_cc_types' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['allowed_cc_types'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkbox', 'options_callback' => array('Isotope\\Backend\\Payment\\Callback', 'getAllowedCCTypes'), 'eval' => array('multiple' => true, 'tl_class' => 'clr'), 'sql' => "text NULL"), 'trans_type' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['trans_type'], 'exclude' => true, 'default' => 'capture', 'inputType' => 'select', 'options' => array('capture', 'auth'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'helpwizard' => true), 'reference' => $GLOBALS['TL_LANG']['tl_iso_payment'], 'sql' => "varchar(8) NOT NULL default ''"), 'minimum_total' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['minimum_total'], 'exclude' => true, 'inputType' => 'text', 'default' => 0, 'eval' => array('maxlength' => 255, 'rgxp' => 'price', 'tl_class' => 'clr w50'), 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'maximum_total' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['maximum_total'], 'exclude' => true, 'inputType' => 'text', 'default' => 0, 'eval' => array('maxlength' => 255, 'rgxp' => 'price', 'tl_class' => 'w50'), 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'quantity_mode' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['quantity_mode'], 'exclude' => true, 'inputType' => 'select', 'options' => array('cart_items', 'cart_products'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['quantity_mode'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'minimum_quantity' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['minimum_quantity'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'clr w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'maximum_quantity' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['maximum_quantity'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'countries' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['countries'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => function () {
    return \System::getCountries();
}, 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'w50 w50h', 'chosen' => true), 'sql' => "blob NULL"), 'shipping_modules' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['shipping_modules'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'w50 w50h', 'chosen' => true), 'sql' => "blob NULL"), 'product_types' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['product_types'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\ProductType::getTable() . '.name', 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'clr w50 w50h', 'chosen' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'product_types_condition' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['product_types_condition'], 'exclude' => true, 'inputType' => 'select', 'options' => array('onlyAvailable', 'allAvailable', 'oneAvailable'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'config_ids' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['config_ids'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\Config::getTable() . '.name', 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'clr w50 w50h', 'chosen' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'paybyway_merchant_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['paybyway_merchant_id'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) NOT NULL default '0'"), 'paybyway_private_key' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['paybyway_private_key'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'paypal_account' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['paypal_account'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'rgxp' => 'email', 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'psp_pspid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_pspid'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'psp_http_method' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_http_method'], 'exclude' => true, 'inputType' => 'select', 'default' => 'POST', 'options' => array('POST', 'GET'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(4) NOT NULL default ''"), 'psp_hash_method' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_method'], 'exclude' => true, 'default' => 'sha1', 'inputType' => 'select', 'options' => array('sha1', 'sha256', 'sha512'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_method'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(6) NOT NULL default ''"), 'psp_hash_in' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_in'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 128, 'hideInput' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'psp_hash_out' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_out'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 128, 'hideInput' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'psp_dynamic_template' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_dynamic_template'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 128, 'rgxp' => 'url', 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'psp_payment_method' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_payment_method'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => function ($dc) {
    $payment = \Isotope\Model\Payment::findByPk($dc->id);
    if ($payment === null || !$payment instanceof \Isotope\Model\Payment\PSP) {
        return array();
    }
    return $payment->getPaymentMethods();
}, 'eval' => array('includeBlankOption' => true, 'tl_class' => 'clr'), 'sql' => "varchar(128) NOT NULL default ''"), 'datatrans_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['datatrans_id'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'datatrans_sign' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['datatrans_sign'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 128, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'vads_site_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['vads_site_id'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 8, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(8) NOT NULL default ''"), 'vads_certificate' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['vads_certificate'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'sparkasse_paymentmethod' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_paymentmethod'], 'exclude' => true, 'inputType' => 'select', 'options' => array('creditcard', 'maestro', 'directdebit'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_paymentmethod'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'sparkasse_sslmerchant' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_sslmerchant'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'sparkasse_sslpassword' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_sslpassword'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'hideInput' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'sparkasse_merchantref' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_merchantref'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'decodeEntities' => true, 'tl_class' => 'clr long'), 'sql' => "varchar(255) NOT NULL default ''"), 'sofortueberweisung_user_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sofortueberweisung_user_id'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'sofortueberweisung_project_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sofortueberweisung_project_id'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'sofortueberweisung_project_password' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sofortueberweisung_project_password'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'saferpay_accountid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['saferpay_accountid'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'saferpay_description' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['saferpay_description'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'clr long'), 'sql' => "varchar(255) NOT NULL default ''"), 'saferpay_vtconfig' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['saferpay_vtconfig'], 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'saferpay_paymentmethods' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['saferpay_paymentmethods'], 'inputType' => 'select', 'options' => array(1 => 'MasterCard', 2 => 'Visa', 3 => 'American Express', 4 => 'Diners Club', 5 => 'JCB', 6 => 'Saferpay Testkarte', 7 => 'Laser Card', 8 => 'Bonus Card', 9 => 'PostFinance E-Finance', 10 => 'PostFinance Card', 11 => 'Maestro International', 12 => 'MyOne', 13 => 'Lastschrift', 14 => 'Rechnung', 15 => 'Sofortüberweisung', 16 => 'PayPal', 17 => 'giropay', 18 => 'iDEAL', 19 => 'ClickandBuy', 20 => 'Homebanking AT (eps)', 21 => 'Mpass', 22 => 'ePrzelewy'), 'eval' => array('multiple' => true, 'size' => 5, 'chosen' => true, 'csv' => ',', 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'expercash_popupId' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_popupId'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 10, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'expercash_profile' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_profile'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 3, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(3) NOT NULL default '0'"), 'expercash_popupKey' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_popupKey'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 32, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'expercash_paymentMethod' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_paymentMethod'], 'exclude' => true, 'inputType' => 'select', 'options' => array('automatic_payment_method', 'elv_buy', 'elv_authorize', 'cc_buy', 'cc_authorize', 'giropay', 'sofortueberweisung'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_paymentMethod'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'expercash_css' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_css'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('fieldType' => 'radio', 'files' => true, 'filesOnly' => true, 'extensions' => 'css', 'tl_class' => 'clr'), 'sql' => "binary(16) NULL"), 'epay_windowstate' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['epay_windowstate'], 'exclude' => true, 'default' => '3', 'inputType' => 'select', 'options' => array('3', '4'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['epay_windowstate_options'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'epay_merchantnumber' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['epay_merchantnumber'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'epay_secretkey' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['epay_secretkey'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 64, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'payone_clearingtype' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_clearingtype'], 'exclude' => true, 'inputType' => 'select', 'options' => array('elv', 'cc', 'dc', 'vor', 'rec', 'sb', 'wlt', 'fnc'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone'], 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "varchar(3) NOT NULL default ''"), 'payone_aid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_aid'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 6, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(6) NOT NULL default ''"), 'payone_portalid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_portalid'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 7, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(7) NOT NULL default ''"), 'payone_key' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_key'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'worldpay_instId' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_instId'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 6, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(6) NOT NULL default '0'"), 'worldpay_callbackPW' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_callbackPW'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 64, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'worldpay_signatureFields' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_signatureFields'], 'exclude' => true, 'default' => 'instId:cartId:amount:currency', 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'worldpay_md5secret' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_md5secret'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 64, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'worldpay_description' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_description'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'clr long'), 'sql' => "varchar(255) NOT NULL default ''"), 'quickpay_merchantId' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['quickpay_merchantId'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 10, 'rgpx' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) NULL"), 'quickpay_agreementId' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['quickpay_agreementId'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 10, 'rgpx' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) NULL"), 'quickpay_apiKey' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['quickpay_apiKey'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 64, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'quickpay_privateKey' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['quickpay_privateKey'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 64, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'quickpay_paymentMethods' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['quickpay_paymentMethods'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('decodeEntities' => true, 'tl_class' => 'clr long'), 'sql' => "text NULL"), 'requireCCV' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['requireCCV'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'guests' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['guests'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'protected' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['protected'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'groups' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['groups'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => 'tl_member_group.name', 'eval' => array('multiple' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'debug' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['debug'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'enabled' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['enabled'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''")));
<?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
 */
\System::loadLanguageFile(\Isotope\Model\ProductType::getTable());
/**
 * Table tl_iso_product
 */
$GLOBALS['TL_DCA']['tl_iso_product'] = array('config' => array('label' => &$GLOBALS['TL_LANG']['MOD']['iso_products'][0], 'dataContainer' => 'ProductData', 'enableVersioning' => true, 'switchToEdit' => true, 'ctable' => array(\Isotope\Model\Download::getTable(), \Isotope\Model\ProductCategory::getTable(), \Isotope\Model\ProductPrice::getTable(), \Isotope\Model\AttributeOption::getTable()), 'onload_callback' => array(array('Isotope\\Backend\\Product\\DcaManager', 'load'), array('Isotope\\Backend\\Product\\Permission', 'check'), array('Isotope\\Backend\\Product\\Panel', 'applyAdvancedFilters'), array('Isotope\\Backend\\Product\\XmlSitemap', 'generate')), 'oncreate_callback' => array(array('Isotope\\Backend\\Product\\DcaManager', 'updateNewRecord')), 'oncopy_callback' => array(array('Isotope\\Backend\\Product\\Category', 'updateSorting'), array('Isotope\\Backend\\Product\\DcaManager', 'updateDateAdded')), 'onsubmit_callback' => array(array('Isotope\\Backend', 'truncateProductCache'), array('Isotope\\Backend\\Product\\XmlSitemap', 'scheduleUpdate')), 'onversion_callback' => array(array('Isotope\\Backend\\Product\\Category', 'createVersion')), 'onrestore_callback' => array(array('Isotope\\Backend\\Product\\Category', 'restoreVersion')), 'sql' => array('keys' => array('id' => 'primary', 'gid' => 'index', 'pid,language' => 'index', 'language,published,start,stop,pid' => 'index', 'start' => 'index'))), 'select' => array('buttons_callback' => array(array('Isotope\\Backend\\Product\\Button', 'forSelect'))), 'list' => array('sorting' => array('mode' => 2, 'fields' => array('name'), 'headerFields' => array('name', 'sku', 'price', 'published'), 'flag' => 1, 'panelLayout' => 'iso_buttons,iso_filter;filter;sort,iso_sorting,search,limit', 'icon' => 'system/modules/isotope/assets/images/store-open.png', 'paste_button_callback' => array('Isotope\\Backend\\Product\\PasteButton', 'generate'), 'panel_callback' => array('iso_buttons' => array('Isotope\\Backend\\Product\\Panel', 'generateFilterButtons'), 'iso_filter' => array('Isotope\\Backend\\Product\\Panel', 'generateAdvancedFilters'), 'iso_sorting' => array('Isotope\\Backend\\Product\\Panel', 'generateSortingIcon'))), 'label' => array('fields' => array('images', 'name', 'sku', 'price'), 'showColumns' => true, 'label_callback' => array('Isotope\\Backend\\Product\\Label', 'generate')), 'global_operations' => array('generate' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['generate'], 'href' => 'key=generate', 'icon' => 'new.gif'), 'groups' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['product_groups'], 'href' => 'table=' . \Isotope\Model\Group::getTable(), 'icon' => 'system/modules/isotope/assets/images/folders.png', 'attributes' => 'onclick="Backend.getScrollOffset();"', 'button_callback' => array('Isotope\\Backend\\Product\\Button', 'forGroups')), 'import' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['import'], 'href' => 'key=import', 'icon' => 'system/modules/isotope/assets/images/image--plus.png', '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_product']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['copy'], 'href' => 'act=copy&amp;childs=1', 'icon' => 'copy.gif', 'button_callback' => array('Isotope\\Backend\\Product\\Button', 'forCopy')), 'cut' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['cut'], 'href' => 'act=cut', 'icon' => 'cut.gif', 'button_callback' => array('Isotope\\Backend\\Product\\Button', 'forCut')), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['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\\Product\\Button', 'forDelete')), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset(); return AjaxRequest.toggleVisibility(this, %s);"', 'button_callback' => array('Isotope\\Backend\\Product\\Button', 'forVisibilityToggle')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['show'], 'href' => 'act=show', 'icon' => 'show.gif'), 'break' => array('button_callback' => function () {
    return '<br>';
}), 'variants' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['variants'], 'href' => '', 'icon' => 'system/modules/isotope/assets/images/table--pencil.png', 'button_callback' => array('Isotope\\Backend\\Product\\Button', 'forVariants')), 'related' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['related'], 'href' => 'table=' . \Isotope\Model\RelatedProduct::getTable(), 'icon' => 'system/modules/isotope/assets/images/sitemap.png', 'button_callback' => array('Isotope\\Backend\\Product\\Button', 'forRelated')), 'downloads' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['downloads'], 'href' => 'table=' . \Isotope\Model\Download::getTable(), 'icon' => 'system/modules/isotope/assets/images/paper-clip.png', 'button_callback' => array('Isotope\\Backend\\Product\\Button', 'forDownloads')), 'group' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['group'], 'href' => 'act=cut', 'icon' => 'system/modules/isotope/assets/images/folder-network.png', 'button_callback' => array('Isotope\\Backend\\Product\\Button', 'forGroup')))), 'palettes' => array('__selector__' => array('type', 'protected'), 'default' => '{general_legend},type'), 'subpalettes' => array('protected' => 'groups'), 'fields' => array('id' => array('attributes' => array('systemColumn' => true), 'sql' => "int(10) unsigned NOT NULL auto_increment"), 'pid' => array('eval' => array('submitOnChange' => true), 'attributes' => array('systemColumn' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'gid' => array('foreignKey' => \Isotope\Model\Group::getTable() . '.name', 'eval' => array('doNotShow' => true), 'attributes' => array('systemColumn' => true, 'inherit' => true), 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'tstamp' => array('attributes' => array('systemColumn' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'language' => array('eval' => array('doNotShow' => true), 'attributes' => array('systemColumn' => true, 'inherit' => true), 'sql' => "varchar(5) NOT NULL default ''"), 'dateAdded' => array('label' => &$GLOBALS['TL_LANG']['MSC']['dateAdded'], 'eval' => array('rgxp' => 'datim', 'doNotCopy' => true), 'attributes' => array('fe_sorting' => true, 'systemColumn' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['type'], 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'options_callback' => array('Isotope\\Backend\\ProductType\\Callback', 'getOptions'), 'foreignKey' => \Isotope\Model\ProductType::getTable() . '.name', 'eval' => array('mandatory' => true, 'submitOnChange' => true, 'includeBlankOption' => true, 'tl_class' => 'clr', 'helpwizard' => true), 'attributes' => array('legend' => 'general_legend', 'fixed' => true, 'inherit' => true, 'systemColumn' => true), 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy'), 'explanation' => 'tl_iso_product.type'), 'pages' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['pages'], 'exclude' => true, 'inputType' => 'pageTree', 'foreignKey' => 'tl_page.title', 'eval' => array('doNotSaveEmpty' => true, 'multiple' => true, 'fieldType' => 'checkbox', 'orderField' => 'orderPages', 'tl_class' => 'clr hide_sort_hint'), 'relation' => array('type' => 'hasMany', 'load' => 'lazy'), 'attributes' => array('legend' => 'general_legend', 'fixed' => true, 'inherit' => true, 'systemColumn' => true), 'load_callback' => array(array('Isotope\\Backend\\Product\\Category', 'load')), 'save_callback' => array(array('Isotope\\Backend\\Product\\Category', 'save'))), 'orderPages' => array('eval' => array('doNotShow' => true), 'attributes' => array('systemColumn' => true, 'inherit' => true), 'sql' => "text NULL"), 'inherit' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['inherit'], 'exclude' => true, 'inputType' => 'inheritCheckbox', 'eval' => array('multiple' => true), 'attributes' => array('systemColumn' => true), 'sql' => "blob NULL"), 'alias' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['alias'], 'exclude' => true, 'search' => true, 'sorting' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'alnum', 'doNotCopy' => true, 'spaceToUnderscore' => true, 'maxlength' => 128, 'tl_class' => 'w50'), 'attributes' => array('legend' => 'general_legend', 'fixed' => true, 'inherit' => true), 'sql' => "varchar(128) NOT NULL default ''", 'save_callback' => array(array('Isotope\\Backend\\Product\\Alias', 'save'))), 'sku' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['sku'], 'exclude' => true, 'search' => true, 'sorting' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 128, 'unique' => true, 'tl_class' => 'w50'), 'attributes' => array('legend' => 'general_legend', 'fe_sorting' => true, 'fe_search' => true), 'sql' => "varchar(128) NOT NULL default ''"), 'name' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['name'], 'exclude' => true, 'search' => true, 'sorting' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'tl_class' => 'clr long'), 'attributes' => array('legend' => 'general_legend', 'multilingual' => true, 'fixed' => true, 'fe_sorting' => true, 'fe_search' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'teaser' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['teaser'], 'exclude' => true, 'search' => true, 'inputType' => 'textarea', 'eval' => array('style' => 'height:80px', 'tl_class' => 'clr'), 'attributes' => array('legend' => 'general_legend', 'multilingual' => true), 'sql' => "text NULL"), 'description' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['description'], 'exclude' => true, 'search' => true, 'inputType' => 'textarea', 'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'tl_class' => 'clr'), 'attributes' => array('legend' => 'general_legend', 'multilingual' => true, 'fe_search' => true), 'sql' => "text NULL"), 'meta_title' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['meta_title'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'clr long'), 'attributes' => array('legend' => 'meta_legend', 'multilingual' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'meta_description' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['meta_description'], 'exclude' => true, 'search' => true, 'inputType' => 'textarea', 'eval' => array('style' => 'height:60px', 'tl_class' => 'clr'), 'attributes' => array('legend' => 'meta_legend', 'multilingual' => true), 'sql' => "text NULL"), 'meta_keywords' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['meta_keywords'], 'exclude' => true, 'search' => true, 'inputType' => 'textarea', 'eval' => array('style' => 'height:40px', 'tl_class' => 'clr'), 'attributes' => array('legend' => 'meta_legend', 'multilingual' => true), 'sql' => "text NULL"), 'price' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['price'], 'exclude' => true, 'inputType' => 'timePeriod', 'foreignKey' => \Isotope\Model\TaxClass::getTable() . '.name', 'eval' => array('mandatory' => true, 'maxlength' => 13, 'rgxp' => 'price', 'includeBlankOption' => true, 'blankOptionLabel' => &$GLOBALS['TL_LANG']['MSC']['taxFree'], 'doNotSaveEmpty' => true, 'tl_class' => 'w50'), 'attributes' => array('legend' => 'pricing_legend', 'fe_sorting' => true, 'dynamic' => true, 'systemColumn' => true, 'type' => '\\Isotope\\Model\\Attribute\\Price'), 'load_callback' => array(array('\\Isotope\\Backend\\Product\\Price', 'load')), 'save_callback' => array(array('\\Isotope\\Backend\\Product\\Price', 'save'))), 'prices' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['prices'], 'inputType' => 'dcaWizard', 'foreignTable' => \Isotope\Model\ProductPrice::getTable(), 'attributes' => array('systemColumn' => true), 'eval' => array('listCallback' => array('Isotope\\Backend\\ProductPrice\\Callback', 'generateWizardList'), 'applyButtonLabel' => &$GLOBALS['TL_LANG']['tl_iso_product']['prices']['apply_and_close'], 'tl_class' => 'clr')), 'price_tiers' => array('attributes' => array('type' => '\\Isotope\\Model\\Attribute\\PriceTiers'), 'tableformat' => array('min' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['price_tiers']['min'], 'format' => &$GLOBALS['TL_LANG']['tl_iso_product']['price_tiers']['min_format']), 'price' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['price_tiers']['price'], 'rgxp' => 'price'), 'tax_class' => array('doNotShow' => true))), 'baseprice' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['baseprice'], 'exclude' => true, 'inputType' => 'timePeriod', 'foreignKey' => 'tl_iso_baseprice.name', 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50'), 'attributes' => array('type' => '\\Isotope\\Model\\Attribute\\BasePrice', 'legend' => 'pricing_legend'), 'sql' => "varchar(255) NOT NULL default ''"), 'shipping_weight' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['shipping_weight'], 'exclude' => true, 'inputType' => 'timePeriod', 'default' => array('', 'kg'), 'options' => array('mg', 'g', 'kg', 't', 'ct', 'oz', 'lb', 'st', 'grain'), 'reference' => &$GLOBALS['TL_LANG']['WGT'], 'eval' => array('rgxp' => 'digit', 'tl_class' => 'w50', 'helpwizard' => true), 'attributes' => array('legend' => 'shipping_legend'), 'sql' => "varchar(255) NOT NULL default ''"), 'shipping_exempt' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['shipping_exempt'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'attributes' => array('legend' => 'shipping_legend', 'systemColumn' => true), 'sql' => "char(1) NOT NULL default ''"), 'images' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['images'], 'exclude' => true, 'inputType' => 'mediaManager', 'explanation' => 'mediaManager', 'eval' => array('extensions' => 'jpeg,jpg,png,gif', 'helpwizard' => true, 'tl_class' => 'clr'), 'attributes' => array('legend' => 'media_legend', 'fixed' => true, 'multilingual' => true, 'dynamic' => true, 'systemColumn' => true, 'fetch_fallback' => true), 'sql' => "blob NULL"), 'protected' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['protected'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true, 'tl_class' => 'clr'), 'attributes' => array('legend' => 'expert_legend', 'systemColumn' => true), 'sql' => "char(1) NOT NULL default ''"), 'groups' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['groups'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkbox', 'foreignKey' => 'tl_member_group.name', 'eval' => array('mandatory' => true, 'multiple' => true, 'systemColumn' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'guests' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['guests'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'attributes' => array('legend' => 'expert_legend', 'systemColumn' => true), 'sql' => "char(1) NOT NULL default ''"), 'cssID' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['cssID'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('multiple' => true, 'size' => 2, 'tl_class' => 'w50'), 'attributes' => array('legend' => 'expert_legend'), 'sql' => "varchar(255) NOT NULL default ''"), 'published' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['published'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkbox', 'eval' => array('doNotCopy' => true, 'tl_class' => 'clr'), 'attributes' => array('legend' => 'publish_legend', 'fixed' => true, 'variant_fixed' => true, 'systemColumn' => true), 'sql' => "char(1) NOT NULL default ''", 'save_callback' => array(array('Isotope\\Backend', 'truncateProductCache'))), 'start' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['start'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'date', 'datepicker' => true, 'tl_class' => 'w50 wizard'), 'attributes' => array('legend' => 'publish_legend', 'fixed' => true, 'variant_fixed' => true, 'systemColumn' => true), 'sql' => "varchar(10) NOT NULL default ''"), 'stop' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['stop'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'date', 'datepicker' => true, 'tl_class' => 'w50 wizard'), 'attributes' => array('legend' => 'publish_legend', 'fixed' => true, 'variant_fixed' => true, 'systemColumn' => true), 'sql' => "varchar(10) NOT NULL default ''"), 'variantFields' => array('label' => &$GLOBALS['TL_LANG'][\Isotope\Model\ProductType::getTable()]['variant_attributes']), 'source' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product']['source'], 'eval' => array('mandatory' => true, 'required' => true, 'fieldType' => 'radio'))));
/**
 * Adjust the data configuration array in variants view
 */
if (\Input::get('id')) {
    $GLOBALS['TL_LANG']['tl_iso_product']['new'] = $GLOBALS['TL_LANG']['tl_iso_product']['new_variant'];
    $GLOBALS['TL_DCA']['tl_iso_product']['config']['switchToEdit'] = false;
    unset($GLOBALS['TL_DCA']['tl_iso_product']['list']['global_operations']['import']);
    unset($GLOBALS['TL_DCA']['tl_iso_product']['list']['global_operations']['groups']);
} else {
    unset($GLOBALS['TL_DCA']['tl_iso_product']['list']['global_operations']['generate']);
}
Esempio n. 8
0
<?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_payment
 */
$GLOBALS['TL_DCA']['tl_iso_payment'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'closed' => true, 'onload_callback' => array(array('Isotope\\Backend', 'initializeSetupModule'), array('Isotope\\Backend\\Payment\\Callback', 'checkPermission'), array('Isotope\\Backend\\Payment\\Callback', 'loadShippingModules')), 'sql' => array('keys' => array('id' => 'primary'))), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('name'), 'flag' => 1, 'panelLayout' => 'sort,filter;search,limit'), 'label' => array('fields' => array('name', 'type'), '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_payment']['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_payment']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif', 'button_callback' => array('Isotope\\Backend\\Payment\\Callback', 'copyPaymentModule')), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['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\\Payment\\Callback', 'deletePaymentModule')), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => array('Isotope\\Backend\\Payment\\Callback', 'toggleIcon')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type', 'protected'), 'default' => '{type_legend},name,label,type', 'cash' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'paypal' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},paypal_account;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'postfinance' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},psp_pspid,psp_http_method,psp_hash_method,psp_hash_in,psp_hash_out,psp_dynamic_template;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'viveum' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},psp_pspid,psp_http_method,psp_hash_method,psp_hash_in,psp_hash_out,psp_dynamic_template;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'datatrans' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,trans_type,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},datatrans_id,datatrans_sign;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'sparkasse' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend:hide},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},sparkasse_paymentmethod,trans_type,sparkasse_sslmerchant,sparkasse_sslpassword,sparkasse_merchantref;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'sofortueberweisung' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend:hide},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},trans_type,sofortueberweisung_user_id,sofortueberweisung_project_id,sofortueberweisung_project_password;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'saferpay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},saferpay_accountid,trans_type,saferpay_description,saferpay_vtconfig;{price_legend:hide},price,tax_class;{enabled_legend},enabled', 'expercash' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},expercash_popupId,expercash_profile,expercash_popupKey,expercash_paymentMethod;{price_legend:hide},price,tax_class;{template_legend},expercash_css;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'payone' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},trans_type,payone_clearingtype,payone_aid,payone_portalid,payone_key;{price_legend:hide},price,tax_class;{enabled_legend},debug,enabled', 'worldpay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},worldpay_instId,worldpay_callbackPW,worldpay_signatureFields,worldpay_md5secret,worldpay_description;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled'), 'subpalettes' => array('protected' => 'groups'), '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_payment']['name'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'label' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['label'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['type'], 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'default' => 'cash', 'options_callback' => function () {
    return \Isotope\Model\Payment::getModelTypeOptions();
}, 'eval' => array('includeBlankOption' => true, 'helpwizard' => true, 'submitOnChange' => true, 'chosen' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'note' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['note'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('rte' => 'tinyMCE'), 'sql' => "text NULL"), 'new_order_status' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['new_order_status'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\OrderStatus::getTable() . '.name', 'options_callback' => array('\\Isotope\\Backend', 'getOrderStatus'), 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "int(10) NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'price' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['price'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 16, 'rgxp' => 'surcharge', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'tax_class' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['tax_class'], 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\TaxClass::getTable() . '.name', 'options_callback' => array('\\Isotope\\Model\\TaxClass', 'getOptionsWithSplit'), 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "int(10) NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'allowed_cc_types' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['allowed_cc_types'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkbox', 'options_callback' => array('Isotope\\Backend\\Payment\\Callback', 'getAllowedCCTypes'), 'eval' => array('multiple' => true, 'tl_class' => 'clr'), 'sql' => "text NULL"), 'trans_type' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['trans_type'], 'exclude' => true, 'default' => 'capture', 'inputType' => 'select', 'options' => array('capture', 'auth'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'helpwizard' => true), 'reference' => $GLOBALS['TL_LANG']['tl_iso_payment'], 'sql' => "varchar(8) NOT NULL default ''"), 'minimum_total' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['minimum_total'], 'exclude' => true, 'inputType' => 'text', 'default' => 0, 'eval' => array('maxlength' => 255, 'rgxp' => 'price', 'tl_class' => 'clr w50'), 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'maximum_total' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['maximum_total'], 'exclude' => true, 'inputType' => 'text', 'default' => 0, 'eval' => array('maxlength' => 255, 'rgxp' => 'price', 'tl_class' => 'w50'), 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'countries' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['countries'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => function () {
    return \System::getCountries();
}, 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'w50 w50h', 'chosen' => true), 'sql' => "blob NULL"), 'shipping_modules' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['shipping_modules'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'w50 w50h', 'chosen' => true), 'sql' => "blob NULL"), 'product_types' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['product_types'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\ProductType::getTable() . '.name', 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'clr w50 w50h', 'chosen' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'paypal_account' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['paypal_account'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'rgxp' => 'email', 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'psp_pspid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_pspid'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'psp_http_method' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_http_method'], 'exclude' => true, 'inputType' => 'select', 'default' => 'POST', 'options' => array('POST', 'GET'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(4) NOT NULL default ''"), 'psp_hash_method' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_method'], 'exclude' => true, 'default' => 'sha1', 'inputType' => 'select', 'options' => array('sha1', 'sha256', 'sha512'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_method'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(6) NOT NULL default ''"), 'psp_hash_in' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_in'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 128, 'hideInput' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'psp_hash_out' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_out'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 128, 'hideInput' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'psp_dynamic_template' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_dynamic_template'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 128, 'rgxp' => 'url', 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'datatrans_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['datatrans_id'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 100, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'datatrans_sign' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['datatrans_sign'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'sparkasse_paymentmethod' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_paymentmethod'], 'exclude' => true, 'inputType' => 'select', 'options' => array('creditcard', 'maestro', 'directdebit'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_paymentmethod'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'sparkasse_sslmerchant' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_sslmerchant'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'sparkasse_sslpassword' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_sslpassword'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'hideInput' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'sparkasse_merchantref' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_merchantref'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'decodeEntities' => true, 'tl_class' => 'clr long'), 'sql' => "varchar(255) NOT NULL default ''"), 'sofortueberweisung_user_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sofortueberweisung_user_id'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'sofortueberweisung_project_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sofortueberweisung_project_id'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'sofortueberweisung_project_password' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sofortueberweisung_project_password'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'saferpay_accountid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['saferpay_accountid'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'saferpay_description' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['saferpay_description'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'saferpay_vtconfig' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['saferpay_vtconfig'], 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'expercash_popupId' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_popupId'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 10, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'expercash_profile' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_profile'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 3, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(3) NOT NULL default '0'"), 'expercash_popupKey' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_popupKey'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 32, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'expercash_paymentMethod' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_paymentMethod'], 'exclude' => true, 'inputType' => 'select', 'options' => array('automatic_payment_method', 'elv_buy', 'elv_authorize', 'cc_buy', 'cc_authorize', 'giropay', 'sofortueberweisung'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_paymentMethod'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'expercash_css' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_css'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('fieldType' => 'radio', 'files' => true, 'filesOnly' => true, 'extensions' => 'css', 'tl_class' => 'clr'), 'sql' => "binary(16) NULL"), 'payone_clearingtype' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_clearingtype'], 'exclude' => true, 'inputType' => 'select', 'options' => array('elv', 'cc', 'dc', 'vor', 'rec', 'sb', 'wlt'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone'], 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "varchar(3) NOT NULL default ''"), 'payone_aid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_aid'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 6, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(6) NOT NULL default ''"), 'payone_portalid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_portalid'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 7, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(7) NOT NULL default ''"), 'payone_key' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_key'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'worldpay_instId' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_instId'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 6, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(6) NOT NULL default '0'"), 'worldpay_callbackPW' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_callbackPW'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 64, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'worldpay_signatureFields' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_signatureFields'], 'exclude' => true, 'default' => 'instId:cartId:amount:currency', 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'worldpay_md5secret' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_md5secret'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 64, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'worldpay_description' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_description'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'clr long'), 'sql' => "varchar(255) NOT NULL default ''"), 'requireCCV' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['requireCCV'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'guests' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['guests'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'protected' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['protected'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'groups' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['groups'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => 'tl_member_group.name', 'eval' => array('multiple' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'debug' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['debug'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'enabled' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['enabled'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''")));
Esempio n. 9
0
<?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_payment
 */
$GLOBALS['TL_DCA']['tl_iso_payment'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'closed' => true, 'onload_callback' => array(array('Isotope\\Backend', 'initializeSetupModule'), array('Isotope\\Backend\\Payment\\Callback', 'checkPermission'), array('Isotope\\Backend\\Payment\\Callback', 'loadShippingModules')), 'sql' => array('keys' => array('id' => 'primary'))), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('name'), 'flag' => 1, 'panelLayout' => 'sort,filter;search,limit'), 'label' => array('fields' => array('name', 'type'), '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_payment']['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_payment']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif', 'button_callback' => array('Isotope\\Backend\\Payment\\Callback', 'copyPaymentModule')), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['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\\Payment\\Callback', 'deletePaymentModule')), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => array('Isotope\\Backend\\Payment\\Callback', 'toggleIcon')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type', 'protected'), 'default' => '{type_legend},name,label,type', 'cash' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'paybyway' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},paybyway_merchant_id,paybyway_private_key;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'paypal' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},paypal_account;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'postfinance' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},psp_pspid,psp_http_method,psp_hash_method,psp_hash_in,psp_hash_out,psp_dynamic_template;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'viveum' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},psp_pspid,psp_http_method,psp_hash_method,psp_hash_in,psp_hash_out,psp_dynamic_template;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'datatrans' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,trans_type,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},datatrans_id,datatrans_sign;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'sparkasse' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend:hide},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},sparkasse_paymentmethod,trans_type,sparkasse_sslmerchant,sparkasse_sslpassword,sparkasse_merchantref;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled', 'sofortueberweisung' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend:hide},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},trans_type,sofortueberweisung_user_id,sofortueberweisung_project_id,sofortueberweisung_project_password;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'saferpay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},saferpay_accountid,trans_type,saferpay_description,saferpay_vtconfig,saferpay_paymentmethods;{price_legend:hide},price,tax_class;{enabled_legend},enabled', 'billpay_saferpay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types;{gateway_legend},saferpay_accountid,trans_type,saferpay_description,saferpay_vtconfig,saferpay_paymentmethods;{price_legend:hide},price,tax_class;{enabled_legend},enabled', 'expercash' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},expercash_popupId,expercash_profile,expercash_popupKey,expercash_paymentMethod;{price_legend:hide},price,tax_class;{template_legend},expercash_css;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'epay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},trans_type,epay_windowstate,epay_merchantnumber,epay_secretkey;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},enabled', 'payone' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},trans_type,payone_clearingtype,payone_aid,payone_portalid,payone_key;{price_legend:hide},price,tax_class;{enabled_legend},debug,enabled', 'worldpay' => '{type_legend},name,label,type;{note_legend:hide},note;{config_legend},new_order_status,minimum_total,maximum_total,countries,shipping_modules,product_types,product_types_condition,config_ids;{gateway_legend},worldpay_instId,worldpay_callbackPW,worldpay_signatureFields,worldpay_md5secret,worldpay_description;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},debug,enabled'), 'subpalettes' => array('protected' => 'groups'), '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_payment']['name'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'label' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['label'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['type'], 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'default' => 'cash', 'options_callback' => function () {
    return \Isotope\Model\Payment::getModelTypeOptions();
}, 'eval' => array('includeBlankOption' => true, 'helpwizard' => true, 'submitOnChange' => true, 'chosen' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'note' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['note'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('rte' => 'tinyMCE'), 'sql' => "text NULL"), 'new_order_status' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['new_order_status'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\OrderStatus::getTable() . '.name', 'options_callback' => array('\\Isotope\\Backend', 'getOrderStatus'), 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "int(10) NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'price' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['price'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 16, 'rgxp' => 'surcharge', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'tax_class' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['tax_class'], 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\TaxClass::getTable() . '.name', 'options_callback' => array('\\Isotope\\Model\\TaxClass', 'getOptionsWithSplit'), 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "int(10) NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'allowed_cc_types' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['allowed_cc_types'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkbox', 'options_callback' => array('Isotope\\Backend\\Payment\\Callback', 'getAllowedCCTypes'), 'eval' => array('multiple' => true, 'tl_class' => 'clr'), 'sql' => "text NULL"), 'trans_type' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['trans_type'], 'exclude' => true, 'default' => 'capture', 'inputType' => 'select', 'options' => array('capture', 'auth'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'helpwizard' => true), 'reference' => $GLOBALS['TL_LANG']['tl_iso_payment'], 'sql' => "varchar(8) NOT NULL default ''"), 'minimum_total' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['minimum_total'], 'exclude' => true, 'inputType' => 'text', 'default' => 0, 'eval' => array('maxlength' => 255, 'rgxp' => 'price', 'tl_class' => 'clr w50'), 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'maximum_total' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['maximum_total'], 'exclude' => true, 'inputType' => 'text', 'default' => 0, 'eval' => array('maxlength' => 255, 'rgxp' => 'price', 'tl_class' => 'w50'), 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'countries' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['countries'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => function () {
    return \System::getCountries();
}, 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'w50 w50h', 'chosen' => true), 'sql' => "blob NULL"), 'shipping_modules' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['shipping_modules'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'w50 w50h', 'chosen' => true), 'sql' => "blob NULL"), 'product_types' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['product_types'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\ProductType::getTable() . '.name', 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'clr w50 w50h', 'chosen' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'product_types_condition' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['product_types_condition'], 'exclude' => true, 'inputType' => 'select', 'options' => array('onlyAvailable', 'allAvailable', 'oneAvailable'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'config_ids' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['config_ids'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\Config::getTable() . '.name', 'eval' => array('multiple' => true, 'size' => 8, 'tl_class' => 'clr w50 w50h', 'chosen' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'paybyway_merchant_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['paybyway_merchant_id'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) NOT NULL default '0'"), 'paybyway_private_key' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['paybyway_private_key'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'paypal_account' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['paypal_account'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'rgxp' => 'email', 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'psp_pspid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_pspid'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'psp_http_method' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_http_method'], 'exclude' => true, 'inputType' => 'select', 'default' => 'POST', 'options' => array('POST', 'GET'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(4) NOT NULL default ''"), 'psp_hash_method' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_method'], 'exclude' => true, 'default' => 'sha1', 'inputType' => 'select', 'options' => array('sha1', 'sha256', 'sha512'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_method'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(6) NOT NULL default ''"), 'psp_hash_in' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_in'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 128, 'hideInput' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'psp_hash_out' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_hash_out'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 128, 'hideInput' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'psp_dynamic_template' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['psp_dynamic_template'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 128, 'rgxp' => 'url', 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'datatrans_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['datatrans_id'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 100, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'datatrans_sign' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['datatrans_sign'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(128) NOT NULL default ''"), 'sparkasse_paymentmethod' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_paymentmethod'], 'exclude' => true, 'inputType' => 'select', 'options' => array('creditcard', 'maestro', 'directdebit'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_paymentmethod'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'sparkasse_sslmerchant' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_sslmerchant'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'sparkasse_sslpassword' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_sslpassword'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'hideInput' => true, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'sparkasse_merchantref' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sparkasse_merchantref'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'decodeEntities' => true, 'tl_class' => 'clr long'), 'sql' => "varchar(255) NOT NULL default ''"), 'sofortueberweisung_user_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sofortueberweisung_user_id'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'sofortueberweisung_project_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sofortueberweisung_project_id'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'sofortueberweisung_project_password' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['sofortueberweisung_project_password'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'saferpay_accountid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['saferpay_accountid'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'saferpay_description' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['saferpay_description'], 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'clr long'), 'sql' => "varchar(255) NOT NULL default ''"), 'saferpay_vtconfig' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['saferpay_vtconfig'], 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'saferpay_paymentmethods' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['saferpay_paymentmethods'], 'inputType' => 'select', 'options' => array(1 => 'MasterCard', 2 => 'Visa', 3 => 'American Express', 4 => 'Diners Club', 5 => 'JCB', 6 => 'Saferpay Testkarte', 7 => 'Laser Card', 8 => 'Bonus Card', 9 => 'PostFinance E-Finance', 10 => 'PostFinance Card', 11 => 'Maestro International', 12 => 'MyOne', 13 => 'Lastschrift', 14 => 'Rechnung', 15 => 'Sofortüberweisung', 16 => 'PayPal', 17 => 'giropay', 18 => 'iDEAL', 19 => 'ClickandBuy', 20 => 'Homebanking AT (eps)', 21 => 'Mpass', 22 => 'ePrzelewy'), 'eval' => array('multiple' => true, 'size' => 5, 'chosen' => true, 'csv' => ',', 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'expercash_popupId' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_popupId'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 10, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'expercash_profile' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_profile'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 3, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(3) NOT NULL default '0'"), 'expercash_popupKey' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_popupKey'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 32, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'expercash_paymentMethod' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_paymentMethod'], 'exclude' => true, 'inputType' => 'select', 'options' => array('automatic_payment_method', 'elv_buy', 'elv_authorize', 'cc_buy', 'cc_authorize', 'giropay', 'sofortueberweisung'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_paymentMethod'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'expercash_css' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['expercash_css'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('fieldType' => 'radio', 'files' => true, 'filesOnly' => true, 'extensions' => 'css', 'tl_class' => 'clr'), 'sql' => "binary(16) NULL"), 'epay_windowstate' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['epay_windowstate'], 'exclude' => true, 'default' => '3', 'inputType' => 'select', 'options' => array('3', '4'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['epay_windowstate_options'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'epay_merchantnumber' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['epay_merchantnumber'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'epay_secretkey' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['epay_secretkey'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 64, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'payone_clearingtype' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_clearingtype'], 'exclude' => true, 'inputType' => 'select', 'options' => array('elv', 'cc', 'dc', 'vor', 'rec', 'sb', 'wlt'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone'], 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "varchar(3) NOT NULL default ''"), 'payone_aid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_aid'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 6, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(6) NOT NULL default ''"), 'payone_portalid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_portalid'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 7, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(7) NOT NULL default ''"), 'payone_key' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['payone_key'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'worldpay_instId' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_instId'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 6, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(6) NOT NULL default '0'"), 'worldpay_callbackPW' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_callbackPW'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 64, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'worldpay_signatureFields' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_signatureFields'], 'exclude' => true, 'default' => 'instId:cartId:amount:currency', 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'worldpay_md5secret' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_md5secret'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 64, 'decodeEntities' => true, 'hideInput' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'worldpay_description' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['worldpay_description'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'clr long'), 'sql' => "varchar(255) NOT NULL default ''"), 'requireCCV' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['requireCCV'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'guests' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['guests'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'protected' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['protected'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'groups' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['groups'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => 'tl_member_group.name', 'eval' => array('multiple' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'debug' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['debug'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'enabled' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['enabled'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''")));
Esempio n. 10
0
<?php

/**
 * Quick Product Content Element for Isotope eCommerce and Contao Open Source CMS
 *
 * Copyright (C) 2014 HB Agency
 *
 * @package    Isotope_Quickproducts
 * @link       http://www.hbagency.com
 * @license    http://opensource.org/licenses/lgpl-3.0.html
 */
/**
 * Palettes
 */
$GLOBALS['TL_DCA']['tl_content']['palettes']['isotope_quick'] = '{type_legend},type,headline;{include_legend},iso_products;{config_legend},iso_listingSortField,iso_listingSortDirection,iso_cols,iso_use_quantity,iso_buttons;{template_settings},iso_gallery,iso_list_layout;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space;{invisible_legend:hide},invisible,start,stop';
/**
 * Fields
 */
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_products'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_products'], 'exclude' => true, 'inputType' => 'tableLookup', 'sql' => "blob NULL", 'eval' => array('mandatory' => true, 'doNotSaveEmpty' => true, 'tl_class' => 'clr', 'foreignTable' => 'tl_iso_product', 'fieldType' => 'checkbox', 'listFields' => array('type' => "(SELECT name FROM " . \Isotope\Model\ProductType::getTable() . " WHERE " . \Isotope\Model\Product::getTable() . ".type=" . \Isotope\Model\ProductType::getTable() . ".id)", 'name', 'sku'), 'searchFields' => array('name', 'alias', 'sku', 'description'), 'sqlWhere' => 'pid=0', 'searchLabel' => 'Search products'));
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_gallery'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_gallery'], 'exclude' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\Gallery::getTable() . '.name', 'eval' => array('includeBlankOption' => true, 'chosen' => true, 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_list_layout'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_list_layout'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => function (\DataContainer $dc) {
    return \Isotope\Backend::getTemplates('iso_list_');
}, 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50', 'chosen' => true), 'sql' => "varchar(64) NOT NULL default ''");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_use_quantity'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_use_quantity'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_cols'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_cols'], 'exclude' => true, 'default' => 1, 'inputType' => 'text', 'eval' => array('maxlength' => 1, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(1) unsigned NOT NULL default '1'");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_buttons'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_buttons'], 'exclude' => true, 'inputType' => 'checkboxWizard', 'default' => array('add_to_cart'), 'options_callback' => array('Isotope\\Backend\\Module\\Callback', 'getButtons'), 'eval' => array('multiple' => true, 'tl_class' => 'clr'), 'sql' => "blob NULL");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_listingSortField'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_listingSortField'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Isotope\\Backend\\Module\\Callback', 'getSortingFields'), 'eval' => array('includeBlankOption' => true, 'tl_class' => 'clr w50'), 'sql' => "varchar(255) NOT NULL default ''");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_listingSortDirection'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_listingSortDirection'], 'exclude' => true, 'default' => 'DESC', 'inputType' => 'select', 'options' => array('DESC', 'ASC'), 'reference' => &$GLOBALS['TL_LANG']['tl_content']['sortingDirection'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(8) NOT NULL default ''");
$GLOBALS['TL_DCA']['tl_content']['fields']['iso_cart_jumpTo'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['iso_cart_jumpTo'], 'exclude' => true, 'inputType' => 'pageTree', 'foreignKey' => 'tl_page.title', 'eval' => array('fieldType' => 'radio', 'tl_class' => 'clr'), 'explanation' => 'jumpTo', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy'));
<?php

/**
 * Isotope "simple stock management" for Contao Open Source CMS
 *
 * Copyright (c) 2016 Richard Henkenjohann
 *
 * @package Isotope
 * @author  Richard Henkenjohann <*****@*****.**>
 */
use Isotope\Model\ProductType;
use NotificationCenter\Model\Notification;
/** @noinspection PhpUndefinedMethodInspection */
$table = ProductType::getTable();
/**
 * Palettes
 */
$GLOBALS['TL_DCA'][$table]['palettes']['__selector__'][] = 'stockmanagement_active';
$GLOBALS['TL_DCA'][$table]['palettes']['__selector__'][] = 'stockmanagement_notification';
$GLOBALS['TL_DCA'][$table]['palettes']['standard'] .= ';{stockmanagement_legend},stockmanagement_active';
/**
 * SubPalettes
 */
$GLOBALS['TL_DCA'][$table]['subpalettes']['stockmanagement_active'] = 'stockmanagement_disableProduct,stockmanagement_notification';
$GLOBALS['TL_DCA'][$table]['subpalettes']['stockmanagement_notification'] = 'stockmanagement_notifications';
/**
 * Fields
 */
$GLOBALS['TL_DCA'][$table]['fields']['stockmanagement_active'] = ['label' => &$GLOBALS['TL_LANG'][$table]['stockmanagement_active'], 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50', 'submitOnChange' => true], 'sql' => "char(1) NOT NULL default ''"];
$GLOBALS['TL_DCA'][$table]['fields']['stockmanagement_notification'] = ['label' => &$GLOBALS['TL_LANG'][$table]['stockmanagement_notification'], 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50', 'submitOnChange' => true], 'sql' => "char(1) NOT NULL default ''"];
$GLOBALS['TL_DCA'][$table]['fields']['stockmanagement_notifications'] = ['label' => &$GLOBALS['TL_LANG'][$table]['stockmanagement_notifications'], 'inputType' => 'multiColumnWizard', 'eval' => ['tl_class' => 'clr', 'columnFields' => ['threshold' => ['inputType' => 'text', 'label' => &$GLOBALS['TL_LANG'][$table]['stockmanagement_notifications_threshold'], 'eval' => ['rgxp' => 'digit', 'mandatory' => true, 'style' => 'width:60px;text-align:right']], 'nc_id' => ['inputType' => 'select', 'label' => &$GLOBALS['TL_LANG'][$table]['stockmanagement_notifications_nc_id'], 'eval' => ['mandatory' => true], 'options_callback' => function () {
Esempio n. 12
0
<?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_rule
 */
$GLOBALS['TL_DCA']['tl_iso_rule'] = array('config' => array('dataContainer' => 'Table', 'ctable' => array('tl_iso_rule_restriction'), 'enableVersioning' => false, 'onload_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'loadAttributeValues')), 'sql' => array('keys' => array('id' => 'primary'))), 'list' => array('sorting' => array('mode' => 1, 'panelLayout' => 'filter;search,limit', 'fields' => array('type', 'name')), 'label' => array('fields' => array('name', 'code'), 'format' => '%s <span style="color:#b3b3b3; padding-left:3px;">[%s]</span>'), 'global_operations' => array('all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"'), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset(); return AjaxRequest.toggleVisibility(this, %s);"', 'button_callback' => array('\\Isotope\\Backend\\Rule\\Callback', 'toggleIcon')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type', 'applyTo', 'enableCode', 'configRestrictions', 'memberRestrictions', 'productRestrictions'), 'default' => '{basic_legend},type', 'product' => '{basic_legend},type,name,discount;{limit_legend:hide},limitPerMember,limitPerConfig,minItemQuantity,maxItemQuantity,quantityMode;{datim_legend:hide},startDate,endDate,startTime,endTime;{advanced_legend:hide},configRestrictions,memberRestrictions,productRestrictions;{enabled_legend},enabled', 'cart' => '{basic_legend},type,applyTo,name,label,discount;{coupon_legend:hide},enableCode;{limit_legend:hide},limitPerMember,limitPerConfig,minSubtotal,maxSubtotal,minItemQuantity,maxItemQuantity,quantityMode;{datim_legend:hide},startDate,endDate,startTime,endTime;{advanced_legend:hide},configRestrictions,memberRestrictions,productRestrictions;{enabled_legend},enabled', 'cartsubtotal' => '{basic_legend},type,applyTo,name,label,discount,tax_class;{coupon_legend:hide},enableCode;{limit_legend:hide},limitPerMember,limitPerConfig,minSubtotal,maxSubtotal,minItemQuantity,maxItemQuantity,quantityMode;{datim_legend:hide},startDate,endDate,startTime,endTime;{advanced_legend:hide},configRestrictions,memberRestrictions,productRestrictions;{enabled_legend},enabled'), 'subpalettes' => array('enableCode' => 'code', 'configRestrictions' => 'configs,configCondition', 'memberRestrictions_guests' => 'memberCondition', 'memberRestrictions_groups' => 'memberCondition,groups', 'memberRestrictions_members' => 'memberCondition,members', 'productRestrictions_producttypes' => 'productCondition,producttypes', 'productRestrictions_pages' => 'productCondition,pages', 'productRestrictions_products' => 'productCondition,products', 'productRestrictions_variants' => 'productCondition,variants', 'productRestrictions_attribute' => 'attributeName,attributeCondition,attributeValue'), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['type'], 'exclude' => true, 'filter' => true, 'default' => 'product', 'inputType' => 'select', 'options' => array('product', 'cart'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_rule']['type'], 'eval' => array('mandatory' => true, 'submitOnChange' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'name' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['name'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'clr w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'label' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['label'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'discount' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['discount'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'rgxp' => 'discount', 'tl_class' => 'clr w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'tax_class' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['tax_class'], 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\TaxClass::getTable() . '.name', 'options_callback' => array('\\Isotope\\Model\\TaxClass', 'getOptionsWithSplit'), 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "int(10) NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'applyTo' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['applyTo'], 'exclude' => true, 'default' => 'products', 'inputType' => 'select', 'options' => array('products', 'items', 'subtotal'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_rule']['applyTo'], 'eval' => array('mandatory' => true, 'submitOnChange' => true, 'tl_class' => 'w50'), 'sql' => "varchar(8) NOT NULL default ''"), 'enableCode' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['enableCode'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'code' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['code'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255), 'sql' => "varchar(255) NOT NULL default ''"), 'limitPerMember' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['limitPerMember'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'digit', 'maxlength' => 10, 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'limitPerConfig' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['limitPerConfig'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'digit', 'maxlength' => 10, 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'minSubtotal' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['minSubtotal'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'maxSubtotal' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['maxSubtotal'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'minItemQuantity' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['minItemQuantity'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'maxItemQuantity' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['maxItemQuantity'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'quantityMode' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['quantityMode'], 'exclude' => true, 'inputType' => 'select', 'default' => 'product_quantity', 'options' => array('product_quantity', 'cart_products', 'cart_items'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_rule']['quantityMode'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'startDate' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['startDate'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'date', 'datepicker' => true, 'tl_class' => 'w50 wizard'), 'sql' => "varchar(10) NOT NULL default ''"), 'endDate' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['endDate'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'date', 'datepicker' => true, 'tl_class' => 'w50 wizard'), 'sql' => "varchar(10) NOT NULL default ''"), 'startTime' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['startTime'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'time', 'datepicker' => true, 'tl_class' => 'w50 wizard'), 'sql' => "varchar(10) NOT NULL default ''"), 'endTime' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['endTime'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'time', 'datepicker' => true, 'tl_class' => 'w50 wizard'), 'sql' => "varchar(10) NOT NULL default ''"), 'configRestrictions' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['configRestrictions'], 'inputType' => 'checkbox', 'exclude' => true, 'filter' => true, 'eval' => array('submitOnChange' => true, 'tl_class' => 'clr'), 'sql' => "char(1) NOT NULL default ''"), 'configCondition' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['configCondition'], 'exclude' => true, 'default' => '1', 'inputType' => 'radio', 'options' => array('1' => $GLOBALS['TL_LANG']['tl_iso_rule']['condition_true'], '0' => $GLOBALS['TL_LANG']['tl_iso_rule']['condition_false']), 'eval' => array('isAssociative' => true, 'tl_class' => 'w50'), 'sql' => "tinyint(1) NOT NULL default '0'"), 'configs' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['configs'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => \Isotope\Model\Config::getTable() . '.name', 'eval' => array('mandatory' => true, 'multiple' => true, 'doNotSaveEmpty' => true, 'tl_class' => 'clr w50 w50h'), 'load_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'loadRestrictions')), 'save_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'saveRestrictions'))), 'memberRestrictions' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['memberRestrictions'], 'inputType' => 'radio', 'default' => 'none', 'exclude' => true, 'filter' => true, 'options' => array('none', 'guests', 'groups', 'members'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_rule']['memberRestrictions'], 'eval' => array('submitOnChange' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => "varchar(32) NOT NULL default ''"), 'memberCondition' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['memberCondition'], 'exclude' => true, 'default' => '1', 'inputType' => 'radio', 'options' => array('1' => $GLOBALS['TL_LANG']['tl_iso_rule']['condition_true'], '0' => $GLOBALS['TL_LANG']['tl_iso_rule']['condition_false']), 'eval' => array('isAssociative' => true, 'tl_class' => 'w50'), 'sql' => "tinyint(1) NOT NULL default '0'"), 'groups' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['groups'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => 'tl_member_group.name', 'eval' => array('mandatory' => true, 'multiple' => true, 'doNotSaveEmpty' => true, 'tl_class' => 'clr'), 'load_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'loadRestrictions')), 'save_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'saveRestrictions'))), 'members' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['members'], 'exclude' => true, 'inputType' => 'tableLookup', 'eval' => array('mandatory' => true, 'doNotSaveEmpty' => true, 'tl_class' => 'clr', 'foreignTable' => 'tl_member', 'fieldType' => 'checkbox', 'listFields' => array('firstname', 'lastname', 'username', 'email'), 'searchFields' => array('firstname', 'lastname', 'username', 'email'), 'sqlWhere' => '', 'searchLabel' => 'Search members'), 'load_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'loadRestrictions')), 'save_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'saveRestrictions'))), 'productRestrictions' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['productRestrictions'], 'inputType' => 'radio', 'default' => 'none', 'exclude' => true, 'filter' => true, 'options' => array('none', 'producttypes', 'pages', 'products', 'variants', 'attribute'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_rule']['productRestrictions'], 'eval' => array('submitOnChange' => true, 'tl_class' => 'clr w50 w50h'), 'sql' => "varchar(32) NOT NULL default ''"), 'productCondition' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['productCondition'], 'exclude' => true, 'default' => '1', 'inputType' => 'radio', 'options' => array('1' => $GLOBALS['TL_LANG']['tl_iso_rule']['condition_true'], '0' => $GLOBALS['TL_LANG']['tl_iso_rule']['condition_false']), 'eval' => array('isAssociative' => true, 'tl_class' => 'w50'), 'sql' => "tinyint(1) NOT NULL default '0'"), 'producttypes' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['producttypes'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => \Isotope\Model\ProductType::getTable() . '.name', 'eval' => array('mandatory' => true, 'multiple' => true, 'doNotSaveEmpty' => true, 'tl_class' => 'clr'), 'load_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'loadRestrictions')), 'save_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'saveRestrictions'))), 'pages' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['pages'], 'exclude' => true, 'inputType' => 'pageTree', 'foreignKey' => 'tl_page.title', 'eval' => array('mandatory' => true, 'multiple' => true, 'fieldType' => 'checkbox', 'doNotSaveEmpty' => true, 'tl_class' => 'clr'), 'load_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'loadRestrictions')), 'save_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'saveRestrictions'))), 'products' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['products'], 'exclude' => true, 'inputType' => 'tableLookup', 'eval' => array('mandatory' => true, 'doNotSaveEmpty' => true, 'tl_class' => 'clr', 'foreignTable' => 'tl_iso_product', 'fieldType' => 'checkbox', 'listFields' => array('type' => "(SELECT name FROM " . \Isotope\Model\ProductType::getTable() . " WHERE " . \Isotope\Model\Product::getTable() . ".type=" . \Isotope\Model\ProductType::getTable() . ".id)", 'name', 'sku'), 'searchFields' => array('name', 'alias', 'sku', 'description'), 'sqlWhere' => 'pid=0', 'searchLabel' => 'Search products'), 'load_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'loadRestrictions')), 'save_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'saveRestrictions'))), 'variants' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['variants'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'doNotSaveEmpty' => true, 'csv' => ',', 'tl_class' => 'clr long'), 'load_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'loadRestrictions')), 'save_callback' => array(array('\\Isotope\\Backend\\Rule\\Callback', 'saveRestrictions'))), 'attributeName' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['attributeName'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('\\Isotope\\Backend\\Rule\\Callback', 'getAttributeNames'), 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'submitOnChange' => true, 'tl_class' => 'clr w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'attributeCondition' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['attributeCondition'], 'exclude' => true, 'inputType' => 'select', 'options' => array('eq', 'neq', 'lt', 'gt', 'elt', 'egt', 'starts', 'ends', 'contains'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_rule']['attributeCondition'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(8) NOT NULL default ''"), 'attributeValue' => array('exclude' => true, 'eval' => array('decodeEntities' => true, 'tl_class' => 'clr'), 'sql' => "varchar(255) NOT NULL default ''"), 'enabled' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_rule']['enabled'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'sql' => "char(1) NOT NULL default ''")));
Esempio n. 13
0
 /**
  * Returns all allowed product types as array
  *
  * @return array
  */
 public function getOptions()
 {
     /** @type \BackendUser $objUser */
     $objUser = \BackendUser::getInstance();
     $arrTypes = $objUser->iso_product_types;
     if (!$objUser->isAdmin && (!is_array($arrTypes) || empty($arrTypes))) {
         $arrTypes = array(0);
     }
     $t = ProductType::getTable();
     $arrProductTypes = array();
     $objProductTypes = \Database::getInstance()->execute("\n            SELECT id,name FROM {$t}\n            WHERE tstamp>0" . ($objUser->isAdmin ? '' : " AND id IN (" . implode(',', $arrTypes) . ")") . "\n            ORDER BY name\n        ");
     while ($objProductTypes->next()) {
         $arrProductTypes[$objProductTypes->id] = $objProductTypes->name;
     }
     return $arrProductTypes;
 }
Esempio n. 14
0
 *
 * 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');