Exemplo n.º 1
0
 /**
  * Add default order status options if none are set
  */
 public function addDefault()
 {
     if (\Input::get('act') != '' || OrderStatus::countAll() > 0) {
         return;
     }
     $arrStatus = array(array('name' => 'Pending', 'welcomescreen' => '1'), array('name' => 'Processing'), array('name' => 'Complete', 'paid' => '1'), array('name' => 'On Hold'), array('name' => 'Cancelled'));
     $sorting = 0;
     foreach ($arrStatus as $arrData) {
         $objStatus = new OrderStatus();
         $objStatus->setRow($arrData);
         $objStatus->sorting = $sorting;
         $objStatus->save();
         $sorting += 128;
     }
 }
 public static function getOrderStates()
 {
     $arrOptions = array();
     if (($objOrderStatus = \Isotope\Model\OrderStatus::findAll()) !== null) {
         while ($objOrderStatus->next()) {
             $arrOptions[$objOrderStatus->id] = $objOrderStatus->name;
         }
     }
     return $arrOptions;
 }
Exemplo n.º 3
0
 protected function compile()
 {
     $periodFactory = new PeriodFactory();
     $arrSession = \Session::getInstance()->get('iso_reports');
     $intConfig = (int) $arrSession[$this->name]['iso_config'];
     $strPeriod = (string) $arrSession[$this->name]['period'];
     $intStart = (int) $arrSession[$this->name]['start'];
     $intStop = (int) $arrSession[$this->name]['stop'];
     $intStatus = (int) $arrSession[$this->name]['iso_status'];
     $period = $periodFactory->create($strPeriod);
     $intStart = $period->getPeriodStart($intStart);
     $intStop = $period->getPeriodEnd($intStop);
     $dateFrom = $period->getKey($intStart);
     $dateTo = $period->getKey($intStop);
     $objData = \Database::getInstance()->query("\n            SELECT\n                c.id AS config_id,\n                c.currency,\n                o.locked AS date,\n                COUNT(o.id) AS total_orders,\n                COUNT(i.id) AS total_products,\n                COUNT(DISTINCT o.id) AS total_orders,\n                COUNT(DISTINCT i.id) AS total_products,\n                SUM(i.quantity) AS total_items,\n                SUM(i.tax_free_price * i.quantity) AS total_sales,\n                " . $period->getSqlField('o.' . $this->strDateField) . " AS dateGroup\n            FROM " . ProductCollection::getTable() . " o\n            LEFT JOIN " . ProductCollectionItem::getTable() . " i ON o.id=i.pid\n            LEFT JOIN " . OrderStatus::getTable() . " os ON os.id=o.order_status\n            LEFT OUTER JOIN " . Config::getTable() . " c ON o.config_id=c.id\n            WHERE o.type='order' AND o.order_status>0 AND o.locked!=''\n            " . ($intStatus > 0 ? " AND o.order_status=" . $intStatus : '') . "\n            " . $this->getProductProcedure('i', 'product_id') . "\n            " . ($intConfig > 0 ? " AND c.id=" . $intConfig : '') . "\n            " . $this->getConfigProcedure('c') . "\n            GROUP BY config_id, dateGroup\n            HAVING dateGroup>={$dateFrom} AND dateGroup<={$dateTo}\n        ");
     $arrCurrencies = array();
     $arrData = $this->initializeData($period, $intStart, $intStop);
     $arrChart = $this->initializeChart($period, $intStart, $intStop);
     while ($objData->next()) {
         $arrCurrencies[$objData->currency] = $objData->config_id;
         $arrData['rows'][$objData->dateGroup]['columns'][1]['value'] += $objData->total_orders;
         $arrData['rows'][$objData->dateGroup]['columns'][2]['value'] += $objData->total_products;
         $arrData['rows'][$objData->dateGroup]['columns'][3]['value'] += $objData->total_items;
         if (!is_array($arrData['rows'][$objData->dateGroup]['columns'][4]['value'])) {
             $arrData['rows'][$objData->dateGroup]['columns'][4]['value'] = array();
         }
         $arrData['rows'][$objData->dateGroup]['columns'][4]['value'][$objData->currency] = $arrData['rows'][$objData->dateGroup]['columns'][4]['value'][$objData->currency] + $objData->total_sales;
         // Summary in the footer
         $arrData['footer'][1]['value'] += $objData->total_orders;
         $arrData['footer'][2]['value'] += $objData->total_products;
         $arrData['footer'][3]['value'] += $objData->total_items;
         $arrData['footer'][4]['value'][$objData->currency] = (double) $arrData['footer'][4]['value'][$objData->currency] + $objData->total_sales;
         // Generate chart data
         $arrChart[$objData->currency]['data'][$objData->dateGroup]['y'] = (double) $arrChart[$objData->currency]['data'][$objData->dateGroup]['y'] + $objData->total_sales;
     }
     // Apply formatting
     $arrData = $this->formatValues($arrData, $arrCurrencies);
     $this->Template->data = $arrData;
     $this->Template->chart = $arrChart;
     $this->Template->periodFormat = $period->getJavascriptClosure();
 }
