/** * @param $arrData * @param $id * @return bool */ public function saveAttributeOptions($arrData, $id) { $arrAttributeOptions = array(); $time = time(); $ptable = \Isotope\Model\Attribute::getTable(); foreach ($arrData as $group => $groupData) { if (is_array($groupData)) { $arrAttributeOptions[] = array('pid' => $id, 'sorting' => 0, 'tstamp' => $time, 'ptable' => $ptable, 'type' => 'group', 'label' => $group, 'published' => 1); foreach ($groupData as $optionData) { if (is_array($optionData)) { //@todo if there are more options } else { $arrAttributeOptions[] = array('pid' => $id, 'sorting' => 0, 'tstamp' => $time, 'ptable' => $ptable, 'type' => 'option', 'label' => $optionData, 'published' => 1); } } } else { $arrAttributeOptions[] = array('pid' => $id, 'sorting' => 0, 'tstamp' => $time, 'ptable' => $ptable, 'type' => 'option', 'label' => $groupData, 'published' => 1); } } $sorting = 0; foreach ($arrAttributeOptions as $arrData) { $objAttributeOption = new AttributeOption(); $objAttributeOption->setRow($arrData); $objAttributeOption->sorting = $sorting; $objAttributeOption->save(); $sorting += 128; } return true; }
/** * Show price column in dcaWizard if attribute is not a variant option * * @param \Widget|object $objWidget * * @return string */ public function initializeTableOptions(\Widget $objWidget) { /** @type Attribute $objAttribute */ if (\Input::get('do') == 'iso_products') { $objAttribute = Attribute::findByFieldName($objWidget->name); } else { $objAttribute = Attribute::findByPk(\Input::get('id')); } if (null !== $objAttribute && !$objAttribute->isVariantOption()) { $objWidget->fields = array_merge($objWidget->fields, array('price')); } return AttributeOption::getTable(); }
/** * List child records of the table * * @param $row * * @return string */ public function listRecords($row) { if ($row['type'] == 'group') { $GLOBALS['TL_WRAPPERS']['stop'][] = 'group'; } $label = $row['label']; if ($row['isDefault']) { $label = '<strong>' . $label . '</strong>'; } if ($row['price'] != '' && isset($GLOBALS['TL_DCA'][AttributeOption::getTable()]['fields']['price'])) { $label .= ' <span style="color:#b3b3b3; padding-left:3px;">(' . $row['price'] . ')</span>'; } return $label; }
/** * Get options for the frontend product filter widget * * @param array $arrValues * * @return array */ public function getOptionsForProductFilter(array $arrValues) { switch ($this->optionsSource) { // @deprecated remove in Isotope 3.0 case 'attribute': $arrOptions = array(); $options = deserialize($this->options); if (!empty($options) && is_array($options)) { foreach ($options as $option) { if (in_array($option['value'], $arrValues)) { $option['label'] = Translation::get($option['label']); $arrOptions[] = $option; } } } return $arrOptions; break; case 'foreignKey': list($table, $field) = explode('.', $this->foreignKey, 2); $result = \Database::getInstance()->execute("SELECT id AS value, {$field} AS label FROM {$table}"); return $result->fetchAllAssoc(); break; case 'table': case 'product': /** @type \Isotope\Collection\AttributeOption $objOptions */ $objOptions = AttributeOption::findPublishedByIds($arrValues); return null === $objOptions ? array() : $objOptions->getArrayForFrontendWidget(null, false); break; default: throw new \UnexpectedValueException('Invalid options source "' . $this->optionsSource . '" for ' . static::$strTable . '.' . $this->field_name); } }
/** * Save attribute configuration into the given DCA array * @param array */ public function saveToDCA(array &$arrData) { // Keep field settings made through DCA code $arrField = is_array($arrData['fields'][$this->field_name]) ? $arrData['fields'][$this->field_name] : array(); $arrField['label'] = Translation::get(array($this->name, $this->description)); $arrField['exclude'] = true; $arrField['inputType'] = ''; $arrField['attributes'] = $this->row(); $arrField['attributes']['variant_option'] = $this->isVariantOption(); $arrField['attributes']['customer_defined'] = $this->isCustomerDefined(); $arrField['eval'] = is_array($arrField['eval']) ? array_merge($arrField['eval'], $arrField['attributes']) : $arrField['attributes']; if (!$this->isCustomerDefined()) { $arrField['inputType'] = (string) array_search($this->getBackendWidget(), $GLOBALS['BE_FFL']); } // Support numeric paths (fileTree) unset($arrField['eval']['path']); if ($this->path != '' && ($objFile = \FilesModel::findByPk($this->path)) !== null) { $arrField['eval']['path'] = $objFile->path; } // Contao tries to load an empty tinyMCE config otherwise (see #1111) if ($this->rte == '') { unset($arrField['eval']['rte']); } if ($this->be_filter) { $arrField['filter'] = true; } if ($this->be_search) { $arrField['search'] = true; } // Variant selection is always mandatory if ($this->isVariantOption()) { $arrField['eval']['mandatory'] = true; } if ($this->blankOptionLabel != '') { $arrField['eval']['blankOptionLabel'] = Translation::get($this->blankOptionLabel); } // Prepare options if ($this->optionsSource == 'foreignKey' && !$this->isVariantOption()) { $arrField['foreignKey'] = $this->parseForeignKey($this->foreignKey, $GLOBALS['TL_LANGUAGE']); unset($arrField['options']); unset($arrField['reference']); } else { $arrOptions = null; switch ($this->optionsSource) { case 'attribute': $arrOptions = deserialize($this->options); break; case 'foreignKey': $arrKey = explode('.', $this->foreignKey, 2); $arrOptions = \Database::getInstance()->execute("SELECT id AS value, {$arrKey[1]} AS label FROM {$arrKey[0]} ORDER BY label")->fetchAllAssoc(); break; case 'table': $query = new \DC_Multilingual_Query(AttributeOption::getTable()); $arrOptions = $query->addField('t1.id AS value')->addOrder('t1.label')->addWhere('t1.pid = ?')->getStatement()->execute($this->id)->fetchAllAssoc(); break; case 'product': $query = new \DC_Multilingual_Query(AttributeOption::getTable()); $arrOptions = $query->addField('t1.id AS value')->addOrder('t1.label')->addWhere('t1.field_name = ?')->getStatement()->execute($this->field_name)->fetchAllAssoc(); break; default: if ($this instanceof IsotopeAttributeWithOptions) { unset($arrField['options']); unset($arrField['reference']); } } if (!empty($arrOptions) && is_array($arrOptions)) { $arrField['default'] = array(); $arrField['options'] = array(); $arrField['eval']['isAssociative'] = true; unset($arrField['reference']); $strGroup = ''; foreach ($arrOptions as $option) { if ($option['group']) { $strGroup = Translation::get($option['label']); continue; } if ($strGroup != '') { $arrField['options'][$strGroup][$option['value']] = Translation::get($option['label']); } else { $arrField['options'][$option['value']] = Translation::get($option['label']); } if ($option['default']) { $arrField['default'][] = $option['value']; } } } } unset($arrField['eval']['foreignKey']); unset($arrField['eval']['options']); // Add field to the current DCA table $arrData['fields'][$this->field_name] = $arrField; }
<?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&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']); }
<?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 language file for field legends */ \System::loadLanguageFile('tl_iso_product'); /** * Table tl_iso_attribute */ $GLOBALS['TL_DCA']['tl_iso_attribute'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'closed' => true, 'ctable' => array(\Isotope\Model\AttributeOption::getTable()), 'onload_callback' => array(array('Isotope\\Backend', 'initializeSetupModule'), array('Isotope\\Backend\\Attribute\\Callback', 'disableFieldName')), 'onsubmit_callback' => array(array('Isotope\\Backend\\Attribute\\Callback', 'updateDatabase')), 'sql' => array('keys' => array('id' => 'primary', 'type' => 'index'))), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('legend', 'name'), 'flag' => 1, 'panelLayout' => 'sort,filter,search,limit'), 'label' => array('fields' => array('name', 'field_name', 'type'), 'format' => '<div style="float:left; width:200px">%s</div><div style="float:left; width:200px; color:#b3b3b3;">%s</div><div style="color:#b3b3b3">%s</div>'), '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_attribute']['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_attribute']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['tl_iso_attribute']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"'), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type', 'optionsSource', 'includeBlankOption', 'variant_option', 'storeFile', 'files'), 'default' => '{attribute_legend},name,field_name,type,legend', 'text' => '{attribute_legend},name,field_name,type,legend,customer_defined;{description_legend:hide},description;{config_legend},minlength,maxlength,rgxp,placeholder,mandatory,multilingual,datepicker;{search_filters_legend},fe_search,fe_sorting,be_search', 'textarea' => '{attribute_legend},name,field_name,type,legend,customer_defined;{description_legend:hide},description;{config_legend},minlength,maxlength,rgxp,placeholder,rte,mandatory,multilingual;{search_filters_legend},fe_search,fe_sorting,be_search', 'select' => '{attribute_legend},name,field_name,type,legend,variant_option,customer_defined;{description_legend:hide},description;{options_legend},optionsSource,includeBlankOption;{config_legend},mandatory,multiple,size;{search_filters_legend},fe_filter,fe_sorting,be_filter', 'selectproduct' => '{attribute_legend},name,field_name,type,legend,variant_option,customer_defined;{description_legend:hide},description;{options_legend},optionsSource,includeBlankOption;{config_legend},mandatory,multiple,size;{search_filters_legend},fe_sorting', 'selectvariant_option' => '{attribute_legend},name,field_name,type,legend,variant_option;{description_legend:hide},description;{options_legend},optionsSource,includeBlankOption;{search_filters_legend},fe_filter,fe_sorting,be_filter', 'radio' => '{attribute_legend},name,field_name,type,legend,variant_option,customer_defined;{description_legend:hide},description;{options_legend},optionsSource,includeBlankOption;{config_legend},mandatory;{search_filters_legend},fe_filter,fe_sorting', 'radioproduct' => '{attribute_legend},name,field_name,type,legend,variant_option,customer_defined;{description_legend:hide},description;{options_legend},optionsSource,includeBlankOption;{config_legend},mandatory;{search_filters_legend},fe_sorting', 'radiovariant_option' => '{attribute_legend},name,field_name,type,legend,variant_option;{description_legend:hide},description;{options_legend},optionsSource,includeBlankOption;{search_filters_legend},fe_filter,fe_sorting,be_filter', 'checkbox' => '{attribute_legend},name,field_name,type,legend,customer_defined;{description_legend:hide},description;{options_legend},optionsSource;{config_legend},mandatory,multiple;{search_filters_legend},fe_filter,fe_sorting', 'checkboxproduct' => '{attribute_legend},name,field_name,type,legend,customer_defined;{description_legend:hide},description;{options_legend},optionsSource;{config_legend},mandatory,multiple;{search_filters_legend},fe_sorting', 'conditionalselect' => '{attribute_legend},name,field_name,type,legend,customer_defined;{description_legend:hide},description;{options_legend},optionsSource,includeBlankOption;{config_legend},mandatory,multiple,size,conditionField;{search_filters_legend},fe_filter,fe_sorting', 'mediaManager' => '{attribute_legend},name,field_name,type,legend;{description_legend:hide},description;{config_legend},extensions,mandatory', 'fileTree' => '{attribute_legend},name,field_name,type,legend;{description_legend:hide},description;{config_legend},fieldType,path,mandatory,files', 'downloads' => '{attribute_legend},name,field_name,type,legend;{description_legend:hide},description;{config_legend},fieldType,sortBy,path,mandatory,files', 'upload' => '{attribute_legend},name,field_name,type,legend;{description_legend:hide},description;{config_legend},extensions,maxlength,mandatory;{store_legend:hide},storeFile', 'media' => '{attribute_legend},name,field_name,type,legend;{description_legend:hide},description;{config_legend},path,mandatory'), 'subpalettes' => array('storeFile' => 'uploadFolder,useHomeDir,doNotOverwrite', 'files' => 'extensions,filesOnly', 'optionsSource_attribute' => 'options', 'optionsSource_table' => 'optionsTable', 'optionsSource_foreignKey' => 'foreignKey', 'includeBlankOption' => 'blankOptionLabel'), '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_attribute']['name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'field_name' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['field_name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 30, 'unique' => true, 'doNotCopy' => true, 'doNotSaveEmpty' => true, 'tl_class' => 'w50'), 'sql' => "varchar(30) NOT NULL default ''", 'save_callback' => array(array('Isotope\\Backend\\Attribute\\Callback', 'validateFieldName'))), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['type'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => function () { return \Isotope\Model\Attribute::getModelTypeOptions(); }, 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'submitOnChange' => true, 'helpwizard' => true, 'tl_class' => 'w50', 'chosen' => true), 'reference' => &$GLOBALS['TL_LANG']['ATTR'], 'sql' => "varchar(64) NOT NULL default ''"), 'legend' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['legend'], 'exclude' => true, 'default' => 'options_legend', 'inputType' => 'select', 'options' => array('general_legend', 'meta_legend', 'pricing_legend', 'inventory_legend', 'shipping_legend', 'options_legend', 'media_legend', 'expert_legend', 'publish_legend'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_product'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'chosen' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'description' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['description'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'clr long'), 'sql' => "varchar(255) NOT NULL default ''"), 'optionsSource' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['optionsSource'], 'exclude' => true, 'inputType' => 'radio', 'options_callback' => function ($dc) { $arrOptions = array('table', 'foreignKey', 'attribute'); if ($dc->activeRecord->variant_option == '' && $dc->activeRecord->customer_defined == '1') { $arrOptions = array('table', 'product', 'foreignKey', 'attribute'); } return $arrOptions; }, 'reference' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['optionsSource'], 'eval' => array('mandatory' => true, 'submitOnChange' => true, 'tl_class' => 'clr'), 'sql' => "varchar(16) NOT NULL default ''"), 'options' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['options'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'eval' => array('mandatory' => true, 'tl_class' => 'clr', 'columnsCallback' => array('Isotope\\Backend\\Attribute\\OptionsWizard', 'getColumns')), 'sql' => "blob NULL"), 'optionsTable' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['optionsTable'], 'exclude' => true, 'inputType' => 'dcaWizardMultilingual', 'foreignTableCallback' => array('Isotope\\Backend\\Attribute\\Callback', 'initializeTableOptions'), 'eval' => array('fields' => array('type', 'label', 'isDefault', 'published'), 'tl_class' => 'clr', 'editButtonLabel' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['optionsTable_edit'], 'showOperations' => true, 'operations' => array('edit', 'show'))), 'foreignKey' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['foreignKey'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('mandatory' => true, 'style' => 'height:80px', 'decodeEntities' => true), 'sql' => "text NULL", 'save_callback' => array(array('Isotope\\Backend\\Attribute\\Callback', 'validateForeignKey'))), 'includeBlankOption' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['includeBlankOption'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true, 'tl_class' => 'w50 m12'), 'sql' => "char(1) NOT NULL default ''"), 'blankOptionLabel' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['blankOptionLabel'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'variant_option' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['variant_option'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true, 'tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'be_search' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['be_search'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'be_filter' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['be_filter'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'customer_defined' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['customer_defined'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true, 'tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'mandatory' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['mandatory'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'fe_filter' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['fe_filter'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'fe_search' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['fe_search'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'fe_sorting' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['fe_sorting'], 'exclude' => true, 'inputType' => 'checkbox', 'sql' => "char(1) NOT NULL default ''"), 'multiple' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['multiple'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'size' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['size'], 'exclude' => true, 'inputType' => 'text', 'default' => 5, 'eval' => array('rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "smallint(5) unsigned NOT NULL default '0'"), 'extensions' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['extensions'], 'exclude' => true, 'default' => 'jpg,jpeg,gif,png', 'inputType' => 'text', 'eval' => array('mandatory' => true, 'rgxp' => 'extnd', 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'rte' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['rte'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Isotope\\Backend\\Attribute\\Callback', 'getRTE'), 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50', 'chosen' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'multilingual' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['multilingual'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'rgxp' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['rgxp'], 'exclude' => true, 'inputType' => 'select', 'options' => array('digit', 'alpha', 'alnum', 'extnd', 'date', 'time', 'datim', 'phone', 'email', 'url', 'price', 'discount', 'surcharge'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_attribute'], 'eval' => array('helpwizard' => true, 'includeBlankOption' => true, 'tl_class' => 'w50', 'chosen' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'placeholder' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['placeholder'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('decodeEntities' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'minlength' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['minlength'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'maxlength' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['maxlength'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'conditionField' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['conditionField'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Isotope\\Backend\\Attribute\\Callback', 'getConditionFields'), 'eval' => array('includeBlankOption' => true, 'mandatory' => true, 'tl_class' => 'w50', 'chosen' => true), 'sql' => "varchar(30) NOT NULL default ''"), 'fieldType' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['fieldType'], 'exclude' => true, 'inputType' => 'radio', 'options' => array('checkbox', 'radio'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_attribute'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(8) NOT NULL default ''"), 'files' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['files'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true, 'tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'filesOnly' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['filesOnly'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50 m12'), 'sql' => "char(1) NOT NULL default ''"), 'sortBy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['sortBy'], 'exclude' => true, 'inputType' => 'select', 'options' => array('custom', 'name_asc', 'name_desc', 'date_asc', 'date_desc', 'random'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_attribute'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'path' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['path'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('fieldType' => 'radio', 'tl_class' => 'clr'), 'sql' => "binary(16) NULL"), 'storeFile' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['storeFile'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'uploadFolder' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['uploadFolder'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('fieldType' => 'radio', 'tl_class' => 'clr'), 'sql' => "binary(16) NULL"), 'useHomeDir' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['useHomeDir'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'doNotOverwrite' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['doNotOverwrite'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'datepicker' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_attribute']['datepicker'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''", 'save_callback' => array(array('Isotope\\Backend\\Attribute\\Callback', 'validateDatepicker')))));
$GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_order_status_change']['file_name'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_order_status_change']['email_text']; $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_order_status_change']['file_content'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_order_status_change']['email_text']; $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['recipients'] = array('admin_email', 'address_email', 'member_email'); $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['email_subject'] = array('admin_email', 'address_*', 'address_old_*', 'member_*', 'config_*'); $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['email_text'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['email_subject']; $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['email_sender_name'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['email_subject']; $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['email_sender_address'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['email_subject']; $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['email_replyTo'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['email_subject']; $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['file_name'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['email_subject']; $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['file_content'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_memberaddress_change']['email_subject']; /** * Models */ $GLOBALS['TL_MODELS'][\Isotope\Model\Address::getTable()] = 'Isotope\\Model\\Address'; $GLOBALS['TL_MODELS'][\Isotope\Model\Attribute::getTable()] = 'Isotope\\Model\\Attribute'; $GLOBALS['TL_MODELS'][\Isotope\Model\AttributeOption::getTable()] = 'Isotope\\Model\\AttributeOption'; $GLOBALS['TL_MODELS'][\Isotope\Model\BasePrice::getTable()] = 'Isotope\\Model\\BasePrice'; $GLOBALS['TL_MODELS'][\Isotope\Model\Config::getTable()] = 'Isotope\\Model\\Config'; $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';