Index: branches/5.1.x/units/gateways/gw_classes/ideal_nl.php
===================================================================
diff -u -r13100 -r13549
--- branches/5.1.x/units/gateways/gw_classes/ideal_nl.php (.../ideal_nl.php) (revision 13100)
+++ branches/5.1.x/units/gateways/gw_classes/ideal_nl.php (.../ideal_nl.php) (revision 13549)
@@ -1,6 +1,6 @@
Application->GetVar('ideal_nl_bank_id');
$fields['description'] = 'Invoice #'.$item_data['OrderNumber'];
Index: branches/5.1.x/units/shipping_quote_engines/usps.php
===================================================================
diff -u -r13465 -r13549
--- branches/5.1.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 13465)
+++ branches/5.1.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 13549)
@@ -1,6 +1,6 @@
10 ) $res = substr($res, 0, 10);
+ $res = preg_replace('/[(]|[)]|[\-]|[ ]|[#]|[\.]|[a-z](.*)|[A-Z](.*)/g', '', $phone);
+ if ( strlen($res) > 10 ) {
+ $res = substr($res, 0, 10);
+ }
return $res != '' ? $res : $phone;
}
Index: branches/5.1.x/install/upgrades.sql
===================================================================
diff -u -r13465 -r13549
--- branches/5.1.x/install/upgrades.sql (.../upgrades.sql) (revision 13465)
+++ branches/5.1.x/install/upgrades.sql (.../upgrades.sql) (revision 13549)
@@ -121,6 +121,20 @@
# ===== v 5.0.2 =====
+# ===== v 5.0.3-B1 =====
+UPDATE Phrase
+SET PhraseType = 1
+WHERE Phrase IN (
+ 'la_ship_All_Together', 'la_ship_Backorders_Upon_Avail', 'la_ship_Backorder_Separately',
+ 'lu_ship_Shipment', 'lu_ship_ShippingType'
+);
+
+# ===== v 5.0.3-B2 =====
+
+# ===== v 5.0.3-RC1 =====
+
+# ===== v 5.0.3 =====
+
# ===== v 5.1.0-B1 =====
UPDATE Modules SET Path = 'modules/in-commerce/' WHERE `Name` = 'In-Commerce';
Index: branches/5.1.x/units/zones/zones_config.php
===================================================================
diff -u -r13156 -r13549
--- branches/5.1.x/units/zones/zones_config.php (.../zones_config.php) (revision 13156)
+++ branches/5.1.x/units/zones/zones_config.php (.../zones_config.php) (revision 13549)
@@ -1,6 +1,6 @@
Array ('dst', 'sc'),
- 'ListSQLs' => Array ( ''=> 'SELECT * FROM %s'),
+ 'ListSQLs' => Array ( '' => 'SELECT * FROM %s'),
// key - special, value - list select sql
- 'ItemSQLs' => Array ( ''=> 'SELECT * FROM %s'),
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s'),
'ListSortings' => Array (
'' => Array (
@@ -57,9 +57,27 @@
'Fields' => Array (
'ZoneID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'ShippingTypeID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'Name' => Array ('type' => 'string', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array ('required' => 'Please fill in'), 'not_null' => 1, 'default' => '', ),
- 'Type' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_ByCountry', 2 => 'la_ByState', 3 => 'la_ByZIP'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ),
- 'CODallowed' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Allowed', 0 => 'la_NotAllowed'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ),
+ 'Name' => Array (
+ 'type' => 'string', 'max_len' => 100,
+ 'required' => 1, 'default' => '', 'not_null' => 1,
+ 'error_msgs' => Array ('required' => 'Please fill in'),
+ ),
+ 'Type' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
+ 'options' => Array (
+ 1 => 'la_ByCountry',
+ 2 => 'la_ByState',
+ 3 => 'la_ByZIP'
+ ),
+ 'not_null' => 1, 'default' => 1,
+ ),
+ 'CODallowed' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_NotAllowed', 1 => 'la_Allowed',), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1,
+ ),
),
'Grids' => Array (
Index: branches/5.1.x/units/orders/orders_item.php
===================================================================
diff -u -r13465 -r13549
--- branches/5.1.x/units/orders/orders_item.php (.../orders_item.php) (revision 13465)
+++ branches/5.1.x/units/orders/orders_item.php (.../orders_item.php) (revision 13549)
@@ -1,6 +1,6 @@
ErrorMsgs['credit_card_expired'] = $this->Application->Phrase('lu_cc_expired');
}
- function Load($id, $id_field_name=null)
- {
- if( $this->Special == 'sitem' && $id == null || (!$this->IsTempTable() && $id == 0))
- {
- $this->setID(0);
-
- $this->SetDBField('Number',-1);
- $this->SetDBField('SubNumber',-1);
- // load previously used search params from session
- $search_params = $this->Application->RecallVar('ord.search_search_filter');
- if($search_params)
- {
- $search_params = unserialize($search_params);
- foreach($search_params as $search_field => $search_params)
- {
- $this->SetField($search_field, $search_params['search_value']);
- }
- $this->UpdateFormattersSubFields(); // used for updating separate virtual date/time fields from DB timestamp (for example)
- }
- return true;
- }
- else
- {
- return parent::Load($id,$id_field_name);
- }
- }
-
/**
* Return error message for field
*
@@ -334,34 +307,34 @@
// Innocent until proven guilty
$cc_valid = true;
- // Get rid of any non-digits
- $value = ereg_replace("[^[:digit:]]", '', $value);
+ // Get rid of any non-digits
+ $value = preg_replace('/[^\d]/', '', $value);
// Perform card-specific checks, if applicable
switch( $this->GetDBField($cardtype_field) )
{
case 2: // MasterCard
- $cc_valid = ereg("^5[1-5].{14}$", $value);
+ $cc_valid = preg_match('/^5[1-5].{14}$/', $value);
break;
case 1: // Visa
- $cc_valid = ereg("^4.{15}$|^4.{12}$", $value);
+ $cc_valid = preg_match('/^4.{15}$|^4.{12}$/', $value);
break;
case 3: // American Express
- $cc_valid = ereg("^3[47].{13}$", $value);
+ $cc_valid = preg_match('/^3[47].{13}$/', $value);
break;
case 4: // Discover
- $cc_valid = ereg("^6011.{12}$", $value);
+ $cc_valid = preg_match('/^6011.{12}$/', $value);
break;
case 5: // Diners Club
- $cc_valid = ereg("^30[0-5].{11}$|^3[68].{12}$", $value);
+ $cc_valid = preg_match('/^30[0-5].{11}$|^3[68].{12}$/', $value);
break;
case 6: // JBC
- $cc_valid = ereg("^3.{15}$|^2131|1800.{11}$", $value);
+ $cc_valid = preg_match('/^3.{15}$|^2131|1800.{11}$/', $value);
break;
default:
Index: branches/5.1.x/units/products/products_event_handler.php
===================================================================
diff -u -r13100 -r13549
--- branches/5.1.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 13100)
+++ branches/5.1.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 13549)
@@ -1,6 +1,6 @@
Application->RecallVar('user_id');
$email_event = &$this->Application->EmailEventUser('PRODUCT.SUGGEST', $user_id, $send_params);
$email_event = &$this->Application->EmailEventAdmin('PRODUCT.SUGGEST');
@@ -1290,4 +1289,28 @@
$edit_tab_presets['Default']['shopping_cart'] = Array ('title' => 'la_tab_ShopCartEntry', 't' => 'in-commerce/paid_listings/paid_listing_type_shopcart', 'priority' => 2);
$this->Application->setUnitOption($event->MasterEvent->Prefix, 'EditTabPresets', $edit_tab_presets);
}
+
+ /**
+ * [HOOK] Allows to add cloned subitem to given prefix
+ *
+ * @param kEvent $event
+ */
+ function OnCloneSubItem(&$event)
+ {
+ parent::OnCloneSubItem($event);
+
+ if ($event->MasterEvent->Prefix == 'rev') {
+ $clones = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Clones');
+ $subitem_prefix = $event->Prefix . '-' . $event->MasterEvent->Prefix;
+
+ $clones[$subitem_prefix]['ConfigMapping'] = Array (
+ 'PerPage' => 'Comm_Perpage_Reviews',
+
+ 'ReviewDelayInterval' => 'product_ReviewDelay_Value',
+ 'ReviewDelayValue' => 'product_ReviewDelay_Interval',
+ );
+
+ $this->Application->setUnitOption($event->MasterEvent->Prefix, 'Clones', $clones);
+ }
+ }
}
\ No newline at end of file
Index: branches/5.1.x/units/pricing/pricing_config.php
===================================================================
diff -u -r13156 -r13549
--- branches/5.1.x/units/pricing/pricing_config.php (.../pricing_config.php) (revision 13156)
+++ branches/5.1.x/units/pricing/pricing_config.php (.../pricing_config.php) (revision 13549)
@@ -1,6 +1,6 @@
'pr',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'PricingEventHandler','file'=>'pricing_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'PricingTagProcessor','file'=>'pricing_tag_processor.php','build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class'=> 'kDBItem', 'file'=> '', 'build_event'=> 'OnItemBuild'),
+ 'ListClass' => Array ('class'=> 'kDBList', 'file'=> '', 'build_event'=> 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class'=> 'PricingEventHandler', 'file'=> 'pricing_event_handler.php', 'build_event'=> 'OnBuild'),
+ 'TagProcessorClass' => Array ('class'=> 'PricingTagProcessor', 'file'=> 'pricing_tag_processor.php', 'build_event'=> 'OnBuild'),
'AutoLoad' => true,
- 'Hooks' => Array(
+ 'Hooks' => Array (
// for tangible products: pricings are always aranged before saveing product
- Array(
+ Array (
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => '#PARENT#',
'HookToSpecial' => '',
- 'HookToEvent' => Array('OnPreSave'),
+ 'HookToEvent' => Array ('OnPreSave'),
'DoPrefix' => '',
'DoSpecial' => 'tang',
'DoEvent' => 'OnArrange',
),
),
- 'AggregateTags' => Array(
- Array(
+ 'AggregateTags' => Array (
+ Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'Price',
'LocalTagName' => 'ProductPrice',
),
- Array(
+ Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ListPriceBrackets',
'LocalTagName' => 'Product_ListPriceBrackets',
),
- Array(
+ Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'HasQuantityPricing',
'LocalTagName' => 'Product_HasQuantityPricing',
),
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
),
- 'StatusField' => Array('IsPrimary'),
+ 'StatusField' => Array ('IsPrimary'),
'IDField' => 'PriceId',
'TableName' => TABLE_PREFIX.'ProductsPricing',
@@ -69,64 +69,74 @@
'AutoDelete' => true,
'AutoClone' => true,
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ListSQLs' => Array ( ''=> 'SELECT * FROM %s',
), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ItemSQLs' => Array ( ''=> 'SELECT * FROM %s',
),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('MinQty' => 'asc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('MinQty' => 'asc'),
)
),
- 'Fields' => Array(
- 'PriceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'MinQty' => Array('type' => 'int', 'default' => 0),
- 'MaxQty' => Array('type' => 'int', 'default' => 0),
- 'Cost' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0),
- 'Price' => Array('type' => 'float', 'not_null' => 1, 'formatter' => 'kFormatter', 'min_value_inc' => 0, 'format' => '%.2f', 'default' => 0),
- 'Negotiated' => Array('type' => 'int', 'default' => 0),
- 'Points' => Array('type' => 'int', 'default' => 0),
- 'AccessDuration'=> Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'AccessUnit' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year'), 'not_null' => 1, 'default' => 0,),
- 'Description' => Array('type' => 'string', 'max_len' => 255, 'default' => NULL),
- 'IsPrimary' => Array('type' => 'int', 'default' => 0, 'not_null' => 1),
- 'GroupId' => Array('type' => 'int', 'default' => 0, 'not_null' => 1),
- // 'AccessRebillDate' => Array('type'=>'integer', 'min_value' => 0, 'max_value' => 31, 'not_null'=>'1', 'default'=>0),
- // Customization healtheconomics.org
-// 'DurationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_opt_interval', 2 => 'la_opt_date'), 'not_null' => 1, 'default' => 1),
-// 'AccessExpiration' => Array('type' => 'int', 'formatter' => 'kDateFormatter'),
- // Customization healtheconomics.org --
-
- ),
- 'VirtualFields' => Array(
+ 'Fields' => Array (
+ 'PriceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'MinQty' => Array ('type' => 'int', 'default' => 0),
+ 'MaxQty' => Array ('type' => 'int', 'default' => 0),
+ 'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0),
+ 'Price' => Array ('type' => 'float', 'not_null' => 1, 'formatter' => 'kFormatter', 'min_value_inc' => 0, 'format' => '%.2f', 'default' => 0),
+ 'Negotiated' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Points' => Array ('type' => 'int', 'default' => 0),
+ 'AccessDuration'=> Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'AccessUnit' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year'), 'not_null' => 1, 'default' => 0,),
+ 'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
+ 'IsPrimary' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'GroupId' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1),
+ // 'AccessRebillDate' => Array ('type'=> 'integer', 'min_value' => 0, 'max_value' => 31, 'not_null'=> '1', 'default'=>0),
+ // Customization healtheconomics.org
+ // 'DurationType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_interval', 2 => 'la_opt_date'), 'not_null' => 1, 'default' => 1),
+ // 'AccessExpiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter'),
+ // Customization healtheconomics.org --
+ ),
+
+ 'VirtualFields' => Array (
),
- 'Grids' => Array(
+ 'Grids' => Array (
/*
- 'Default' => Array(
- 'Icons' => Array(
+ 'Default' => Array (
+ 'Icons' => Array (
'default' => 'icon16_item.png',
'module' => 'core',
),
- 'Fields' => Array(
- 'MinQty' => Array( 'title'=>'la_col_MinQty', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'MaxQty' => Array( 'title'=>'la_col_MaxQty', 'filter_block' => 'grid_range_filter'),
- 'Price' => Array( 'title'=>'la_col_Price', 'filter_block' => 'grid_range_filter'),
- 'Points' => Array( 'title'=>'la_col_Points', 'filter_block' => 'grid_range_filter'),
- 'Cost' => Array( 'title'=>'la_col_Cost', 'filter_block' => 'grid_range_filter'),
- 'Negotiated' => Array( 'title'=>'la_col_Negotiated', 'data_block' => 'negotiated_td', 'filter_block' => 'grid_options_filter'),
+ 'Fields' => Array (
+ 'MinQty' => Array ( 'title'=> 'la_col_MinQty', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'MaxQty' => Array ( 'title'=> 'la_col_MaxQty', 'filter_block' => 'grid_range_filter'),
+ 'Price' => Array ( 'title'=> 'la_col_Price', 'filter_block' => 'grid_range_filter'),
+ 'Points' => Array ( 'title'=> 'la_col_Points', 'filter_block' => 'grid_range_filter'),
+ 'Cost' => Array ( 'title'=> 'la_col_Cost', 'filter_block' => 'grid_range_filter'),
+ 'Negotiated' => Array ( 'title'=> 'la_col_Negotiated', 'data_block' => 'negotiated_td', 'filter_block' => 'grid_options_filter'),
),
),
*/
- 'Access' => Array(
- 'Icons' => Array('default'=>'icon16_pricing.gif','0'=>'icon16_pricing.gif','1'=>'icon16_pricing_primary.gif'),
- 'Fields' => Array(
- 'AccessDuration' => Array( 'title'=>'la_col_AccessDuration', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'AccessUnit' => Array( 'title'=>'la_col_AccessDurationUnit', 'filter_block' => 'grid_options_filter'),
- 'Description' => Array( 'title'=>'la_col_Description', 'filter_block' => 'grid_like_filter'),
- 'Price' => Array( 'title'=>'la_col_Price', 'filter_block' => 'grid_float_range_filter'),
+ 'Access' => Array (
+ 'Icons' => Array ('default'=> 'icon16_pricing.gif', '0'=> 'icon16_pricing.gif', '1'=> 'icon16_pricing_primary.gif'),
+ 'Fields' => Array (
+ 'AccessDuration' => Array ( 'title'=> 'la_col_AccessDuration', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'AccessUnit' => Array ( 'title'=> 'la_col_AccessDurationUnit', 'filter_block' => 'grid_options_filter'),
+ 'Description' => Array ( 'title'=> 'la_col_Description', 'filter_block' => 'grid_like_filter'),
+ 'Price' => Array ( 'title'=> 'la_col_Price', 'filter_block' => 'grid_float_range_filter'),
),
),
Index: branches/5.1.x/gw_notify.php
===================================================================
diff -u -r13100 -r13549
--- branches/5.1.x/gw_notify.php (.../gw_notify.php) (revision 13100)
+++ branches/5.1.x/gw_notify.php (.../gw_notify.php) (revision 13549)
@@ -1,6 +1,6 @@
Init();
- /*$fh = fopen(FULL_PATH.'/gw.log', 'a');
+ /*$fh = fopen(WRITEABLE . '/gw.log', 'a');
fwrite ($fh, "\n\n".date('d/m/y h:i:s').":\n");
- foreach ($_REQUEST as $key => $val)
- {
+ foreach ($_REQUEST as $key => $val) {
fwrite($fh, "\n");
}
fclose($fh);*/
Index: branches/5.1.x/admin_templates/products/option_edit.tpl
===================================================================
diff -u -r13100 -r13549
--- branches/5.1.x/admin_templates/products/option_edit.tpl (.../option_edit.tpl) (revision 13100)
+++ branches/5.1.x/admin_templates/products/option_edit.tpl (.../option_edit.tpl) (revision 13549)
@@ -310,7 +310,7 @@
-
+
Index: branches/5.1.x/units/manufacturers/manufacturers_config.php
===================================================================
diff -u -r13465 -r13549
--- branches/5.1.x/units/manufacturers/manufacturers_config.php (.../manufacturers_config.php) (revision 13465)
+++ branches/5.1.x/units/manufacturers/manufacturers_config.php (.../manufacturers_config.php) (revision 13549)
@@ -1,6 +1,6 @@
'manuf',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ManufacturersEventHandler','file'=>'manufacturers_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ManufacturersTagProcessor','file'=>'manufacturers_tag_processor.php','build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ManufacturersEventHandler', 'file' => 'manufacturers_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ManufacturersTagProcessor', 'file' => 'manufacturers_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'ManufacturerId',
- 'StatusField' => Array(),
+ 'StatusField' => Array (),
'TableName' => TABLE_PREFIX.'Manufacturers',
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('manuf'=>'!la_title_AddingManufacturer!'),
- 'edit_status_labels' => Array('manuf'=>'!la_title_EditingManufacturer!'),
- 'new_titlefield' => Array('manuf'=>'!la_title_NewManufacturers!'),
+ 'TitlePresets' => Array (
+ 'default' => Array ( 'new_status_labels' => Array ('manuf' => '!la_title_AddingManufacturer!'),
+ 'edit_status_labels' => Array ('manuf' => '!la_title_EditingManufacturer!'),
+ 'new_titlefield' => Array ('manuf' => '!la_title_NewManufacturers!'),
),
- 'manuf_list'=>Array( 'prefixes' => Array('manuf_List'),
+ 'manuf_list' =>Array ( 'prefixes' => Array ('manuf_List'),
'format' => "!la_title_Manufacturers!",
),
- 'manuf_edit'=>Array( 'prefixes' => Array('manuf'),
- 'new_titlefield' => Array('manuf'=>'!la_title_NewManufacturer!'),
+ 'manuf_edit' =>Array ( 'prefixes' => Array ('manuf'),
+ 'new_titlefield' => Array ('manuf' => '!la_title_NewManufacturer!'),
'format' => "#manuf_status# '#manuf_titlefield#' - !la_title_General!",
),
),
- 'PermSection' => Array('main' => 'in-commerce:manufacturers'),
+ 'PermSection' => Array ('main' => 'in-commerce:manufacturers'),
- 'Sections' => Array(
- 'in-commerce:manufacturers' => Array(
+ 'Sections' => Array (
+ 'in-commerce:manufacturers' => Array (
'parent' => 'in-commerce',
'icon' => 'manufacturers',
'label' => 'la_tab_Manufacturers',
- 'url' => Array('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'url' => Array ('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 4,
'type' => stTREE,
),
@@ -66,20 +66,20 @@
'TitleField' => 'Name', // field, used in bluebar when editing existing item
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ListSQLs' => Array ( '' => 'SELECT * FROM %s',
), // key - special, value - list select sql
- 'ItemSQLs' => Array(''=>'SELECT * FROM %s',
+ 'ItemSQLs' => Array ('' => 'SELECT * FROM %s',
),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('Name' => 'asc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Name' => 'asc'),
)
),
'Fields' => Array (
- 'ManufacturerId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'Name' => Array('type' => 'string','not_null' => '1','default' => '', 'required'=>true,'max_len'=>255),
- 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
- 'URL' => Array('type' => 'string','not_null' => '1','default' => '','max_len'=>255),
+ 'ManufacturerId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' =>true, 'max_len' =>255),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+ 'URL' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'max_len' =>255),
'Logo' => Array (
'type' => 'string',
'formatter' => 'kPictureFormatter',
@@ -88,21 +88,22 @@
'multiple' => false,
'max_len' => 255, 'not_null' => 1, 'default' => ''
),
- 'IsPopular' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'Email' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'default' => null, 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!') ),
- 'Phone' => Array('type' => 'string','default' => null),
- 'Fax' => Array('type' => 'string', 'default' => null),
- 'Address1' => Array('type' => 'string','default' => null),
- 'Address2' => Array('type' => 'string', 'default' => null),
- 'City' => Array('type' => 'string','default' => null),
- 'State' => Array(
+ 'IsPopular' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Email' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'default' => null, 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!') ),
+ 'Phone' => Array ('type' => 'string', 'default' => null),
+ 'Fax' => Array ('type' => 'string', 'default' => null),
+ 'Address1' => Array ('type' => 'string', 'default' => null),
+ 'Address2' => Array ('type' => 'string', 'default' => null),
+ 'City' => Array ('type' => 'string', 'default' => null),
+ 'State' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', 'default' => null),
+ 'Zip' => Array ('type' => 'string', 'default' => null),
+ 'Country' => Array (
'type' => 'string',
- 'formatter' => 'kOptionsFormatter', 'options' => Array(),
- 'default' => null
- ),
- 'Zip' => Array('type' => 'string', 'default' => null),
- 'Country' => Array(
- 'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode
FROM '.TABLE_PREFIX.'CountryStates
Index: branches/5.1.x/units/reports/reports_config.php
===================================================================
diff -u -r13156 -r13549
--- branches/5.1.x/units/reports/reports_config.php (.../reports_config.php) (revision 13156)
+++ branches/5.1.x/units/reports/reports_config.php (.../reports_config.php) (revision 13549)
@@ -1,6 +1,6 @@
'rep',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ReportsEventHandler','file'=>'reports_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ReportsTagProcessor','file'=>'reports_tag_processor.php','build_event'=>'OnBuild'),
+ 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array('class' => 'ReportsEventHandler', 'file' => 'reports_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array('class' => 'ReportsTagProcessor', 'file' => 'reports_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array(
@@ -45,14 +45,14 @@
'IDField' => 'CategoryId',
'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('d'=>'!la_title_Adding_Discount!'),
- 'edit_status_labels' => Array('d'=>'!la_title_Editing_Discount!'),
- 'new_titlefield' => Array('d'=>'!la_title_New_Discount!'),
+ 'default' => Array( 'new_status_labels' => Array('d' => '!la_title_Adding_Discount!'),
+ 'edit_status_labels' => Array('d' => '!la_title_Editing_Discount!'),
+ 'new_titlefield' => Array('d' => '!la_title_New_Discount!'),
),
- 'report_options'=>Array('format' => "!la_title_ReportOptions!"),
- 'report_results'=>Array('format' => "!la_title_ReportResults!"),
- 'report_chart'=>Array('format' => "!la_title_SalesReportChart!"),
+ 'report_options' =>Array('format' => "!la_title_ReportOptions!"),
+ 'report_results' =>Array('format' => "!la_title_ReportResults!"),
+ 'report_chart' =>Array('format' => "!la_title_SalesReportChart!"),
),
'PermSection' => Array('main' => 'in-commerce:reports'),
@@ -62,7 +62,7 @@
'parent' => 'in-commerce',
'icon' => 'in-commerce:sales_report',
'label' => 'la_tab_SaleReports',
- 'url' => Array('t' => 'in-commerce/reports/reports', 'pass' => 'm,rep', 'rep_event'=>'OnNew'),
+ 'url' => Array('t' => 'in-commerce/reports/reports', 'pass' => 'm,rep', 'rep_event' => 'OnNew'),
'permissions' => Array('view', 'add'),
'priority' => 2,
'type' => stTREE,
@@ -85,9 +85,9 @@
)
),
- 'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s FROM %1$s',
+ 'ListSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %1$s',
), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %1$s',
+ 'ItemSQLs' => Array( '' => 'SELECT * FROM %1$s',
),
'ListSortings' => Array(
@@ -106,17 +106,28 @@
),
'VirtualFields' => Array(
- 'ReportType' => array('formatter'=>'kOptionsFormatter','options'=>array(
+ 'ReportType' => array('formatter' => 'kOptionsFormatter', 'options' =>array(
12 => 'la_Overall',
1 => 'la_ByCategory',
2 => 'la_ByUser',
5 => 'la_byProduct'
- ),'use_phrases'=>1,'default'=>12
+ ),
+ 'use_phrases' => 1, 'default' => 12,
),
- 'FromDateTime' => Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_from','filter_field'=>'OrderDate' ),
- 'ToDateTime' => Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_to','filter_field'=>'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ),
- 'Recursive' => array('default'=>1),
- 'SkipEmpty' => array('default'=>1),
+ 'FromDateTime' => Array('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_from', 'filter_field' => 'OrderDate' ),
+ 'ToDateTime' => Array('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_to', 'filter_field' => 'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ),
+ 'Recursive' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ ),
+ 'SkipEmpty' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ ),
'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
@@ -126,12 +137,12 @@
'module' => 'core',
),
'Fields' => Array(
- 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Start' => Array( 'title'=>'la_col_Start', 'filter_block' => 'grid_date_range_filter'),
- 'End' => Array( 'title'=>'la_col_End', 'filter_block' => 'grid_date_range_filter'),
- 'GroupId' => Array( 'title'=>'la_col_Group', 'filter_block' => 'grid_options_filter'),
- 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'),
- 'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+ 'Name' => Array( 'title' => 'la_col_Name', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Start' => Array( 'title' => 'la_col_Start', 'filter_block' => 'grid_date_range_filter'),
+ 'End' => Array( 'title' => 'la_col_End', 'filter_block' => 'grid_date_range_filter'),
+ 'GroupId' => Array( 'title' => 'la_col_Group', 'filter_block' => 'grid_options_filter'),
+ 'Type' => Array( 'title' => 'la_col_Type', 'filter_block' => 'grid_options_filter'),
+ 'Amount' => Array( 'title' => 'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
),
),
Index: branches/5.1.x/units/shipping/shipping_config.php
===================================================================
diff -u -r13156 -r13549
--- branches/5.1.x/units/shipping/shipping_config.php (.../shipping_config.php) (revision 13156)
+++ branches/5.1.x/units/shipping/shipping_config.php (.../shipping_config.php) (revision 13549)
@@ -1,6 +1,6 @@
Array ('s' => '!la_title_EditingShippingType!'),
'new_titlefield' => Array ('s' => '!la_title_NewShippingType!'),
),
- 'shipping_list'=>Array ( 'prefixes' => Array ('s_List'),
+ 'shipping_list' =>Array ( 'prefixes' => Array ('s_List'),
'format' => "!la_title_ShippingTypes!",
),
- 'shipping_type_edit'=>Array ( 'prefixes' => Array ('s'),
+ 'shipping_type_edit' =>Array ( 'prefixes' => Array ('s'),
'format' => "#s_status# '#s_titlefield#' - !la_title_General!",
),
@@ -112,45 +112,70 @@
Array ('mode' => 'AND', 'filters' => Array ('show_active', 'show_disabled'), 'type' => WHERE_FILTER),
),
'Filters' => Array (
- 'show_active' => Array ('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+ 'show_active' => Array ('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
)
),
- 'ListSQLs' => Array ( ''=> 'SELECT * FROM %s'),
+ 'ListSQLs' => Array ( '' => 'SELECT * FROM %s'),
// key - special, value - list select sql
- 'ItemSQLs' => Array ( ''=> 'SELECT * FROM %s'),
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s'),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Name' => 'asc'),
)
),
'Fields' => Array (
- 'ShippingID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Code' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>25, 'error_msgs' => Array ('required' => 'Please fill in')),
- 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array ('required' => 'Please fill in')),
- 'SpeedCode' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => true, 'max_len' => 25),
- 'LocationFrom' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Riga', 2 => 'Salaspils', 3 => 'Chicago', 4 => 'Dublin'), 'not_null' => true, 'default' => 1),
- 'Type' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_ByWeight', 2 => 'la_ByItem', 3 => 'la_ByAmount', 4 => 'la_Handling'), 'not_null' => true, 'default' => 1),
- 'BaseFee' => Array ('type' => 'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
- 'CODFlatSurcharge' => Array ('type' => 'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
- 'CODPercentSurcharge' => Array ('type' => 'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
- 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
- 'CostType' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
- 'ZeroIfEmpty' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
- 'PrecisionBeforeSep' => Array ('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => true ),
- 'PrecisionAfterSep' => Array ('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => true ),
- 'PortalGroups' => Array ('type' => 'string', 'default' => NULL),
- 'FreeShippingMinAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0),
- 'IsFreePromoShipping' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, 'use_phrases' => 1, 'options' => Array (0 => 'la_No', 1 => 'la_Yes', ), 'formatter' => 'kOptionsFormatter'),
- 'InsuranceFee' => Array ('type' => 'float', 'default' => null),
- 'InsuranceType' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (2 => 'la_Percent', 1 => 'la_Flat',),
- 'not_null' => 1, 'default' => 2
- ),
- ),
+ 'ShippingID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Code' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>25, 'error_msgs' => Array ('required' => 'Please fill in')),
+ 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>100, 'error_msgs' => Array ('required' => 'Please fill in')),
+ 'SpeedCode' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' => 25),
+ 'LocationFrom' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (
+ 1 => 'Riga',
+ 2 => 'Salaspils',
+ 3 => 'Chicago',
+ 4 => 'Dublin'
+ ),
+ 'not_null' => 1, 'default' => 1
+ ),
+ 'Type' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
+ 'options' => Array (1 => 'la_ByWeight', 2 => 'la_ByItem', 3 => 'la_ByAmount', 4 => 'la_Handling'),
+ 'not_null' => 1, 'default' => 1),
+ 'BaseFee' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1),
+ 'CODFlatSurcharge' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1),
+ 'CODPercentSurcharge' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1,
+ 'default' => 1, 'not_null' => 1,
+ ),
+ 'CostType' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1 ),
+ 'ZeroIfEmpty' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1 ),
+ 'PrecisionBeforeSep' => Array ('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => 1 ),
+ 'PrecisionAfterSep' => Array ('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => 1 ),
+ 'PortalGroups' => Array ('type' => 'string', 'default' => null),
+ 'FreeShippingMinAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0),
+ 'IsFreePromoShipping' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'default' => 0, 'not_null' => 1,
+ ),
+ 'InsuranceFee' => Array ('type' => 'float', 'default' => null),
+ 'InsuranceType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (2 => 'la_Percent', 1 => 'la_Flat',), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 2
+ ),
+ ),
'Grids' => Array (
'Default' => Array (
Index: branches/5.1.x/units/products/products_config.php
===================================================================
diff -u -r13156 -r13549
--- branches/5.1.x/units/products/products_config.php (.../products_config.php) (revision 13156)
+++ branches/5.1.x/units/products/products_config.php (.../products_config.php) (revision 13549)
@@ -1,6 +1,6 @@
'p',
- 'ItemClass' => Array('class'=>'ProductsItem','file'=>'products_item.php', 'require_classes' => Array('kCatDBItem'), 'build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kCatDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ProductsEventHandler','file'=>'products_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ProductsTagProcessor','file'=>'products_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'ProductsItem', 'file' => 'products_item.php', 'require_classes' => Array ('kCatDBItem'), 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ProductsEventHandler', 'file' => 'products_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ProductsTagProcessor', 'file' => 'products_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'),
'AutoLoad' => true,
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
@@ -46,7 +46,7 @@
'Conditional' => true,
'HookToPrefix' => 'pr',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnNew', 'OnAfterItemLoad'),
+ 'HookToEvent' => Array ('OnNew', 'OnAfterItemLoad'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnPreSave',
@@ -57,7 +57,7 @@
'Conditional' => false,
'HookToPrefix' => 'lst',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'OnBeforeCopyToLive' ),
+ 'HookToEvent' => Array ( 'OnBeforeCopyToLive' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnSaveVirtualProduct',
@@ -68,7 +68,7 @@
'Conditional' => false,
'HookToPrefix' => 'lst',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterItemDelete'),
+ 'HookToEvent' => Array ('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnDeleteListingType',
@@ -79,7 +79,7 @@
'Conditional' => false,
'HookToPrefix' => 'lst',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnModifyPaidListingConfig',
@@ -90,7 +90,7 @@
'Conditional' => false,
'HookToPrefix' => 'file',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'OnNew', 'OnEdit' ),
+ 'HookToEvent' => Array ( 'OnNew', 'OnEdit' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnPreSave',
@@ -101,23 +101,56 @@
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
),
+
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'rev',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCloneSubItem',
+ ),
+
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'fav',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCloneSubItem',
+ ),
+
+ Array (
+ 'Mode' => hBEFORE,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'ci',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnCloneSubItem',
+ ),
),
'IDField' => 'ProductId',
- 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
+ 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
'TitleField' => 'Name', // field, used in bluebar when editing existing item
'ItemType' => 11, // this is used when relation to product is added from in-portal and via-versa
'ViewMenuPhrase' => 'la_text_Products',
'CatalogTabIcon' => 'in-commerce:icon16_products.png',
- 'ItemPropertyMappings' => Array(
+ 'ItemPropertyMappings' => Array (
'NewDays' => 'Product_NewDays', // number of days item to be NEW
'MinPopVotes' => 'Product_MinPopVotes', // minimum number of votes for an item to be POP
'MinPopRating' => 'Product_MinPopRating', // minimum rating for an item to be POP
@@ -129,74 +162,74 @@
'TitlePhrase' => 'la_text_Product',
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('p'=>'!la_title_Adding_Product!'),
- 'edit_status_labels' => Array('p'=>'!la_title_Editing_Product!'),
- 'new_titlefield' => Array('p'=>'!la_title_NewProduct!'),
+ 'TitlePresets' => Array (
+ 'default' => Array ( 'new_status_labels' => Array ('p' => '!la_title_Adding_Product!'),
+ 'edit_status_labels' => Array ('p' => '!la_title_Editing_Product!'),
+ 'new_titlefield' => Array ('p' => '!la_title_NewProduct!'),
),
- 'product_list'=>Array( 'prefixes' => Array('c_List','p_List'),
- 'tag_params' => Array('c'=> Array('per_page'=>-1)),
+ 'product_list' =>Array ( 'prefixes' => Array ('c_List', 'p_List'),
+ 'tag_params' => Array ('c' => Array ('per_page' =>-1)),
'format' => "!la_title_Categories! (#c_recordcount#) - !la_title_Products! (#p_recordcount#)",
),
- 'products_edit'=>Array( 'prefixes' => Array('p'),
- 'new_titlefield' => Array('p'=>'!la_title_NewProduct!'),
+ 'products_edit' =>Array ( 'prefixes' => Array ('p'),
+ 'new_titlefield' => Array ('p' => '!la_title_NewProduct!'),
'format' => "#p_status# '#p_titlefield#' - !la_title_General!",
),
- 'inventory' => Array('prefixes' => Array('p'), 'format' => "#p_status# - '#p_titlefield#' - !la_title_Product_Inventory!"),
- 'pricing' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Pricing!"),
- 'access_pricing' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_AccessPricing!"),
- 'access' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Access!"),
- 'files' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Files!"),
- 'options'=> Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Options!"),
- 'categories'=> Array('prefixes' => Array('p','p-ci_List'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Categories!"),
- 'relations' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Relations!"),
- 'content' => Array('prefixes' => Array('p','p.content_List'), 'tag_params' => Array('p.content' => Array('types'=>'content', 'live_table'=>true)), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_PackageContent!"),
- 'images' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Images!"),
- 'reviews' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Reviews!"),
- 'products_custom' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Custom!"),
- 'images_edit' => Array( 'prefixes' => Array('p', 'img'),
- 'new_status_labels' => Array('img'=>'!la_title_Adding_Image!'),
- 'edit_status_labels' => Array('img'=>'!la_title_Editing_Image!'),
- 'new_titlefield' => Array('img'=>'!la_title_New_Image!'),
+ 'inventory' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# - '#p_titlefield#' - !la_title_Product_Inventory!"),
+ 'pricing' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Pricing!"),
+ 'access_pricing' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_AccessPricing!"),
+ 'access' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Access!"),
+ 'files' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Files!"),
+ 'options' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Options!"),
+ 'categories' => Array ('prefixes' => Array ('p', 'p-ci_List'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Categories!"),
+ 'relations' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Relations!"),
+ 'content' => Array ('prefixes' => Array ('p', 'p.content_List'), 'tag_params' => Array ('p.content' => Array ('types' => 'content', 'live_table' =>true)), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_PackageContent!"),
+ 'images' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Images!"),
+ 'reviews' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Reviews!"),
+ 'products_custom' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Custom!"),
+ 'images_edit' => Array ( 'prefixes' => Array ('p', 'img'),
+ 'new_status_labels' => Array ('img' => '!la_title_Adding_Image!'),
+ 'edit_status_labels' => Array ('img' => '!la_title_Editing_Image!'),
+ 'new_titlefield' => Array ('img' => '!la_title_New_Image!'),
'format' => "#p_status# '#p_titlefield#' - #img_status# '#img_titlefield#'",
),
- 'pricing_edit' => Array( 'prefixes' => Array('p', 'pr'),
- 'new_status_labels' => Array('pr'=>"!la_title_Adding_PriceBracket! '!la_title_New_PriceBracket!'"),
- 'edit_status_labels' => Array('pr'=>'!la_title_Editing_PriceBracket!'),
+ 'pricing_edit' => Array ( 'prefixes' => Array ('p', 'pr'),
+ 'new_status_labels' => Array ('pr' =>"!la_title_Adding_PriceBracket! '!la_title_New_PriceBracket!'"),
+ 'edit_status_labels' => Array ('pr' => '!la_title_Editing_PriceBracket!'),
'format' => "#p_status# '#p_titlefield#' - #pr_status#",
),
- 'options_edit' => Array( 'prefixes' => Array('p', 'po'),
- 'new_status_labels' => Array('po'=>"!la_title_Adding_Option!"),
- 'edit_status_labels' => Array('po'=>'!la_title_Editing_Option!'),
- 'new_titlefield' => Array('po'=>'!la_title_New_Option!'),
+ 'options_edit' => Array ( 'prefixes' => Array ('p', 'po'),
+ 'new_status_labels' => Array ('po' =>"!la_title_Adding_Option!"),
+ 'edit_status_labels' => Array ('po' => '!la_title_Editing_Option!'),
+ 'new_titlefield' => Array ('po' => '!la_title_New_Option!'),
'format' => "#p_status# '#p_titlefield#' - #po_status# '#po_titlefield#'",
),
- 'options_combinations' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingOptionCombinations!"),
- 'shipping_options' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingShippingOptions!"),
+ 'options_combinations' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingOptionCombinations!"),
+ 'shipping_options' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingShippingOptions!"),
- 'file_edit' => Array( 'prefixes' => Array('p', 'file'),
- 'new_status_labels' => Array('file'=>"!la_title_Adding_File!"),
- 'edit_status_labels' => Array('file'=>'!la_title_Editing_File!'),
- 'new_titlefield' => Array('file'=>'!la_title_New_File!'),
+ 'file_edit' => Array ( 'prefixes' => Array ('p', 'file'),
+ 'new_status_labels' => Array ('file' =>"!la_title_Adding_File!"),
+ 'edit_status_labels' => Array ('file' => '!la_title_Editing_File!'),
+ 'new_titlefield' => Array ('file' => '!la_title_New_File!'),
'format' => "#p_status# '#p_titlefield#' - #file_status# '#file_titlefield#'",
),
- 'relations_edit' => Array( 'prefixes' => Array('p', 'rel'),
- 'new_status_labels' => Array('rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
- 'edit_status_labels' => Array('rel'=>'!la_title_Editing_Relationship!'),
+ 'relations_edit' => Array ( 'prefixes' => Array ('p', 'rel'),
+ 'new_status_labels' => Array ('rel' =>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
+ 'edit_status_labels' => Array ('rel' => '!la_title_Editing_Relationship!'),
'format' => "#p_status# '#p_titlefield#' - #rel_status#",
),
- 'reviews_edit' => Array( 'prefixes' => Array('p', 'rev'),
- 'new_status_labels' => Array('rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"),
- 'edit_status_labels' => Array('rev'=>'!la_title_Editing_Review!'),
+ 'reviews_edit' => Array ( 'prefixes' => Array ('p', 'rev'),
+ 'new_status_labels' => Array ('rev' =>"!la_title_Adding_Review! '!la_title_New_Review!'"),
+ 'edit_status_labels' => Array ('rev' => '!la_title_Editing_Review!'),
'format' => "#p_status# '#p_titlefield#' - #rev_status#",
),
- 'products_export' => Array('format' => '!la_title_ProductsExport!'),
+ 'products_export' => Array ('format' => '!la_title_ProductsExport!'),
- 'products_import' => Array('format' => '!la_title_ImportProducts!'),
+ 'products_import' => Array ('format' => '!la_title_ImportProducts!'),
- 'tree_in-commerce' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Commerce', 'Version')),
+ 'tree_in-commerce' => Array ('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Commerce', 'Version')),
),
'EditTabPresets' => Array (
@@ -222,27 +255,27 @@
'PermItemPrefix' => 'PRODUCT',
'PermTabText' => 'In-Commerce',
- 'PermSection' => Array('main' => 'CATEGORY:in-commerce:products_list', 'search' => 'in-commerce:search', 'email' => 'in-commerce:incommerce_configemail', 'custom' => 'in-commerce:configuration_custom'),
+ 'PermSection' => Array ('main' => 'CATEGORY:in-commerce:products_list', 'search' => 'in-commerce:search', 'email' => 'in-commerce:incommerce_configemail', 'custom' => 'in-commerce:configuration_custom'),
- 'Sections' => Array(
- 'in-commerce' => Array(
+ 'Sections' => Array (
+ 'in-commerce' => Array (
'parent' => 'in-portal:root',
'icon' => 'ecommerce',
'label' => 'la_title_In-Commerce',
- 'url' => Array('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view'),
+ 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
'priority' => 2.1,
'container' => true,
'type' => stTREE,
),
- 'in-commerce:products' => Array(
+ 'in-commerce:products' => Array (
'parent' => 'in-portal:site',
'icon' => 'products',
'label' => 'la_tab_Products',
- 'url' => Array('t' => 'catalog/advanced_view', 'anchor' => 'tab-p.showall', 'pass' => 'm'),
+ 'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-p.showall', 'pass' => 'm'),
'onclick' => 'setCatalogTab(\'p.showall\')',
- 'permissions' => Array('view'),
+ 'permissions' => Array ('view'),
'priority' => 3.2,
'type' => stTREE,
),
@@ -260,97 +293,98 @@
'type' => stTREE,
),
- 'in-commerce:general' => Array(
+ 'in-commerce:general' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'conf_ecommerce_general',
'label' => 'la_tab_GeneralSettings',
- 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 1,
'type' => stTREE,
),
- 'in-commerce:output' => Array(
+ 'in-commerce:output' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_output',
'label' => 'la_tab_ConfigOutput',
- 'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 2,
'type' => stTREE,
),
- 'in-commerce:search' => Array(
+ 'in-commerce:search' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_search',
'label' => 'la_tab_ConfigSearch',
- 'url' => Array('t' => 'config/config_search', 'module_key' => 'products', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_search', 'module_key' => 'products', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 7,
'type' => stTREE,
),
- 'in-commerce:incommerce_configemail' => Array(
+ 'in-commerce:incommerce_configemail' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_email',
'label' => 'la_tab_ConfigE-mail',
- 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 8,
'type' => stTREE,
),
- 'in-commerce:configuration_custom' => Array(
+ 'in-commerce:configuration_custom' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_customfields',
'label' => 'la_tab_ConfigCustom',
- 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 11, 'pass_section' => true, 'pass' => 'm,cf'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 11, 'pass_section' => true, 'pass' => 'm,cf'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 9,
'type' => stTREE,
),
- 'in-commerce:contacts' => Array(
+ 'in-commerce:contacts' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'conf_contact_info',
'label' => 'la_tab_ConfigContacts',
- 'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 10,
'type' => stTREE,
),
),
- 'FilterMenu' => Array(
- 'Groups' => Array(
- Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_tang','show_sub','show_serv','show_download','show_package'), 'type' => WHERE_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_new'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_hot'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER),
+ 'FilterMenu' => Array (
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array ('show_active', 'show_pending', 'show_disabled'), 'type' => WHERE_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_tang', 'show_sub', 'show_serv', 'show_download', 'show_package'), 'type' => WHERE_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => WHERE_FILTER),
),
- 'Filters' => Array(
- 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
- 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
- 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
- 's1' => Array(),
- 'show_tang' => Array('label' => 'la_product_tangible', 'on_sql' => '', 'off_sql' => '%1$s.Type != 1' ),
- 'show_sub' => Array('label' => 'la_product_subscription', 'on_sql' => '', 'off_sql' => '%1$s.Type != 2' ),
- 'show_serv' => Array('label' => 'la_product_service', 'on_sql' => '', 'off_sql' => '%1$s.Type != 3' ),
- 'show_download' => Array('label' => 'la_product_downloadable', 'on_sql' => '', 'off_sql' => '%1$s.Type != 4' ),
- 'show_package' => Array('label' => 'la_product_package', 'on_sql' => '', 'off_sql' => '%1$s.Type != 5' ),
- 's2' => Array(),
- 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ),
- 'show_hot' => Array('label' => 'la_Text_TopSellers', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ),
- 'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ),
- 'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ),
+ 'Filters' => Array (
+ 'show_active' => Array ('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+ 'show_pending' => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
+ 'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
+ 's1' => Array (),
+ 'show_tang' => Array ('label' => 'la_product_tangible', 'on_sql' => '', 'off_sql' => '%1$s.Type != 1' ),
+ 'show_sub' => Array ('label' => 'la_product_subscription', 'on_sql' => '', 'off_sql' => '%1$s.Type != 2' ),
+ 'show_serv' => Array ('label' => 'la_product_service', 'on_sql' => '', 'off_sql' => '%1$s.Type != 3' ),
+ 'show_download' => Array ('label' => 'la_product_downloadable', 'on_sql' => '', 'off_sql' => '%1$s.Type != 4' ),
+ 'show_package' => Array ('label' => 'la_product_package', 'on_sql' => '', 'off_sql' => '%1$s.Type != 5' ),
+ 's2' => Array (),
+ 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ),
+ 'show_hot' => Array ('label' => 'la_Text_TopSellers', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ),
+ 'show_pop' => Array ('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ),
+ 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ),
)
),
'TableName' => TABLE_PREFIX.'Products',
'CalculatedFields' => Array (
'' => Array (
+ 'AltName' => 'img.AltName',
'SameImages' => 'img.SameImages',
'LocalThumb' => 'img.LocalThumb',
'ThumbPath' => 'img.ThumbPath',
@@ -383,7 +417,7 @@
),
),
- 'ListSQLs' => Array(
+ 'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup ON '.TABLE_PREFIX.'PortalGroup.GroupId = %1$s.AccessGroupId
@@ -396,7 +430,7 @@
LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId',
- 'showall'=> 'SELECT %1$s.* %2$s FROM %1$s
+ 'showall' => 'SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'ProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId
@@ -405,13 +439,13 @@
LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId',
), // key - special, value - list select sql
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('Priority' => 'desc'),
- 'Sorting' => Array('Name' => 'asc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('Name' => 'asc'),
)
),
- 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s
+ 'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup pg ON pg.GroupId = %1$s.AccessGroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
@@ -422,132 +456,175 @@
LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId
LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId',
),
- 'SubItems' => Array('pr', 'rev', 'img', 'po', 'poc', 'p-ci', 'rel', 'file', 'p-cdata', 'p-fav'),
- 'Fields' => Array(
- 'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'required'=>true, 'max_len'=>255, 'default' => ''),
- 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => 1),
- 'SKU' => Array('type' => 'string', 'required'=>true, 'max_len'=>255, 'error_msgs' => Array('required' => 'Please fill in'), 'default' => NULL),
- 'Description' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL),
- 'DescriptionExcerpt' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL),
- 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kUnitFormatter', 'format' => '%0.2f', 'default' => NULL),
- 'MSRP' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL),
- 'ManufacturerId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(0 => ''), 'options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Manufacturers ORDER BY Name', 'option_key_field'=>'ManufacturerId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
- 'Status' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
- 'BackOrder' => Array('type' => 'int', 'not_null' => 1, 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'default' => 2 ),
- 'BackOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'error_msgs' => Array('bad_date_format' => 'Please use the following date format: %s'), 'default' => NULL),
- 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
- 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
- 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
- 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'Featured' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'OnSale' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'Priority' => Array('type'=>'int', 'not_null' => 1, 'default' => 0),
- 'CachedRating' => Array('not_null' => 1, 'default' => 0, 'type' => 'float', 'formatter' => 'kFormatter', 'format' => '%0.2f'),
- 'CachedVotesQty' => Array('type'=>'int', 'not_null' => 1, 'default' => 0),
- 'Hits' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
- 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default'=>'#NOW#'),
- 'Expire' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default'=>null),
- 'Type' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(1=>'la_product_tangible', 2=>'la_product_subscription', 4=>'la_product_downloadable', 3=>'la_product_service'/*, 6=>'la_gift_certificate', 5=>'la_product_package'*/), 'not_null' => 1, 'default' => 1 ),
- 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default'=>'#NOW#'),
- 'ModifiedById' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedById' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ResourceId' => Array('type' => 'int', 'default' => 0),
- 'CachedReviewsQty' => Array('type' => 'int', 'formatter'=>'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
- 'InventoryStatus' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_Disabled', 1 => 'la_by_product', 2 => 'la_by_options'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'QtyInStock' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'QtyInStockMin' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'QtyReserved' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'QtyBackOrdered' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'QtyOnOrder' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'InventoryComment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- 'Qty' => Array('type'=>'int', 'formatter'=>'kFormatter', 'regexp'=>'/^[\d]+$/', 'error_msgs' => Array('invalid_format'=>'!la_invalid_integer!')),
- 'AccessGroupId' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalGroup WHERE System!=1 AND Personal !=1 ORDER BY Name', 'option_key_field'=>'GroupId', 'option_title_field'=>'Name', 'default' => NULL),
- 'AccessDuration' => Array('type' => 'int', 'default' => NULL),
- 'AccessDurationType' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year' ), 'default' => NULL,),
- 'AccessStart' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
- 'AccessEnd' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL,),
- 'OptionsSelectionMode' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(0 => 'la_opt_Selection', 1 => 'la_opt_List'), 'default' => 0),
- 'HasRequiredOptions' => Array('type' => 'int', 'default' => 0, 'not_null' => 1),
- 'Virtual' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ProcessingData' => Array('type' => 'string', 'default' => ''),
- 'PackageContent' => Array('type' => 'string', 'default' => NULL),
- 'IsRecurringBilling' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
-// 'PayPalRecurring' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => '1', 'default' => '0'),
- 'ShippingMode' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(0 => 'la_shipping_AnyAndSelected', 1 => 'la_shipping_Limited'), 'not_null' => 1, 'default'=>0),
+ 'SubItems' => Array ('pr', 'rev', 'img', 'po', 'poc', 'p-ci', 'rel', 'file', 'p-cdata', 'p-fav'),
+ 'Fields' => Array (
+ 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'required' => 1, 'max_len' =>255, 'default' => ''),
+ 'AutomaticFilename' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ ),
+ 'SKU' => Array ('type' => 'string', 'required' => 1, 'max_len' =>255, 'error_msgs' => Array ('required' => 'Please fill in'), 'default' => NULL),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL),
+ 'DescriptionExcerpt' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL),
+ 'Weight' => Array ('type' => 'float', 'min_value_exc' => 0, 'formatter' => 'kUnitFormatter', 'format' => '%0.2f', 'default' => NULL),
+ 'MSRP' => Array ('type' => 'float', 'min_value_inc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL),
+ 'ManufacturerId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' =>Array (0 => ''), 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Manufacturers ORDER BY Name', 'option_key_field' => 'ManufacturerId', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 0),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'default' => 2, 'not_null' => 1,
+ ),
+ 'BackOrder' => Array ('type' => 'int', 'not_null' => 1, 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'default' => 2 ),
+ 'BackOrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'error_msgs' => Array ('bad_date_format' => 'Please use the following date format: %s'), 'default' => NULL),
+ 'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
+ 'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
+ 'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
+ 'EditorsPick' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Featured' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'OnSale' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CachedRating' => Array ('not_null' => 1, 'default' => 0, 'type' => 'float', 'formatter' => 'kFormatter', 'format' => '%0.2f'),
+ 'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Hits' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
+ 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'Expire' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' =>null),
+ 'Type' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1=> 'la_product_tangible', 2=> 'la_product_subscription', 4=> 'la_product_downloadable', 3=> 'la_product_service'/*, 6=> 'la_gift_certificate', 5=> 'la_product_package'*/), 'not_null' => 1, 'default' => 1 ),
+ 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'ModifiedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CreatedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ResourceId' => Array ('type' => 'int', 'default' => 0),
+ 'CachedReviewsQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
+ 'InventoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_by_product', 2 => 'la_by_options'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+ 'QtyInStock' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'QtyInStockMin' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'QtyReserved' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'QtyBackOrdered' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'QtyOnOrder' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'InventoryComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'Qty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'regexp' => '/^[\d]+$/', 'error_msgs' => Array ('invalid_format' => '!la_invalid_integer!')),
+ 'AccessGroupId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalGroup WHERE System!=1 AND Personal !=1 ORDER BY Name', 'option_key_field' => 'GroupId', 'option_title_field' => 'Name', 'default' => NULL),
+ 'AccessDuration' => Array ('type' => 'int', 'default' => NULL),
+ 'AccessDurationType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year' ), 'default' => NULL,),
+ 'AccessStart' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'AccessEnd' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL,),
+ 'OptionsSelectionMode' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (0 => 'la_opt_Selection', 1 => 'la_opt_List'), 'default' => 0),
+ 'HasRequiredOptions' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1),
+ 'Virtual' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ProcessingData' => Array ('type' => 'string', 'default' => ''),
+ 'PackageContent' => Array ('type' => 'string', 'default' => NULL),
+ 'IsRecurringBilling' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ ),
+ //'PayPalRecurring' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => '1', 'default' => '0'),
+ 'ShippingMode' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (0 => 'la_shipping_AnyAndSelected', 1 => 'la_shipping_Limited'), 'not_null' => 1, 'default' =>0),
- 'ProcessingData' => Array('type' => 'string', 'default' => null),
+ 'ProcessingData' => Array ('type' => 'string', 'default' => null),
- 'ShippingLimitation' => Array('type' => 'string', 'default' => NULL),
- 'AssignedCoupon' =>
- Array('type' => 'int', 'not_null' => 1, 'default' => 0,
- 'formatter'=>'kLEFTFormatter',
- 'options' => array(0 => 'None'),
- 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'ProductsCoupons WHERE `%s` = \'%s\'',
- 'left_key_field'=>'CouponId',
- 'left_title_field'=>'Name'),
- 'MinQtyFreePromoShipping' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'MetaKeywords' => Array('type' => 'string', 'default' => null),
- 'MetaDescription' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- ),
- 'VirtualFields' => Array(
- 'Qty' => 1,
- 'Price' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
- 'Cost' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
- 'IsHot' => Array('type'=>'int'),
- 'IsNew' => Array('type'=>'int'),
- 'IsPop' => Array('type'=>'int'),
- 'Manufacturer' => Array(),
+ 'ShippingLimitation' => Array ('type' => 'string', 'default' => NULL),
+ 'AssignedCoupon' =>
+ Array ('type' => 'int', 'not_null' => 1, 'default' => 0,
+ 'formatter' => 'kLEFTFormatter',
+ 'options' => Array (0 => 'None'),
+ 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'ProductsCoupons WHERE `%s` = \'%s\'',
+ 'left_key_field' => 'CouponId',
+ 'left_title_field' => 'Name'),
+ 'MinQtyFreePromoShipping' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'MetaKeywords' => Array ('type' => 'string', 'default' => null),
+ 'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ ),
- // export related fields: begin
- 'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
- 'ExportFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
- 'ExportFilename' => Array('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array('type' => 'string', 'default' => ','),
- 'FieldsEnclosedBy' => Array('type' => 'string', 'default' => '"'),
- 'LineEndings' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
- 'LineEndingsInside' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CRLF', 2 => 'LF'), 'default' => 2),
- 'IncludeFieldTitles' => Array('type' => 'int', 'default' => 1),
- 'ExportColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
- 'AvailableColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
- 'CategoryFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
- 'CategorySeparator' => Array('type' => 'string', 'default' => ':'),
- 'IsBaseCategory' => Array('type' => 'int', 'default' => 0),
- // export related fields: end
+ 'VirtualFields' => Array (
+ 'Qty' => 1,
+ 'Price' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
+ 'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
+ 'IsHot' => Array ('type' => 'int'),
+ 'IsNew' => Array ('type' => 'int'),
+ 'IsPop' => Array ('type' => 'int'),
+ 'Manufacturer' => Array (),
- // import related fields: begin
- 'FieldTitles' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
- 'ImportSource' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
- 'ImportFilename' => Array('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => (defined('EXPORT_BASE_PATH') ? EXPORT_BASE_PATH : '/admin/export') . '/'),
- 'ImportLocalFilename' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
- 'CheckDuplicatesMethod' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
- 'ReplaceDuplicates' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
- 'DuplicateCheckFields' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('Name' => 'NAME'), 'default' => '|Name|'),
- 'SkipFirstRow' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1),
- // import related fields: end
+ // export related fields: begin
+ 'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
+ 'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
+ 'ExportFilename' => Array ('type' => 'string', 'default' => ''),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
+ 'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
+ 'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
+ 'IncludeFieldTitles' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ ),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
+ 'CategorySeparator' => Array ('type' => 'string', 'default' => ':'),
+ 'IsBaseCategory' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ ),
+ // export related fields: end
- 'ThumbnailImage' => Array('type' => 'string', 'default' => ''),
- 'FullImage' => Array('type' => 'string', 'default' => ''),
- 'ImageAlt' => Array('type' => 'string', 'default' => ''),
+ // import related fields: begin
+ 'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
+ 'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
+ 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => (defined('EXPORT_BASE_PATH') ? EXPORT_BASE_PATH : '/admin/export') . '/'),
+ 'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
+ 'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
+ 'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
+ 'DuplicateCheckFields' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ('Name' => 'NAME'), 'default' => '|Name|'),
+ 'SkipFirstRow' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1),
+ // import related fields: end
- 'Filename' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'CachedNavbar' => Array('type' => 'string', 'default' => ''),
- 'ParentPath' => Array('type' => 'string', 'default' => ''),
+ 'ThumbnailImage' => Array ('type' => 'string', 'default' => ''),
+ 'FullImage' => Array ('type' => 'string', 'default' => ''),
+ 'ImageAlt' => Array ('type' => 'string', 'default' => ''),
- 'FileSize' => Array('type' => 'int','formatter' => 'kFilesizeFormatter','not_null' => 1, 'default' => 0),
- 'FilePath' => Array(),
- 'FileVersion' => Array(),
+ 'Filename' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
+ 'ParentPath' => Array ('type' => 'string', 'default' => ''),
- // for primary image
- 'SameImages' => Array('type' => 'string', 'default' => ''),
- 'LocalThumb' => Array('type' => 'string', 'default' => ''),
- 'ThumbPath' => Array('type' => 'string', 'default' => ''),
- 'ThumbUrl' => Array('type' => 'string', 'default' => ''),
- 'LocalImage' => Array('type' => 'string', 'default' => ''),
- 'LocalPath' => Array('type' => 'string', 'default' => ''),
- 'FullUrl' => Array('type' => 'string', 'default' => ''),
- ),
- 'Grids' => Array(
+ 'FileSize' => Array ('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'not_null' => 1, 'default' => 0),
+ 'FilePath' => Array (),
+ 'FileVersion' => Array (),
+
+ // for primary image
+ 'AltName' => Array ('type' => 'string', 'default' => ''),
+ 'SameImages' => Array ('type' => 'string', 'default' => ''),
+ 'LocalThumb' => Array ('type' => 'string', 'default' => ''),
+ 'ThumbPath' => Array ('type' => 'string', 'default' => ''),
+ 'ThumbUrl' => Array ('type' => 'string', 'default' => ''),
+ 'LocalImage' => Array ('type' => 'string', 'default' => ''),
+ 'LocalPath' => Array ('type' => 'string', 'default' => ''),
+ 'FullUrl' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_product.png',
@@ -556,20 +633,20 @@
2 => 'icon16_product_pending.png',
'NEW' => 'icon16_product_new.png',
),
- 'Fields' => Array(
- 'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'SKU' => Array( 'title'=>'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Name' => Array( 'title'=>'la_col_ProductName', 'data_block'=>'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'Type' => Array('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'Manufacturer' => Array('title' => 'la_col_Manufacturer', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Price' => Array('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
- 'QtyInStock' => Array('title' => 'la_col_Qty', 'data_block'=>'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
- 'QtyBackOrdered' => Array('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
- 'OnSale' => Array('title' => 'la_col_OnSale', 'filter_block' => 'grid_options_filter', 'width' => 70, ), /*
- 'Weight' => Array( 'title'=>'la_col_ProductWeight', 'filter_block' => 'grid_float_range_filter', 'width' => 150, ),
- 'CreatedOn' => Array( 'title'=>'la_col_ProductCreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
- 'BackOrderDate' => Array( 'title'=>'la_col_ProductBackOrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
+ 'Fields' => Array (
+ 'ProductId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'SKU' => Array ( 'title' => 'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Name' => Array ( 'title' => 'la_col_ProductName', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Type' => Array ('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'Manufacturer' => Array ('title' => 'la_col_Manufacturer', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Price' => Array ('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
+ 'QtyInStock' => Array ('title' => 'la_col_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
+ 'QtyBackOrdered' => Array ('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
+ 'OnSale' => Array ('title' => 'la_col_OnSale', 'filter_block' => 'grid_options_filter', 'width' => 70, ), /*
+ 'Weight' => Array ( 'title' => 'la_col_ProductWeight', 'filter_block' => 'grid_float_range_filter', 'width' => 150, ),
+ 'CreatedOn' => Array ( 'title' => 'la_col_ProductCreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
+ 'BackOrderDate' => Array ( 'title' => 'la_col_ProductBackOrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
*/
),
),
@@ -584,21 +661,21 @@
),
'Selector' => 'radio',
'Fields' => Array (
- 'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'SKU' => Array( 'title'=>'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Name' => Array( 'title'=>'la_col_ProductName', 'data_block'=>'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'Type' => Array('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'Manufacturer' => Array('title' => 'la_col_Manufacturer', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Price' => Array('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
- 'QtyInStock' => Array('title' => 'la_col_Qty', 'data_block'=>'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
- 'QtyBackOrdered' => Array('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
+ 'ProductId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'SKU' => Array ( 'title' => 'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Name' => Array ( 'title' => 'la_col_ProductName', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Type' => Array ('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'Manufacturer' => Array ('title' => 'la_col_Manufacturer', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Price' => Array ('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
+ 'QtyInStock' => Array ('title' => 'la_col_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
+ 'QtyBackOrdered' => Array ('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
),
),
),
- 'ConfigMapping' => Array(
+ 'ConfigMapping' => Array (
'PerPage' => 'Comm_Perpage_Products',
'ShortListPerPage' => 'Comm_Perpage_Products_Short',
'ForceEditorPick' => 'products_EditorPicksAboveRegular',
Index: branches/5.1.x/admin_templates/payment_type/payment_type_gateway.tpl
===================================================================
diff -u -r13100 -r13549
--- branches/5.1.x/admin_templates/payment_type/payment_type_gateway.tpl (.../payment_type_gateway.tpl) (revision 13100)
+++ branches/5.1.x/admin_templates/payment_type/payment_type_gateway.tpl (.../payment_type_gateway.tpl) (revision 13549)
@@ -37,15 +37,12 @@
}
) );
- a_toolbar.AddButton( new ToolBarSeparator('sep2') );
-
a_toolbar.Render();
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
- a_toolbar.HideButton('sep2');
a_toolbar.DisableButton('next');
Index: branches/5.1.x/units/product_option_combinations/product_option_combinations_config.php
===================================================================
diff -u -r13156 -r13549
--- branches/5.1.x/units/product_option_combinations/product_option_combinations_config.php (.../product_option_combinations_config.php) (revision 13156)
+++ branches/5.1.x/units/product_option_combinations/product_option_combinations_config.php (.../product_option_combinations_config.php) (revision 13549)
@@ -1,6 +1,6 @@
'poc',
- 'ItemClass' => Array('class'=>'kPOCItem','file'=>'products_option_combination_item.php','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ProductOptionCombinationsEventHandler','file'=>'product_option_combinations_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ProductOptionCombinationsTagProcessor','file'=>'product_option_combinations_tag_processor.php','build_event'=>'OnBuild'),
- 'RegisterClasses' => Array(
- Array('pseudo'=>'kCombinationFormatter','class'=>'kCombinationFormatter','file'=>'product_option_formatters.php','build_event'=>'','require_classes'=>'kFormatter'),
- Array('pseudo'=>'kCombPriceFormatter','class'=>'kCombPriceFormatter','file'=>'product_option_formatters.php','build_event'=>'','require_classes'=>'kFormatter'),
+ 'ItemClass' => Array ('class' => 'kPOCItem', 'file' => 'products_option_combination_item.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ProductOptionCombinationsEventHandler', 'file' => 'product_option_combinations_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ProductOptionCombinationsTagProcessor', 'file' => 'product_option_combinations_tag_processor.php', 'build_event' => 'OnBuild'),
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'kCombinationFormatter', 'class' => 'kCombinationFormatter', 'file' => 'product_option_formatters.php', 'build_event' => '', 'require_classes' => 'kFormatter'),
+ Array ('pseudo' => 'kCombPriceFormatter', 'class' => 'kCombPriceFormatter', 'file' => 'product_option_formatters.php', 'build_event' => '', 'require_classes' => 'kFormatter'),
),
'AutoLoad' => true,
- 'Hooks' => Array(
+ 'Hooks' => Array (
),
- 'AggregateTags' => Array(
+ 'AggregateTags' => Array (
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
@@ -38,45 +38,50 @@
'TitleField' => 'CombinationId',
'IDField' => 'CombinationId',
'TableName' => TABLE_PREFIX.'ProductOptionCombinations',
- 'ForeignKey' => array('p' => 'ProductId'),
- 'ParentTableKey' => array('p' => 'ProductId'),
+ 'ForeignKey' => Array ('p' => 'ProductId'),
+ 'ParentTableKey' => Array ('p' => 'ProductId'),
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
- 'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s
+ 'ListSQLs' => Array ( '' => 'SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Products ON '.TABLE_PREFIX.'Products.ProductId = %1$s.ProductId
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing ON '.TABLE_PREFIX.'ProductsPricing.ProductId = %1$s.ProductId AND '.TABLE_PREFIX.'ProductsPricing.IsPrimary = 1
',
), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s',
),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('Combination' => 'asc'),
- 'ForcedSorting' => Array('Priority' => 'desc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Combination' => 'asc'),
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
)
),
'Fields' => Array (
- 'CombinationId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'Combination' => Array('type' => 'string', 'required' => 1, 'formatter' => 'kCombinationFormatter', 'format'=>"%s: %s
", 'default' => NULL),
- 'CombinationCRC' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'PriceType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
- 'Price' => Array('type' => 'float', 'required' => 1, 'formatter' => 'kFormatter', 'default' => '', ),
- 'WeightType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
- 'Weight' => Array('type' => 'float', 'formatter' => 'kFormatter', 'default' => 0, ),
- 'Availability' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options'=>array(0=>'la_No', 1=>'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ),
- 'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'QtyInStock' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
- 'QtyReserved' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
- 'QtyBackOrdered' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
- 'QtyOnOrder' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
- 'SKU' => Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'CombinationId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+ 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+ 'Combination' => Array ('type' => 'string', 'required' => 1, 'formatter' => 'kCombinationFormatter', 'format' =>"%s: %s
", 'default' => NULL),
+ 'CombinationCRC' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+ 'PriceType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
+ 'Price' => Array ('type' => 'float', 'required' => 1, 'formatter' => 'kFormatter', 'default' => '', ),
+ 'WeightType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
+ 'Weight' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'default' => 0, ),
+ 'Availability' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1,
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+ 'QtyInStock' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0),
+ 'QtyReserved' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0),
+ 'QtyBackOrdered' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0),
+ 'QtyOnOrder' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0),
+ 'SKU' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
),
- 'CalculatedFields' => Array(
- '' => Array(
+ 'CalculatedFields' => Array (
+ '' => Array (
'FinalPrice' => 'IF(%1$s.PriceType = 1, %1$s.Price,
IF(%1$s.PriceType = 2, '.TABLE_PREFIX.'ProductsPricing.Price + %1$s.Price,
'.TABLE_PREFIX.'ProductsPricing.Price * (1 + %1$s.Price/100)
@@ -85,50 +90,50 @@
'BasePrice' => TABLE_PREFIX.'ProductsPricing.Price',
),
),
- 'VirtualFields' => Array(
- 'FinalPrice' => Array('formatter'=>'kCombPriceFormatter', 'format' => '%.2f'),
+ 'VirtualFields' => Array (
+ 'FinalPrice' => Array ('formatter' => 'kCombPriceFormatter', 'format' => '%.2f'),
),
'Grids' => Array (
'Default' => Array (
- 'Icons' => Array(
+ 'Icons' => Array (
'default' => 'icon16_item.png',
'module' => 'core',
),
- 'Fields' => Array(
- 'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
- 'SKU' => Array( 'title'=>'la_col_SKU', 'filter_block' => 'grid_like_filter'),
- 'Availability' => Array( 'title'=>'la_col_Availability', 'filter_block' => 'grid_options_filter'),
- 'Price' => Array( 'title'=>'la_col_Price', 'data_block' => 'price_td', 'filter_block' => 'grid_float_range_filter'),
- /*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
+ 'Fields' => Array (
+ 'Combination' => Array ( 'title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+ 'SKU' => Array ( 'title' => 'la_col_SKU', 'filter_block' => 'grid_like_filter'),
+ 'Availability' => Array ( 'title' => 'la_col_Availability', 'filter_block' => 'grid_options_filter'),
+ 'Price' => Array ( 'title' => 'la_col_Price', 'data_block' => 'price_td', 'filter_block' => 'grid_float_range_filter'),
+ /*'Weight' => Array ( 'title' => 'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
),
),
'Inventory' => Array (
- 'Icons' => Array(
+ 'Icons' => Array (
'default' => 'icon16_item.png',
'module' => 'core',
),
'Selector' => 'radio',
'Fields' => Array (
- 'Combination' => Array('title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
- 'SKU' => Array('title' => 'la_col_SKU', 'filter_block' => 'grid_like_filter'),
- 'QtyInStock' => Array('title'=>'la_col_QtyInStock', 'filter_block' => 'grid_range_filter'),
- 'QtyReserved' => Array('title'=>'la_col_QtyReserved', 'filter_block' => 'grid_range_filter'),
- 'QtyBackOrdered'=> Array('title'=>'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'),
- 'QtyOnOrder' => Array('title'=>'la_col_QtyOnOrder', 'filter_block' => 'grid_range_filter'),
+ 'Combination' => Array ('title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+ 'SKU' => Array ('title' => 'la_col_SKU', 'filter_block' => 'grid_like_filter'),
+ 'QtyInStock' => Array ('title' => 'la_col_QtyInStock', 'filter_block' => 'grid_range_filter'),
+ 'QtyReserved' => Array ('title' => 'la_col_QtyReserved', 'filter_block' => 'grid_range_filter'),
+ 'QtyBackOrdered' => Array ('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'),
+ 'QtyOnOrder' => Array ('title' => 'la_col_QtyOnOrder', 'filter_block' => 'grid_range_filter'),
),
),
'Radio' => Array (
'Selector' => 'radio',
- 'Icons' => Array(
+ 'Icons' => Array (
'default' => 'icon16_item.png',
'module' => 'core',
),
- 'Fields' => Array(
- 'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
- 'FinalPrice' => Array( 'title'=>'la_col_Price', 'data_block' => 'grid_data_td', 'currency' => 'primary', 'filter_block' => 'grid_float_range_filter'),
- /*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
+ 'Fields' => Array (
+ 'Combination' => Array ( 'title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+ 'FinalPrice' => Array ( 'title' => 'la_col_Price', 'data_block' => 'grid_data_td', 'currency' => 'primary', 'filter_block' => 'grid_float_range_filter'),
+ /*'Weight' => Array ( 'title' => 'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
),
),
),
Index: branches/5.1.x/units/gateways/gw_classes/atosorigin.php
===================================================================
diff -u -r13100 -r13549
--- branches/5.1.x/units/gateways/gw_classes/atosorigin.php (.../atosorigin.php) (revision 13100)
+++ branches/5.1.x/units/gateways/gw_classes/atosorigin.php (.../atosorigin.php) (revision 13549)
@@ -1,6 +1,6 @@
Application->BaseURL('/in-commerce/units/gateways/gw_classes/notify_scripts').'atosorigin_notify.php';
$txt_amount = sprintf("%.2f", $item_data['TotalAmount']);
- $params['amount'] = eregi_replace("[.,]", '', $txt_amount);
- $params['caddie'] = $this->Application->GetSID().','.MD5($item_data['OrderId']);
+
+ $params['amount'] = str_replace( Array('.', ','), '', $txt_amount);
+ $params['caddie'] = $this->Application->GetSID() . ',' . MD5($item_data['OrderId']);
$params['order_id'] = $item_data['OrderId'];
$params['customer_ip_address'] = $_SERVER['REMOTE_ADDR'];
$params['customer_id'] = $item_data['PortalUserId'];
@@ -92,8 +93,8 @@
$ret = $rets[0];
- $ret = eregi_replace("^.*\!\!", '', $ret);
- $ret = chop($ret, '!');
+ $ret = preg_replace('/^(.*)!!/is', '', $ret);
+ $ret = rtrim($ret, '!');
return ''.$ret.''.$ret.'