Exemplo n.º 4
0
 protected function compile()
 {
     $arrSession = \Session::getInstance()->get('iso_reports');
     $intConfig = (int) $arrSession[$this->name]['iso_config'];
     $strPeriod = (string) $arrSession[$this->name]['period'];
     $intStart = (int) $arrSession[$this->name]['start'];
     $intStop = (int) $arrSession[$this->name]['stop'];
     $intStatus = (int) $arrSession[$this->name]['iso_status'];
     list($publicDate, $privateDate, $sqlDate) = $this->getPeriodConfiguration($strPeriod);
     $dateFrom = date($privateDate, $intStart);
     $dateTo = date($privateDate, $intStop);
     $objData = \Database::getInstance()->prepare("\n            SELECT\n                c.id AS config_id,\n                c.currency,\n                o.locked AS date,\n                COUNT(o.id) AS total_orders,\n                COUNT(i.id) AS total_products,\n                COUNT(DISTINCT o.id) AS total_orders,\n                COUNT(DISTINCT i.id) AS total_products,\n                SUM(i.quantity) AS total_items,\n                SUM(i.tax_free_price * i.quantity) AS total_sales,\n                DATE_FORMAT(FROM_UNIXTIME(o.{$this->strDateField}), ?) AS dateGroup\n            FROM " . \Isotope\Model\ProductCollection::getTable() . " o\n            LEFT JOIN " . \Isotope\Model\ProductCollectionItem::getTable() . " i ON o.id=i.pid\n            LEFT JOIN " . \Isotope\Model\OrderStatus::getTable() . " os ON os.id=o.order_status\n            LEFT OUTER JOIN " . \Isotope\Model\Config::getTable() . " c ON o.config_id=c.id\n            WHERE o.type='order' AND o.order_status>0 AND o.locked!=''\n            " . ($intStatus > 0 ? " AND o.order_status=" . $intStatus : '') . "\n            " . $this->getProductProcedure('i', 'product_id') . "\n            " . ($intConfig > 0 ? " AND c.id=" . $intConfig : '') . "\n            " . $this->getConfigProcedure('c') . "\n            GROUP BY config_id, dateGroup\n            HAVING dateGroup>={$dateFrom} AND dateGroup<={$dateTo}\n        ")->execute($sqlDate);
     $arrCurrencies = array();
     $arrData = $this->initializeData($strPeriod, $intStart, $intStop, $privateDate, $publicDate);
     $arrChart = $this->initializeChart($strPeriod, $intStart, $intStop, $privateDate, $publicDate);
     while ($objData->next()) {
         $arrCurrencies[$objData->currency] = $objData->config_id;
         $arrData['rows'][$objData->dateGroup]['columns'][1]['value'] += $objData->total_orders;
         $arrData['rows'][$objData->dateGroup]['columns'][2]['value'] += $objData->total_products;
         $arrData['rows'][$objData->dateGroup]['columns'][3]['value'] += $objData->total_items;
         if (!is_array($arrData['rows'][$objData->dateGroup]['columns'][4]['value'])) {
             $arrData['rows'][$objData->dateGroup]['columns'][4]['value'] = array();
         }
         $arrData['rows'][$objData->dateGroup]['columns'][4]['value'][$objData->currency] = $arrData['rows'][$objData->dateGroup]['columns'][4]['value'][$objData->currency] + $objData->total_sales;
         // Summary in the footer
         $arrData['footer'][1]['value'] += $objData->total_orders;
         $arrData['footer'][2]['value'] += $objData->total_products;
         $arrData['footer'][3]['value'] += $objData->total_items;
         $arrData['footer'][4]['value'][$objData->currency] = (double) $arrData['footer'][4]['value'][$objData->currency] + $objData->total_sales;
         // Generate chart data
         $arrChart[$objData->currency]['data'][$objData->dateGroup]['y'] = (double) $arrChart['rows'][$objData->dateGroup]['columns'][$objData->currency]['value'] + $objData->total_sales;
     }
     // Apply formatting
     $arrData = $this->formatValues($arrData, $arrCurrencies);
     $this->Template->data = $arrData;
     $this->Template->chart = $arrChart;
 }
