Page MenuHomeIn-Portal Phabricator

in-commerce
No OneTemporary

File Metadata

Created
Sat, Aug 2, 5:17 PM

in-commerce

Index: branches/5.1.x/units/affiliate_plans_items/affiliate_plans_items_config.php
===================================================================
--- branches/5.1.x/units/affiliate_plans_items/affiliate_plans_items_config.php (revision 14030)
+++ branches/5.1.x/units/affiliate_plans_items/affiliate_plans_items_config.php (revision 14031)
@@ -1,126 +1,126 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => 'api',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'AffiliatePlansItemsEventHandler','file'=>'affiliate_plans_items_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'AffiliatePlansItemsTagProcessor','file'=>'affiliate_plans_items_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => '#PARENT#',
'HookToSpecial' => '',
'HookToEvent' => Array('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnDeleteDiscountedItem',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
),
'IDField' => 'AffiliateItemId',
'StatusField' => Array('Status'),
'TitleField' => 'Name',
'TableName' => TABLE_PREFIX.'AffiliatePlansItems',
'CalculatedFields' => Array(
'' => Array(
'ProductId' => 'p.ProductId',
'ItemName' => 'IF(p.Name IS NULL,c.Name,p.l1_Name)',
'SKU' => 'p.SKU',
'Weight' => 'p.Weight',
'CreatedOn' => 'p.CreatedOn',
'BackOrderDate' => 'p.BackOrderDate',
'Status' => 'p.Status',
'CategoryId' => 'c.CategoryId',
),
),
'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ItemResourceId = p.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category c ON %1$s.ItemResourceId = c.ResourceId',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'ForeignKey' => 'AffiliatePlanId',
'ParentTableKey' => 'AffiliatePlanId',
'ParentPrefix' => 'ap',
'AutoDelete' => true,
'AutoClone' => true,
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('ItemName' => 'asc'),
)
),
'Fields' => Array (
'AffiliateItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'AffiliatePlanId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'ItemResourceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'ItemType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'not_null' => 1, 'default' => 1, ),
),
'VirtualFields' => Array(
'ProductId' => Array('type' => 'int', 'default' => 0),
'ItemName' => Array('type' => 'string', 'default' => ''),
'SKU' => Array('type' => 'string', 'default' => ''),
- 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0),
+ 'Weight' => Array('type' => 'float', 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL),
'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'BackOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
'default' => 2,
),
'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_entire_order.gif'),
'Fields' => Array(
'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td' ),
),
),
'AffiliatePlansItems' => Array(
'Icons' => Array(
'default' => 'icon16_product.png',
0 => 'icon16_product_disabled.png',
1 => 'icon16_product.png',
2 => 'icon16_product_pending.png',
),
'Fields' => Array(
'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_item_checkbox_td' ),
'ItemName' => Array( 'title'=>'la_col_ItemName' ),
'ItemType' => Array( 'title'=>'la_col_ItemType' ),
),
),
),
);
\ No newline at end of file
Index: branches/5.1.x/units/discount_items/discount_items_config.php
===================================================================
--- branches/5.1.x/units/discount_items/discount_items_config.php (revision 14030)
+++ branches/5.1.x/units/discount_items/discount_items_config.php (revision 14031)
@@ -1,129 +1,129 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => 'di',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'DiscountItemsEventHandler','file'=>'discount_items_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'DiscountItemsTagProcessor','file'=>'discount_items_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'p',
'HookToSpecial' => '-item',
'HookToEvent' => Array('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnDeleteDiscountedItem',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
),
'IDField' => 'DiscountItemId',
'StatusField' => Array('Status'),
'TitleField' => 'Name',
'TableName' => TABLE_PREFIX.'ProductsDiscountItems',
'CalculatedFields' => Array(
'' => Array(
'ProductId' => 'p.ProductId',
'ItemName' => 'IF(p.Name IS NULL,c.Name,p.l1_Name)',
'SKU' => 'p.SKU',
'Weight' => 'p.Weight',
'CreatedOn' => 'p.CreatedOn',
'BackOrderDate' => 'p.BackOrderDate',
'Status' => 'p.Status',
'CategoryId' => 'c.CategoryId',
),
),
'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ItemResourceId = p.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category c ON %1$s.ItemResourceId = c.ResourceId',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
/*'BelongsTo' => Array(
Array('prefix' => 'd', 'key' => 'DiscountId', 'ForeignKey' => 'DiscountId'),
),*/
'ForeignKey' => 'DiscountId',
'ParentTableKey' => 'DiscountId',
'ParentPrefix' => 'd',
'AutoDelete' => true,
'AutoClone' => true,
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('ItemName' => 'asc'),
)
),
'Fields' => Array (
'DiscountItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'DiscountId' => Array('type' => 'int', 'default' => null, ),
'ItemResourceId' => Array('type' => 'int', 'default' => null, ),
'ItemType' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'default' => 1, ),
),
'VirtualFields' => Array(
'ProductId' => Array('type' => 'int', 'default' => 0),
'ItemName' => Array('type' => 'string', 'default' => ''),
'SKU' => Array('type' => 'string', 'default' => ''),
- 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0),
+ 'Weight' => Array('type' => 'float', 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL),
'CreatedOn' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'BackOrderDate' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => NULL),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
'default' => 2,
),
'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_entire_order.gif'),
'Fields' => Array(
'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter'),
),
),
'DiscountItems' => Array(
'Icons' => Array(
'default' => 'icon16_product.png',
0 => 'icon16_product_disabled.png',
1 => 'icon16_product.png',
2 => 'icon16_product_pending.png',
),
'Fields' => Array(
'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_item_td', 'filter_block' => 'grid_range_filter'),
'ItemName' => Array( 'title'=>'la_col_ItemName', 'filter_block' => 'grid_like_filter'),
'ItemType' => Array( 'title'=>'la_col_ItemType', 'filter_block' => 'grid_options_filter'),
),
),
),
);
\ No newline at end of file

Event Timeline