<?php

/**
 * Isotope eCommerce for Contao Open Source CMS
 *
 * Copyright (C) 2009-2014 terminal42 gmbh & Isotope eCommerce Workgroup
 *
 * @package    Isotope
 * @link       http://isotopeecommerce.org
 * @license    http://opensource.org/licenses/lgpl-3.0.html
 */
/**
 * Table tl_iso_rule_usage
 */
$GLOBALS['TL_DCA']['tl_iso_rule_usage'] = array('config' => array('sql' => array('keys' => array('id' => 'primary', 'pid' => 'index'))), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'pid' => array('foreignKey' => \Isotope\Model\Rule::getTable() . '.name', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'belongsTo', 'load' => 'lazy')), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'order_id' => array('foreignKey' => \Isotope\Model\ProductCollection::getTable() . '.document_number', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'config_id' => array('foreignKey' => \Isotope\Model\Config::getTable() . '.name', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy')), 'member_id' => array('foreignKey' => \MemberModel::getTable() . '.username', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'hasOne', 'load' => 'lazy'))));
Exemplo n.º 2
0
 * 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
 */
/**
 * Backend modules
 */
array_insert($GLOBALS['BE_MOD']['isotope'], 2, array('iso_rules' => array('tables' => array(\Isotope\Model\Rule::getTable()), 'javascript' => \Haste\Util\Debug::uncompressedFile('system/modules/isotope/assets/js/backend.min.js'), 'icon' => 'system/modules/isotope_rules/assets/auction-hammer-gavel.png')));
/**
 * Models
 */
$GLOBALS['TL_MODELS'][\Isotope\Model\Rule::getTable()] = 'Isotope\\Model\\Rule';
/**
 * Checkout Steps
 * @todo this will no longer work
 */
array_insert($GLOBALS['ISO_CHECKOUT_STEPS']['review'], 0, array(array('Isotope\\Rules', 'cleanRuleUsages')));
/**
 * Product collection surcharge
 */
\Isotope\Model\ProductCollectionSurcharge::registerModelType('rule', 'Isotope\\Model\\ProductCollectionSurcharge\\Rule');
/**
 * Hooks
 */
$GLOBALS['ISO_HOOKS']['calculatePrice'][] = array('Isotope\\Rules', 'calculatePrice');
$GLOBALS['ISO_HOOKS']['compileCart'][] = array('Isotope\\Rules', 'getCouponForm');
$GLOBALS['ISO_HOOKS']['findSurchargesForCollection'][] = array('Isotope\\Rules', 'findSurcharges');
<?php

/**
 * Isotope eCommerce for Contao Open Source CMS
 *
 * Copyright (C) 2009-2014 terminal42 gmbh & Isotope eCommerce Workgroup
 *
 * @package    Isotope
 * @link       http://isotopeecommerce.org
 * @license    http://opensource.org/licenses/lgpl-3.0.html
 */
/**
 * Table tl_iso_rule_restriction
 */
$GLOBALS['TL_DCA']['tl_iso_rule_restriction'] = array('config' => array('sql' => array('keys' => array('id' => 'primary', 'pid,type' => 'index', 'type,object_id,pid' => 'index'))), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'pid' => array('foreignKey' => \Isotope\Model\Rule::getTable() . '.name', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'belongsTo', 'load' => 'lazy')), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'type' => array('sql' => "varchar(32) NOT NULL default ''"), 'object_id' => array('sql' => "int(10) unsigned NOT NULL default '0'")));