Exemplo n.º 5
0
 protected function compile()
 {
     $periodFactory = new PeriodFactory();
     $arrSession = \Session::getInstance()->get('iso_reports');
     $strPeriod = (string) $arrSession[$this->name]['period'];
     $intColumns = (int) $arrSession[$this->name]['columns'];
     $blnVariants = (bool) $arrSession[$this->name]['variants'];
     $intStatus = (int) $arrSession[$this->name]['iso_status'];
     if ($arrSession[$this->name]['from'] == '') {
         $intStart = strtotime('-' . ($intColumns - 1) . ' ' . $strPeriod);
     } else {
         $intStart = (int) $arrSession[$this->name]['from'];
     }
     $period = $periodFactory->create($strPeriod);
     $intStart = $period->getPeriodStart($intStart);
     $dateFrom = $period->getKey($intStart);
     $dateTo = $period->getKey(strtotime('+ ' . ($intColumns - 1) . ' ' . $strPeriod, $intStart));
     $arrData = array('rows' => array());
     $arrData['header'] = $this->getHeader($period, $intStart, $intColumns);
     $groupVariants = $blnVariants ? 'p1.id' : 'IF(p1.pid=0, p1.id, p1.pid)';
     $objProducts = \Database::getInstance()->query("\n            SELECT\n                IFNULL({$groupVariants}, i.product_id) AS product_id,\n                IFNULL(p1.name, i.name) AS variant_name,\n                IFNULL(p2.name, i.name) AS product_name,\n                p1.sku AS product_sku,\n                p2.sku AS variant_sku,\n                IF(p1.pid=0, p1.type, p2.type) AS type,\n                i.configuration AS product_configuration,\n                SUM(i.quantity) AS quantity,\n                SUM(i.tax_free_price * i.quantity) AS total,\n                " . $period->getSqlField($this->strDateField) . " AS dateGroup\n            FROM " . ProductCollectionItem::getTable() . " i\n            LEFT JOIN " . ProductCollection::getTable() . " o ON i.pid=o.id\n            LEFT JOIN " . OrderStatus::getTable() . " os ON os.id=o.order_status\n            LEFT OUTER JOIN " . Product::getTable() . " p1 ON i.product_id=p1.id\n            LEFT OUTER JOIN " . Product::getTable() . " p2 ON p1.pid=p2.id\n            WHERE o.type='order' AND o.order_status>0 AND o.locked!=''\n                " . ($intStatus > 0 ? " AND o.order_status=" . $intStatus : '') . "\n                " . $this->getProductProcedure('p1') . "\n                " . $this->getConfigProcedure('o', 'config_id') . "\n            GROUP BY dateGroup, product_id\n            HAVING dateGroup>={$dateFrom} AND dateGroup<={$dateTo}\n        ");
     // Cache product types so call to findByPk() will trigger the registry
     ProductType::findMultipleByIds($objProducts->fetchEach('type'));
     $arrRaw = array();
     $objProducts->reset();
     // Prepare product data
     while ($objProducts->next()) {
         $arrAttributes = array();
         $arrVariantAttributes = array();
         $blnHasVariants = false;
         // Can't use it without a type
         if ($objProducts->type > 0 && ($objType = ProductType::findByPk($objProducts->type)) !== null) {
             /** @type ProductType $objType */
             $arrAttributes = $objType->getAttributes();
             $arrVariantAttributes = $objType->getVariantAttributes();
             $blnHasVariants = $objType->hasVariants();
             $product_type_name = $objType->name;
         }
         $arrOptions = array('name' => $objProducts->variant_name);
         // Use product title if name is not a variant attribute
         if ($blnHasVariants && !in_array('name', $arrVariantAttributes)) {
             $arrOptions['name'] = $objProducts->product_name;
         }
         $strSku = $blnHasVariants ? $objProducts->variant_sku : $objProducts->product_sku;
         if (in_array('sku', $arrAttributes) && $strSku != '') {
             $arrOptions['name'] = sprintf('%s <span style="color:#b3b3b3; padding-left:3px;">[%s]</span>', $arrOptions['name'], $strSku);
         }
         if ($blnVariants && $blnHasVariants) {
             if (in_array('sku', $arrVariantAttributes) && $objProducts->product_sku != '') {
                 $arrOptions['name'] = sprintf('%s <span style="color:#b3b3b3; padding-left:3px;">[%s]</span>', $arrOptions['name'], $objProducts->product_sku);
             }
             foreach (deserialize($objProducts->product_configuration, true) as $strName => $strValue) {
                 if (isset($GLOBALS['TL_DCA']['tl_iso_product']['fields'][$strName])) {
                     $strValue = $GLOBALS['TL_DCA']['tl_iso_product']['fields'][$strName]['options'][$strValue] ? $GLOBALS['TL_DCA']['tl_iso_product']['fields'][$strName]['options'][$strValue] : $strValue;
                     $strName = $GLOBALS['TL_DCA']['tl_iso_product']['fields'][$strName]['label'][0] ? $GLOBALS['TL_DCA']['tl_iso_product']['fields'][$strName]['label'][0] : $strName;
                 }
                 $arrOptions[] = '<span class="variant">' . $strName . ': ' . $strValue . '</span>';
             }
         }
         $arrOptions['name'] = '<span class="product">' . $arrOptions['name'] . '</span>';
         $arrRaw[$objProducts->product_id]['name'] = implode('<br>', $arrOptions);
         $arrRaw[$objProducts->product_id]['product_type_name'] = $product_type_name;
         $arrRaw[$objProducts->product_id][$objProducts->dateGroup] = (double) $arrRaw[$objProducts->product_id][$objProducts->dateGroup] + (double) $objProducts->total;
         $arrRaw[$objProducts->product_id][$objProducts->dateGroup . '_quantity'] = (int) $arrRaw[$objProducts->product_id][$objProducts->dateGroup . '_quantity'] + (int) $objProducts->quantity;
         $arrRaw[$objProducts->product_id]['total'] = (double) $arrRaw[$objProducts->product_id]['total'] + (double) $objProducts->total;
         $arrRaw[$objProducts->product_id]['quantity'] = (int) $arrRaw[$objProducts->product_id]['quantity'] + (int) $objProducts->quantity;
     }
     // Prepare columns
     $arrColumns = array();
     for ($i = 0; $i < $intColumns; $i++) {
         $arrColumns[] = $period->getKey($intStart);
         $intStart = $period->getNext($intStart);
     }
     $arrFooter = array();
     // Sort the data
     if ($arrSession[$this->name]['tl_sort'] == 'product_name') {
         usort($arrRaw, function ($a, $b) {
             return strcasecmp($a['name'], $b['name']);
         });
     } else {
         usort($arrRaw, function ($a, $b) {
             return $a['total'] == $b['total'] ? 0 : ($a['total'] < $b['total'] ? 1 : -1);
         });
     }
     // Generate data
     foreach ($arrRaw as $arrProduct) {
         $arrRow = array(array('value' => array($arrProduct['name'], sprintf('<span style="color:#b3b3b3;">[%s]</span>', $arrProduct['product_type_name']))));
         $arrFooter[0] = array('value' => $GLOBALS['TL_LANG']['ISO_REPORT']['sums']);
         foreach ($arrColumns as $i => $column) {
             $arrRow[$i + 1] = array('value' => Isotope::formatPriceWithCurrency($arrProduct[$column]) . ($arrProduct[$column . '_quantity'] !== null ? '<br><span class="variant">' . Isotope::formatItemsString($arrProduct[$column . '_quantity']) . '</span>' : ''));
             $arrFooter[$i + 1] = array('total' => $arrFooter[$i + 1]['total'] + $arrProduct[$column], 'quantity' => $arrFooter[$i + 1]['quantity'] + $arrProduct[$column . '_quantity']);
         }
         $arrRow[$i + 2] = array('value' => Isotope::formatPriceWithCurrency($arrProduct['total']) . ($arrProduct['quantity'] !== null ? '<br><span class="variant">' . Isotope::formatItemsString($arrProduct['quantity']) . '</span>' : ''));
         $arrFooter[$i + 2] = array('total' => $arrFooter[$i + 2]['total'] + $arrProduct['total'], 'quantity' => $arrFooter[$i + 2]['quantity'] + $arrProduct['quantity']);
         $arrData['rows'][] = array('columns' => $arrRow);
     }
     for ($i = 1; $i < count($arrFooter); $i++) {
         $arrFooter[$i]['value'] = Isotope::formatPriceWithCurrency($arrFooter[$i]['total']) . '<br><span class="variant">' . Isotope::formatItemsString($arrFooter[$i]['quantity']) . '</span>';
         unset($arrFooter[$i]['total']);
     }
     $arrData['footer'] = $arrFooter;
     $this->Template->data = $arrData;
 }
Exemplo n.º 6
0
$GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_order_status_change']['email_replyTo'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_order_status_change']['recipients'];
$GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_order_status_change']['email_recipient_cc'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_order_status_change']['recipients'];
$GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_order_status_change']['email_recipient_bcc'] =& $GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['isotope']['iso_order_status_change']['recipients'];
/**
 * 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\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';
$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';
Exemplo n.º 7
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
 */
/**
 * Table tl_iso_config
 */
$GLOBALS['TL_DCA']['tl_iso_config'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'closed' => true, 'onload_callback' => array(array('Isotope\\Backend', 'initializeSetupModule'), array('Isotope\\Backend\\Config\\Callback', 'checkPermission'), array('Isotope\\Backend\\OrderStatus\\Callback', 'addDefault')), 'onsubmit_callback' => array(array('Isotope\\Backend', 'truncateProductCache'), array('Isotope\\Backend\\Config\\Callback', 'convertCurrencies')), 'sql' => array('keys' => array('id' => 'primary'))), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('name'), 'flag' => 1), 'label' => array('fields' => array('name', 'fallback'), 'format' => '%s <span style="color:#b3b3b3; padding-left:3px;">[%s]</span>', 'label_callback' => array('Isotope\\Backend\\Config\\Callback', 'addIcon')), '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_config']['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_config']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif', 'button_callback' => array('Isotope\\Backend\\Config\\Callback', 'copyConfig')), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['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\\Config\\Callback', 'deleteConfig')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('currencySymbol', 'currencyAutomator', 'ga_enable'), 'default' => '
            {name_legend},name,label,fallback;
            {address_legend:hide},firstname,lastname,company,vat_no,street_1,street_2,street_3,postal,city,country,subdivision,email,phone;
            {checkout_legend},address_fields,billing_country,shipping_country,billing_countries,shipping_countries,limitMemberCountries,vatNoValidators;
            {pricing_legend},priceDisplay,currencyFormat,priceRoundPrecision,priceRoundIncrement;
            {currency_legend},currency,currencyPosition,currencySymbol;
            {converter_legend:hide},priceCalculateFactor,priceCalculateMode,currencyAutomator;
            {order_legend:hide},orderPrefix,orderDigits,orderstatus_new,orderstatus_error;
            {config_legend},templateGroup,cartMinSubtotal;
            {products_legend},newProductPeriod;
            {analytics_legend},ga_enable'), 'subpalettes' => array('currencySymbol' => 'currencySpace', 'currencyAutomator' => 'currencyOrigin,currencyProvider', 'ga_enable' => 'ga_account,ga_member'), '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_config']['name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'unique' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'label' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['label'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'fallback' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['fallback'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('doNotCopy' => true, 'fallback' => true, 'tl_class' => 'w50 m12'), 'sql' => "char(1) NOT NULL default ''"), 'firstname' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['firstname'], 'exclude' => true, 'search' => true, 'sorting' => true, 'flag' => 1, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'lastname' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['lastname'], 'exclude' => true, 'search' => true, 'sorting' => true, 'flag' => 1, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'company' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['company'], 'exclude' => true, 'search' => true, 'sorting' => true, 'flag' => 1, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'vat_no' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['vat_no'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'street_1' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['street_1'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'street_2' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['street_2'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'street_3' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['street_3'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'postal' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['postal'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 32, 'tl_class' => 'clr w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'city' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['city'], 'exclude' => true, 'filter' => true, 'search' => true, 'sorting' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'subdivision' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['subdivision'], 'exclude' => true, 'sorting' => true, 'inputType' => 'conditionalselect', 'options_callback' => array('Isotope\\Backend', 'getSubdivisions'), 'eval' => array('conditionField' => 'country', 'includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'country' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['country'], 'exclude' => true, 'filter' => true, 'sorting' => true, 'inputType' => 'select', 'default' => (string) BackendUser::getInstance()->country, 'options_callback' => function () {
    return \System::getCountries();
}, 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "varchar(2) NOT NULL default ''"), 'phone' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['phone'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 64, 'rgxp' => 'phone', 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'email' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['email'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 64, 'rgxp' => 'email', 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'address_fields' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['address_fields'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'eval' => array('tl_class' => 'clr', 'buttons' => array('copy' => false, 'delete' => false), 'columnFields' => array('name' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['address_fields']['name'], 'input_field_callback' => array('Isotope\\Backend\\Config\\AddressFieldsWizard', 'getNextName'), 'eval' => array('hideHead' => true, 'tl_class' => 'mcwUpdateFields')), 'billing' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['address_fields']['billing'], 'inputType' => 'select', 'options' => array('disabled', 'enabled', 'mandatory'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_config']['address_fields'], 'eval' => array('style' => 'width:140px')), 'shipping' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['address_fields']['shipping'], 'inputType' => 'select', 'options' => array('disabled', 'enabled', 'mandatory'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_config']['address_fields'], 'eval' => array('style' => 'width:140px')))), 'load_callback' => array(array('Isotope\\Backend\\Config\\AddressFieldsWizard', 'load')), 'save_callback' => array(array('Isotope\\Backend\\Config\\AddressFieldsWizard', 'save')), 'sql' => "blob NULL"), 'billing_country' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['billing_country'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => function () {
    return \System::getCountries();
}, 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50', 'chosen' => true), 'sql' => "varchar(2) NOT NULL default ''"), 'shipping_country' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['shipping_country'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => function () {
    return \System::getCountries();
}, 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50', 'chosen' => true), 'sql' => "varchar(2) NOT NULL default ''"), 'billing_countries' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['billing_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_countries' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['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"), 'limitMemberCountries' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['limitMemberCountries'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'vatNoValidators' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['vatNoValidators'], 'exclude' => true, 'inputType' => 'checkboxWizard', 'options' => array_keys($GLOBALS['ISO_VAT']), 'reference' => $GLOBALS['TL_LANG']['ISO_VAT'], 'eval' => array('multiple' => true, 'tl_class' => 'clr'), 'sql' => "blob NULL"), 'priceDisplay' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['priceDisplay'], 'exclude' => true, 'default' => 'gross', 'inputType' => 'select', 'options' => array(\Isotope\Model\Config::PRICE_DISPLAY_NET, \Isotope\Model\Config::PRICE_DISPLAY_GROSS, \Isotope\Model\Config::PRICE_DISPLAY_FIXED, \Isotope\Model\Config::PRICE_DISPLAY_LEGACY), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_config'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'helpwizard' => true), 'sql' => "varchar(9) NOT NULL default ''"), 'currencyFormat' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['currencyFormat'], 'exclude' => true, 'inputType' => 'select', 'options' => array_keys($GLOBALS['ISO_NUM']), 'eval' => array('includeBlankOption' => true, 'mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(20) NOT NULL default ''"), 'priceRoundPrecision' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['priceRoundPrecision'], 'exclude' => true, 'default' => '2', 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 1, 'rgpx' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(1) unsigned NOT NULL default '2'"), 'priceRoundIncrement' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['priceRoundIncrement'], 'exclude' => true, 'inputType' => 'select', 'options' => array('0.01', '0.05'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(4) NOT NULL default ''"), 'cartMinSubtotal' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['cartMinSubtotal'], 'exclude' => true, 'default' => '0.00', 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 13, 'rgpx' => 'price', 'tl_class' => 'w50'), 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'currency' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['currency'], 'exclude' => true, 'inputType' => 'select', 'options' => &$GLOBALS['TL_LANG']['CUR'], 'eval' => array('includeBlankOption' => true, 'mandatory' => true, 'chosen' => true, 'tl_class' => 'w50'), 'sql' => "varchar(3) NOT NULL default ''"), 'currencySymbol' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['currencySymbol'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true, 'tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'currencySpace' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['currencySpace'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'currencyPosition' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['currencyPosition'], 'exclude' => true, 'inputType' => 'radio', 'default' => 'left', 'options' => array('left', 'right'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_config'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(5) NOT NULL default ''"), 'priceCalculateFactor' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['priceCalculateFactor'], 'exclude' => true, 'default' => 1, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(10) NOT NULL default ''"), 'priceCalculateMode' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['priceCalculateMode'], 'exclude' => true, 'default' => 'mul', 'inputType' => 'radio', 'options' => array('mul', 'div'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_config'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'sql' => "varchar(3) NOT NULL default ''"), 'currencyAutomator' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['currencyAutomator'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true, 'tl_class' => 'clr', 'helpwizard' => true), 'save_callback' => array(array('Isotope\\Backend\\Config\\Callback', 'checkNeedToConvertCurrencies')), 'sql' => "char(1) NOT NULL default ''"), 'currencyOrigin' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['currencyOrigin'], 'exclude' => true, 'inputType' => 'select', 'options' => &$GLOBALS['TL_LANG']['CUR'], 'eval' => array('includeBlankOption' => true, 'mandatory' => true, 'tl_class' => 'w50'), 'save_callback' => array(array('Isotope\\Backend\\Config\\Callback', 'checkNeedToConvertCurrencies')), 'sql' => "varchar(3) NOT NULL default ''"), 'currencyProvider' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['currencyProvider'], 'exclude' => true, 'inputType' => 'select', 'options' => array('ecb.int', 'admin.ch'), 'reference' => &$GLOBALS['TL_LANG']['tl_iso_config'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'save_callback' => array(array('Isotope\\Backend\\Config\\Callback', 'checkNeedToConvertCurrencies')), 'sql' => "varchar(32) NOT NULL default ''"), 'orderPrefix' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['orderPrefix'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'orderDigits' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['orderDigits'], 'exclude' => true, 'default' => 4, 'inputType' => 'select', 'options' => range(1, 9), 'eval' => array('tl_class' => 'w50'), 'sql' => "int(1) unsigned NOT NULL default '4'"), 'orderstatus_new' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['orderstatus_new'], 'exclude' => true, 'filter' => 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) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'orderstatus_error' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['orderstatus_error'], 'exclude' => true, 'filter' => 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) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'templateGroup' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['templateGroup'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Isotope\\Backend\\Config\\Callback', 'getTemplateFolders'), 'eval' => array('includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'newProductPeriod' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['newProductPeriod'], 'exclude' => true, 'default' => array('unit' => 'days'), 'inputType' => 'timePeriod', 'options' => array('minutes', 'hours', 'days', 'weeks', 'months', 'years'), 'reference' => &$GLOBALS['TL_LANG']['MSC']['timePeriod'], 'eval' => array('rgxp' => 'digit', 'maxlength' => 5, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'ga_enable' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['ga_enable'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true, 'doNotCopy' => true, 'tl_class' => 'clr'), 'sql' => "char(1) NOT NULL default ''"), 'ga_account' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['ga_account'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'unique' => true, 'maxlength' => 64, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'ga_member' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_config']['ga_member'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'decodeEntities' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''")));
Exemplo n.º 8
0
 protected function getStatusPanel()
 {
     $arrStatus = array('' => &$GLOBALS['TL_LANG']['ISO_REPORT']['all']);
     $objStatus = \Isotope\Model\OrderStatus::findAll(array('order' => 'sorting'));
     if (null !== $objStatus) {
         while ($objStatus->next()) {
             $arrStatus[$objStatus->id] = $objStatus->current()->getName();
         }
     }
     $arrSession = \Session::getInstance()->get('iso_reports');
     $varValue = (int) $arrSession[$this->name]['iso_status'];
     return array('name' => 'iso_status', 'label' => &$GLOBALS['TL_LANG']['ISO_REPORT']['status'], 'type' => 'filter', 'value' => $varValue, 'active' => $varValue != '', 'class' => 'iso_status', 'options' => $arrStatus);
 }
Exemplo n.º 9
0
 /**
  * Update the status of this order and trigger actions (email & hook)
  *
  * @param int $intNewStatus
  *
  * @return bool
  */
 public function updateOrderStatus($intNewStatus)
 {
     // Status already set, nothing to do
     if ($this->order_status == $intNewStatus) {
         return true;
     }
     /** @var OrderStatus $objNewStatus */
     $objNewStatus = OrderStatus::findByPk($intNewStatus);
     if (null === $objNewStatus) {
         return false;
     }
     // !HOOK: allow to cancel a status update
     if (isset($GLOBALS['ISO_HOOKS']['preOrderStatusUpdate']) && is_array($GLOBALS['ISO_HOOKS']['preOrderStatusUpdate'])) {
         foreach ($GLOBALS['ISO_HOOKS']['preOrderStatusUpdate'] as $callback) {
             $objCallback = \System::importStatic($callback[0]);
             $blnCancel = $objCallback->{$callback}[1]($this, $objNewStatus);
             if ($blnCancel === true) {
                 return false;
             }
         }
     }
     // Add the payment date if there is none
     if ($objNewStatus->isPaid() && $this->date_paid == '') {
         $this->date_paid = time();
     }
     // Trigger notification
     $blnNotificationError = null;
     if ($objNewStatus->notification > 0) {
         $arrTokens = $this->getNotificationTokens($objNewStatus->notification);
         // Override order status and save the old one to the tokens too
         $arrTokens['order_status_id'] = $objNewStatus->id;
         $arrTokens['order_status'] = $objNewStatus->getName();
         $arrTokens['order_status_old'] = $this->getStatusLabel();
         $arrTokens['order_status_id_old'] = $this->order_status;
         $blnNotificationError = true;
         /** @var Notification $objNotification */
         if (($objNotification = Notification::findByPk($objNewStatus->notification)) !== null) {
             $arrResult = $objNotification->send($arrTokens, $this->language);
             if (in_array(false, $arrResult)) {
                 $blnNotificationError = true;
                 \System::log('Error sending status update notification for order ID ' . $this->id, __METHOD__, TL_ERROR);
             } elseif (!empty($arrResult)) {
                 $blnNotificationError = false;
             }
         } else {
             \System::log('Invalid notification for order status ID ' . $objNewStatus->id, __METHOD__, TL_ERROR);
         }
     }
     if (TL_MODE == 'BE') {
         \Message::addConfirmation($GLOBALS['TL_LANG']['tl_iso_product_collection']['orderStatusUpdate']);
         if ($blnNotificationError === true) {
             \Message::addError($GLOBALS['TL_LANG']['tl_iso_product_collection']['orderStatusNotificationError']);
         } elseif ($blnNotificationError === false) {
             \Message::addConfirmation($GLOBALS['TL_LANG']['tl_iso_product_collection']['orderStatusNotificationSuccess']);
         }
     }
     // Store old status and set the new one
     $intOldStatus = $this->order_status;
     $this->order_status = $objNewStatus->id;
     $this->save();
     // !HOOK: order status has been updated
     if (isset($GLOBALS['ISO_HOOKS']['postOrderStatusUpdate']) && is_array($GLOBALS['ISO_HOOKS']['postOrderStatusUpdate'])) {
         foreach ($GLOBALS['ISO_HOOKS']['postOrderStatusUpdate'] as $callback) {
             $objCallback = \System::importStatic($callback[0]);
             $objCallback->{$callback}[1]($this, $intOldStatus, $objNewStatus);
         }
     }
     // Trigger payment and shipping methods that implement the interface
     if (($objPayment = $this->getPaymentMethod()) !== null && $objPayment instanceof IsotopeOrderStatusAware) {
         $objPayment->onOrderStatusUpdate($this, $intOldStatus, $objNewStatus);
     }
     if (($objShipping = $this->getShippingMethod()) !== null && $objShipping instanceof IsotopeOrderStatusAware) {
         $objShipping->onOrderStatusUpdate($this, $intOldStatus, $objNewStatus);
     }
     return true;
 }
Exemplo n.º 10
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,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

/**
 * Wirecard Payment Module for Isotope eCommerce for Contao Open Source CMS
 *
 * 
 * @copyright  Wangaz. GbR 2014
 * @author     Wangaz. GbR <*****@*****.**>
 * @package    isotope-wirecard
 */
/**
 * Paletts
 */
$GLOBALS['TL_DCA']['tl_iso_payment']['palettes']['wirecard'] = '{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},wirecard_customer_id,wirecard_secret,wirecard_contact;{price_legend:hide},price,tax_class;{expert_legend:hide},guests,protected;{enabled_legend},enabled';
/**
 * Fields
 */
array_insert($GLOBALS['TL_DCA']['tl_iso_payment']['fields'], 0, array('wirecard_failure_order_status' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['wirecard_failure_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')), 'wirecard_customer_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['wirecard_customer_id'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 16, 'rgxp' => 'alnum', 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default '0'"), 'wirecard_secret' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['wirecard_secret'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 64, 'rgxp' => 'alnum', 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default '0'"), 'wirecard_contact' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_payment']['wirecard_contact'], 'exclude' => true, 'inputType' => 'pageTree', 'foreignKey' => 'tl_page.title', 'eval' => array('mandatory' => true, 'fieldType' => 'radio'), 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy'))));
Exemplo n.º 12
0
 /**
  * Show messages for new order status
  *
  * @return string
  */
 public function getOrderMessages()
 {
     /** @type \BackendUser $objUser */
     $objUser = \BackendUser::getInstance();
     if (!\Database::getInstance()->tableExists(\Isotope\Model\OrderStatus::getTable()) || !$objUser->hasAccess('iso_orders', 'modules')) {
         return '';
     }
     // Can't see any orders if user does not have access to any shop config
     $strConfig = '';
     if (!\BackendUser::getInstance()->isAdmin) {
         $arrConfigs = \BackendUser::getInstance()->iso_configs;
         if (empty($arrConfigs) || !is_array($arrConfigs)) {
             return '';
         }
         $strConfig = "AND c.config_id IN (" . implode(',', $arrConfigs) . ")";
     }
     $arrMessages = array();
     $objOrders = \Database::getInstance()->query("\n            SELECT COUNT(*) AS total, s.name\n            FROM " . \Isotope\Model\ProductCollection::getTable() . " c\n            LEFT JOIN " . \Isotope\Model\OrderStatus::getTable() . " s ON c.order_status=s.id\n            WHERE c.type='order' AND s.welcomescreen='1' {$strConfig}\n            GROUP BY s.id");
     while ($objOrders->next()) {
         $arrMessages[] = '<p class="tl_new">' . sprintf($GLOBALS['TL_LANG']['MSC']['newOrders'], $objOrders->total, $objOrders->name) . '</p>';
     }
     return implode("\n", $arrMessages);
 }
<?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_product_collection
 */
$GLOBALS['TL_DCA']['tl_iso_product_collection'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => false, 'ctable' => array(\Isotope\Model\ProductCollectionItem::getTable(), \Isotope\Model\ProductCollectionSurcharge::getTable(), \Isotope\Model\Address::getTable()), 'closed' => true, 'notDeletable' => \Input::get('act') == 'select', 'onload_callback' => array(array('Isotope\\Backend\\ProductCollection\\Callback', 'checkPermission')), 'onsubmit_callback' => array(array('Isotope\\Backend\\ProductCollection\\Callback', 'executeSaveHook')), 'sql' => array('keys' => array('id' => 'primary', 'uniqid' => 'unique', 'member,store_id,type' => 'index', 'uniqid,store_id,type' => 'index', 'source_collection_id,type' => 'index'))), 'list' => array('sorting' => array('mode' => 2, 'fields' => array('locked DESC'), 'panelLayout' => 'filter;sort,search,limit', 'filter' => array(array('type=?', 'order'), array('order_status>?', '0'), array("locked!=?", ''))), 'label' => array('fields' => array('document_number', 'locked', 'billing_address_id', 'total', 'order_status'), 'showColumns' => true, 'label_callback' => array('Isotope\\Backend\\ProductCollection\\Callback', 'getOrderLabel')), '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_product_collection']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if (!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"'), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['show'], 'href' => 'act=show', 'icon' => 'show.gif'), 'payment' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['payment'], 'href' => 'key=payment', 'icon' => 'system/modules/isotope/assets/images/money-coin.png', 'button_callback' => array('\\Isotope\\Backend\\ProductCollection\\Callback', 'paymentButton')), 'shipping' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['shipping'], 'href' => 'key=shipping', 'icon' => 'system/modules/isotope/assets/images/box-label.png', 'button_callback' => array('\\Isotope\\Backend\\ProductCollection\\Callback', 'shippingButton')), 'print_document' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['print_document'], 'href' => 'key=print_document', 'icon' => 'system/modules/isotope/assets/images/document-pdf-text.png'))), 'palettes' => array('default' => '{status_legend},order_status,date_paid,date_shipped;{details_legend},details,notes;{email_legend:hide},email_data;{billing_address_legend:hide},billing_address_data;{shipping_address_legend:hide},shipping_address_data'), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'type' => array('eval' => array('doNotShow' => true), 'sql' => "varchar(32) NOT NULL default ''"), 'member' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['member'], 'foreignKey' => "tl_member.CONCAT(firstname, ' ', lastname)", 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'locked' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['locked'], 'flag' => 8, 'filter' => true, 'sorting' => true, 'eval' => array('rgxp' => 'date'), 'sql' => "varchar(10) NOT NULL default ''"), 'store_id' => array('eval' => array('doNotShow' => true), 'sql' => "int(2) unsigned NOT NULL default '0'"), 'settings' => array('eval' => array('doNotShow' => true), 'sql' => "blob NULL"), 'checkout_info' => array('eval' => array('doNotShow' => true), 'sql' => "blob NULL"), 'payment_data' => array('eval' => array('doNotShow' => true), 'sql' => "blob NULL"), 'shipping_data' => array('eval' => array('doNotShow' => true), 'sql' => "blob NULL"), 'source_collection_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['source_collection_id'], 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy', 'table' => 'tl_iso_product_collection')), 'document_number' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['document_number'], 'search' => true, 'sorting' => true, 'sql' => "varchar(64) NOT NULL default ''"), 'uniqid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['uniqid'], 'search' => true, 'sql' => "varchar(64) NULL"), 'order_status' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['order_status'], 'exclude' => true, 'filter' => true, 'sorting' => true, 'inputType' => 'select', 'foreignKey' => \Isotope\Model\OrderStatus::getTable() . '.name', 'options_callback' => array('\\Isotope\\Backend', 'getOrderStatus'), 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy'), 'save_callback' => array(array('Isotope\\Backend\\ProductCollection\\Callback', 'updateOrderStatus'))), 'date_paid' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['date_paid'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'datim', 'datepicker' => method_exists($this, 'getDatePickerString') ? $this->getDatePickerString() : true, 'tl_class' => 'w50 wizard'), 'sql' => "varchar(10) NOT NULL default ''"), 'date_shipped' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['date_shipped'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'date', 'datepicker' => method_exists($this, 'getDatePickerString') ? $this->getDatePickerString() : true, 'tl_class' => 'w50 wizard'), 'sql' => "varchar(10) NOT NULL default ''"), 'config_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['config_id'], 'foreignKey' => \Isotope\Model\Config::getTable() . '.name', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'payment_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['payment_id'], 'filter' => true, 'foreignKey' => \Isotope\Model\Payment::getTable() . '.name', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'shipping_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['shipping_id'], 'filter' => true, 'foreignKey' => \Isotope\Model\Shipping::getTable() . '.name', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'billing_address_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['billing_address_id'], 'foreignKey' => \Isotope\Model\Address::getTable() . '.label', 'eval' => array('doNotShow' => true), 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'shipping_address_id' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['shipping_address_id'], 'foreignKey' => \Isotope\Model\Address::getTable() . '.label', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'details' => array('input_field_callback' => array('Isotope\\Backend\\ProductCollection\\Callback', 'generateOrderDetails'), 'eval' => array('doNotShow' => true)), 'subtotal' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['subtotal'], 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'tax_free_subtotal' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['tax_free_subtotal'], 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'total' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['total'], 'sorting' => true, 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'tax_free_total' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['tax_free_total'], 'sql' => "decimal(12,2) NOT NULL default '0.00'"), 'currency' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['currency'], 'sql' => "varchar(4) NOT NULL default ''"), 'language' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['language'], 'sql' => "varchar(5) NOT NULL default ''"), 'notes' => array('label' => &$GLOBALS['TL_LANG']['tl_iso_product_collection']['notes'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('style' => 'height:80px;'), 'sql' => "text NULL"), 'email_data' => array('input_field_callback' => array('Isotope\\Backend\\ProductCollection\\Callback', 'generateEmailData'), 'eval' => array('doNotShow' => true)), 'billing_address_data' => array('input_field_callback' => array('Isotope\\Backend\\ProductCollection\\Callback', 'generateBillingAddressData'), 'eval' => array('doNotShow' => true)), 'shipping_address_data' => array('input_field_callback' => array('Isotope\\Backend\\ProductCollection\\Callback', 'generateShippingAddressData'), 'eval' => array('doNotShow' => true))));