Page MenuHomeIn-Portal Phabricator

in-commerce
No OneTemporary

File Metadata

Created
Sun, Feb 2, 8:43 PM

in-commerce

Index: branches/RC/in-commerce/units/products/products_config.php
===================================================================
--- branches/RC/in-commerce/units/products/products_config.php (revision 11363)
+++ branches/RC/in-commerce/units/products/products_config.php (revision 11364)
@@ -1,527 +1,539 @@
<?php
$config = Array(
'Prefix' => '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'),
'AutoLoad' => true,
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'Reviews_Page',
4 => 'event',
5 => 'mode',
),
'CatalogItem' => true,
'AdminTemplatePath' => 'products',
'AdminTemplatePrefix' => 'products_',
'SearchConfigPostfix' => 'products',
'ConfigPriority' => 0,
'Hooks' => Array (
// for subscription products: access group is saved before changing pricings
Array (
'Mode' => hAFTER,
'Conditional' => true,
'HookToPrefix' => 'pr',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnNew', 'OnAfterItemLoad'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnPreSave',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'lst',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnBeforeCopyToLive' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnSaveVirtualProduct',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'lst',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnDeleteListingType',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'file',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnNew', 'OnEdit' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnPreSave',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
),
),
'IDField' => 'ProductId',
'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_product.gif',
'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
'MaxHotNumber' => 'Product_MaxHotNumber', // maximum number of HOT (top seller) items
'HotLimit' => 'Product_HotLimit', // variable name in inp_Cache table
'ClickField' => 'Hits', // item click count is stored here (in item table)
),
'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!'),
),
'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!'),
'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!'),
'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!'),
'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!'),
'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!"),
'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!'),
'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!'),
'format' => "#p_status# '#p_titlefield#' - #rev_status#",
),
'coupon_selector' => Array('format' => '!la_title_CouponSelector!'),
'products_export' => Array('format' => '!la_title_ProductsExport!'),
'products_import' => Array('format' => '!la_title_ImportProducts!'),
'tree_in-commerce' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Commerce', 'Version')),
),
'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'),
'Sections' => Array(
'in-commerce' => Array(
'parent' => 'in-portal:root',
'icon' => 'in-commerce:in-commerce',
'label' => 'la_title_In-Commerce',
'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 3.4,
'type' => stTREE,
),
+ 'in-commerce:products' => Array(
+ 'parent' => 'in-commerce',
+ 'icon' => 'settings_general',
+ 'label' => 'la_tab_Products',
+ 'url' => Array('t' => 'catalog/advanced_view', 'anchor' => 'tab-p.showall', 'pass' => 'm'),
+ 'onclick' => 'setCatalogTab(\'p.showall\')',
+ 'permissions' => Array('view'),
+ 'priority' => 0.1,
+ 'type' => stTREE,
+ ),
+
'in-commerce:general' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_general',
'label' => 'la_tab_GeneralSettings',
'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 9,
'type' => stTREE,
),
'in-commerce:output' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_output',
'label' => 'la_tab_ConfigOutput',
'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 10,
'type' => stTREE,
),
'in-commerce:search' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_search',
'label' => 'la_tab_ConfigSearch',
'url' => Array('t' => 'config/config_search', 'module_key' => 'products', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 11,
'type' => stTREE,
),
'in-commerce:incommerce_configemail' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_email',
'label' => 'la_tab_ConfigE-mail',
'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 12,
'type' => stTREE,
),
'in-commerce:contacts' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_contacts',
'label' => 'la_tab_ConfigContacts',
'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 13,
'type' => stTREE,
),
'in-commerce:configuration_custom' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_custom',
'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'),
'priority' => 14,
'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),
),
'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 (
'SameImages' => 'img.SameImages',
'LocalThumb' => 'img.LocalThumb',
'ThumbPath' => 'img.ThumbPath',
'ThumbUrl' => 'img.ThumbUrl',
'LocalImage' => 'img.LocalImage',
'LocalPath' => 'img.LocalPath',
'FullUrl' => 'img.Url',
'Price' => 'pricing.Price',
'Cost' => 'pricing.Cost',
'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
'ParentPath' => TABLE_PREFIX.'Category.ParentPath',
'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name',
'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
'FileSize' => 'files.Size',
'FilePath' => 'files.FilePath',
'FileVersion' => 'files.Version',
),
'showall' => Array (
'Price' => 'pricing.Price',
'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name',
'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
'FileSize' => 'files.Size',
'FilePath' => 'files.FilePath',
'FileVersion' => 'files.Version',
'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
),
),
'ListSQLs' => Array(
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup ON '.TABLE_PREFIX.'PortalGroup.GroupId = %1$s.AccessGroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'Images img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'ProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId
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
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
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
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'),
)
),
'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
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'Images img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'ProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1
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', 'default' => NULL),
'DescriptionExcerpt' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', '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' => true, 'default' => 2 ),
'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => true, 'default' => 2 ),
'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => true, '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' => true, 'default' => 0),
'OnSale' => Array('type' => 'int', 'not_null' => true, 'default' => 0),
'Priority' => Array('type'=>'int', 'not_null' => true, 'default' => 0),
'CachedRating' => Array('not_null' => true, 'default' => 0, 'type' => 'float', 'formatter' => 'kFormatter', 'format' => '%0.2f'),
'CachedVotesQty' => Array('type'=>'int', 'not_null' => true, 'default' => 0),
'Hits' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format' => '%d', 'not_null' => true, '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' => true, 'default' => 0),
'CreatedById' => Array('type' => 'int', 'not_null' => true, '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', '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', 'not_null' => 1, 'default' => ''),
'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),
'ProcessingData' => Array('type' => 'string', 'default' => null),
'ShippingLimitation' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
'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', 'default' => null),
),
'VirtualFields' => Array(
'Qty' => 1,
'Price' => Array('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0),
'Cost' => Array('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0),
'IsHot' => Array('type'=>'int'),
'IsNew' => Array('type'=>'int'),
'IsPop' => Array('type'=>'int'),
'Manufacturer' => Array(),
// export related fields: begin
'CategoryId' => Array('type' => 'int', '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
// 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
'ThumbnailImage' => Array('type' => 'string', 'default' => ''),
'FullImage' => Array('type' => 'string', 'default' => ''),
'ImageAlt' => Array('type' => 'string', 'default' => ''),
'Filename' => Array('type' => 'string','not_null' => '1','default' => ''),
'CachedNavbar' => Array('type' => 'string', 'default' => ''),
'ParentPath' => Array('type' => 'string', 'default' => ''),
'FileSize' => Array('type' => 'int','formatter' => 'kFilesizeFormatter','not_null' => 1, 'default' => 0),
'FilePath' => Array(),
'FileVersion' => Array(),
// 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(
'Default' => Array(
'Icons' => Array('default'=>'icon16_product.gif',1=>'icon16_product.gif',2=>'icon16_product_pending.gif',0=>'icon16_product_disabled.gif'),
'Fields' => Array(
'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter' ),
'SKU' => Array( 'title'=>'la_col_ProductSKU' ),
'Type' => Array('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter'),
'Manufacturer' => Array('title' => 'la_col_Manufacturer'),
'Name' => Array( 'title'=>'la_col_ProductName', 'data_block'=>'grid_catitem_td' ),
'Price' => Array('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter'),
'QtyInStock' => Array('title' => 'la_col_Qty', 'data_block'=>'qty_td', 'filter_block' => 'grid_range_filter'),
'QtyBackOrdered' => Array('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'),
'OnSale' => Array('title' => 'la_col_OnSale', 'filter_block' => 'grid_options_filter'),
/*
'Weight' => Array( 'title'=>'la_col_ProductWeight' ),
'CreatedOn_formatted' => Array( 'title'=>'la_col_ProductCreatedOn', 'sort_field' => 'CreatedOn' ),
'BackOrderDate_formatted' => Array( 'title'=>'la_col_ProductBackOrderDate', 'sort_field' => 'BackOrderDate' ),*/
),
),
'Radio' => Array(
'Icons' => Array('default'=>'icon16_product.gif',1=>'icon16_product.gif',2=>'icon16_product_pending.gif',0=>'icon16_product_disabled.gif'),
'Selector' => 'radio',
'Fields' => Array(
'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_radio_td' ),
'SKU' => Array( 'title'=>'la_col_ProductSKU' ),
'Type' => Array('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter'),
'Manufacturer' => Array('title' => 'la_col_Manufacturer'),
'Name' => Array( 'title'=>'la_col_ProductName', 'data_block'=>'grid_catitem_td' ),
'Price' => Array('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter'),
'QtyInStock' => Array('title' => 'la_col_Qty', 'data_block'=>'qty_td', 'filter_block' => 'grid_range_filter'),
'QtyBackOrdered' => Array('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'),
),
),
),
'ConfigMapping' => Array(
'PerPage' => 'Comm_Perpage_Products',
'ShortListPerPage' => 'Comm_Perpage_Products_Short',
'DefaultSorting1Field' => 'product_OrderProductsBy',
'DefaultSorting2Field' => 'product_OrderProductsThenBy',
'DefaultSorting1Dir' => 'product_OrderProductsByDir',
'DefaultSorting2Dir' => 'product_OrderProductsThenByDir',
'RatingDelayValue' => 'product_RatingDelay_Value',
'RatingDelayInterval' => 'product_RatingDelay_Interval',
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/products/products_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.99.2.19
\ No newline at end of property
+1.99.2.20
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl (revision 11363)
+++ branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl (revision 11364)
@@ -1,48 +1,43 @@
-<inp2:m_RequireLogin permissions="in-commerce:manufacturers.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="manuf" icon="icon46_manufacturers" module="in-commerce" title="!la_title_Manufacturers!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="manuf" title_preset="manuf_list" module="in-commerce" icon="icon46_manufacturers"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="manuf" section="in-commerce:manufacturers" title_preset="manuf_list"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('manuf', 'in-commerce/manufacturers/manufacturers_edit');
}
-
+
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_manufacturer', '<inp2:m_phrase label="la_ToolTip_NewManufacturer" escape="1"/>',
function() {
std_precreate_item('manuf', 'in-commerce/manufacturers/manufacturers_edit')
} ) );
-
+
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('manuf')
} ) );
-
-
+
+
a_toolbar.Render();
-
+
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="manuf" IdField="ManufacturerId" grid="Default"/>
<script type="text/javascript">
Grids['manuf'].SetDependantToolbarButtons( new Array('edit','delete') );
-
+
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8
\ No newline at end of property
+1.8.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/user_item_tab.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/user_item_tab.tpl (revision 11363)
+++ branches/RC/in-commerce/admin_templates/user_item_tab.tpl (revision 11364)
@@ -1,44 +1,43 @@
<inp2:m_DefaultParam title_property=""/>
<inp2:m_DefineElement name="catalog_tab">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
<div id="products_div" prefix="<inp2:m_param name="prefix"/>" view_template="in-commerce/user_item_tab" edit_template="in-commerce/products/products_edit" dep_buttons="new_product" category_id="-1" class="catalog-tab"></div>
<script type="text/javascript">$Catalog.registerTab('products');</script>
</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="tab_init" value="2">
<inp2:{$prefix}_UnitOption name="$title_property" result_to_var="tab_title"/>
<inp2:m_RenderElement name="item_tab" prefix="$prefix" title="$tab_title"/>
</inp2:m_if>
<inp2:m_else/>
<inp2:m_include t="incs/blocks"/>
- <inp2:m_include t="incs/grid_blocks"/>
+ <inp2:m_include t="incs/in-portal"/>
<inp2:m_include t="categories/ci_blocks"/>
+ <inp2:$prefix_InitList grid="$grid_name"/>
+
$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount/>');
$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id"/>);
+ $Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
+
+ <inp2:m_DefineElement name="qty_td">
+ <inp2:Field field="QtyInStock" grid="$grid"/>/<inp2:Field field="QtyReserved" grid="$grid"/>
+ </inp2:m_DefineElement>
+
+ <inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="ProductId" grid="$grid_name" menu_filters="yes"/>
- <inp2:m_RenderElement name="grid_js" selected_class="selected_div" tag_name="tr" PrefixSpecial="$prefix" IdField="ProductId" grid="Default" menu_filters="yes"/>
- <inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="$prefix" grid="Default" ajax="1"/>
Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete'));
$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
#separator#
<!-- products tab: begin -->
<inp2:m_RenderElement name="kernel_form" form_name="products_form"/>
-
- <inp2:m_DefineElement name="qty_td">
- <td valign="top" class="text">
- <inp2:Field field="QtyInStock" grid="$grid"/>/<inp2:Field field="QtyReserved" grid="$grid"/>
- </td>
- </inp2:m_DefineElement>
-
- <inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="ProductId" grid="Default" no_toolbar="no_toolbar" menu_filters="yes"/>
-
+ <inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="ProductId" grid="$grid_name" menu_filters="yes"/>
<inp2:m_RenderElement name="kernel_form_end"/>
<!-- products tab: end -->
</inp2:m_if>
</inp2:m_DefineElement>
-<!--## <inp2:p_InitCatalogTab render_as="catalog_tab"/> ##-->
+<!--## <inp2:p_InitCatalogTab render_as="catalog_tab" default_grid="Default" radio_grid="Radio"/> ##-->
<inp2:m_if check="m_Param" name="tab_init">
<inp2:m_include template="in-commerce/user_order_item_tab" tab_init="$tab_init" title_property="$title_property"/>
</inp2:m_if>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/user_item_tab.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.5
\ No newline at end of property
+1.1.2.6
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/catalog_tab.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/catalog_tab.tpl (revision 11363)
+++ branches/RC/in-commerce/admin_templates/catalog_tab.tpl (revision 11364)
@@ -1,83 +1,82 @@
<inp2:m_DefineElement name="catalog_tab">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
function createProductMenu()
{
prod_menu = menuMgr.createMenu(rs('new_prod_menu'));
prod_menu.applyBorder(false, false, false, false);
prod_menu.dropShadow("none");
prod_menu.showIcon = true;
<inp2:m_DefineElement name="product_type_elem">
prod_menu.addItem(rs('product.type.<inp2:m_param name="key"/>'),'<inp2:m_phrase name="$option" escape="1"/>','javascript:new_product(<inp2:m_param name="key"/>);');
</inp2:m_DefineElement>
<inp2:{$prefix}_PredefinedOptions selected="selected" field="Type" block="product_type_elem" skip_autoload="true"/>
}
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewProduct" escape="1"/>::<inp2:m_phrase label="la_ToolTip_NewProduct" escape="1"/>', function() {
renderMenus();
nls_showMenu(rs('new_prod_menu'), a_toolbar.GetButtonImage('new_item'))
}, true
) );
function new_product($type)
{
$form_name = $Catalog.queryTabRegistry('prefix', '<inp2:m_param name="prefix"/>', 'tab_id') + '_form';
set_hidden_field('<inp2:m_param name="prefix"/>_new_type', $type);
std_precreate_item('<inp2:m_param name="prefix"/>', 'in-commerce/products/products_edit');
}
createProductMenu();
</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="tab_init" value="2">
<div id="products_div" prefix="<inp2:m_param name="prefix"/>" view_template="in-commerce/catalog_tab" edit_template="in-commerce/products/products_edit" category_id="-1" dep_buttons="new_item" class="catalog-tab"></div>
<script type="text/javascript">$Catalog.registerTab('products');</script>
</inp2:m_if>
+
+ <inp2:m_if check="m_ParamEquals" name="tab_init" value="3">
+ $Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
+ </inp2:m_if>
<inp2:m_else/>
<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
<inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
<inp2:m_include t="incs/blocks"/>
- <inp2:m_include t="incs/grid_blocks"/>
+ <inp2:m_include t="incs/in-portal"/>
<inp2:m_include t="categories/ci_blocks"/>
+ <inp2:$prefix_InitList grid="$grid_name"/>
+
$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount/>');
$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id"/>);
+ $Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword no_special="1" js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
+
+ <inp2:m_DefineElement name="qty_td">
+ <inp2:Field field="QtyInStock" grid="$grid"/>/<inp2:Field field="QtyReserved" grid="$grid"/>
+ </inp2:m_DefineElement>
+
+ <inp2:m_include template="in-auction/inc/grid_blocks" is_silent="1"/>
+
+ <inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="ProductId" grid="$grid_name" menu_filters="yes"/>
+ <inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="$prefix" grid="$grid_name" ajax="1"/>
- <inp2:m_RenderElement name="grid_js" selected_class="selected_div" tag_name="tr" PrefixSpecial="$prefix" IdField="ProductId" grid="Default" menu_filters="yes"/>
- <inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="$prefix" grid="Default" ajax="1"/>
<inp2:m_if check="m_ParamEquals" name="tab_dependant" value="yes">
Grids['<inp2:m_param name="prefix"/>'].AddAlternativeGrid('<inp2:m_param name="cat_prefix"/>', true);
</inp2:m_if>
Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));
$Catalog.reflectPasteButton(<inp2:c_HasClipboard/>);
$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
<inp2:m_if check="m_ParamEquals" name="tab_mode" value="single">
- Grids['<inp2:m_param name="prefix"/>'].EnableRadioMode();
Grids['<inp2:m_param name="prefix"/>'].DblClick = function() {return false};
</inp2:m_if>
#separator#
<!-- products tab: begin -->
<inp2:m_RenderElement name="kernel_form" form_name="products_form"/>
-
- <inp2:m_DefineElement name="qty_td">
- <td valign="top" class="text">
- <inp2:Field field="QtyInStock" grid="$grid"/>/<inp2:Field field="QtyReserved" grid="$grid"/>
- </td>
- </inp2:m_DefineElement>
-
- <inp2:m_include template="in-auction/inc/grid_blocks" is_silent="1"/>
-
- <input type="hidden" name="<inp2:m_param name="prefix"/>_new_type" id="<inp2:m_param name="prefix"/>_new_type" value="">
-
- <inp2:m_if check="m_ParamEquals" name="tab_mode" value="multi">
- <inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="ProductId" grid="Default" no_toolbar="no_toolbar" menu_filters="yes"/>
- <inp2:m_else/>
- <inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="ProductId" grid="Radio" no_toolbar="no_toolbar" menu_filters="yes"/>
- </inp2:m_if>
+ <input type="hidden" name="<inp2:m_param name="prefix"/>_new_type" id="<inp2:m_param name="prefix"/>_new_type" value="">
+ <inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="ProductId" grid="$grid_name" menu_filters="yes"/>
<inp2:m_RenderElement name="kernel_form_end"/>
<!-- products tab: end -->
</inp2:m_if>
</inp2:m_DefineElement>
-<inp2:p_InitCatalogTab render_as="catalog_tab"/>
\ No newline at end of file
+<inp2:p_InitCatalogTab render_as="catalog_tab" default_grid="Default" radio_grid="Radio"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/catalog_tab.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.24.2.4
\ No newline at end of property
+1.24.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/currencies/currencies_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/currencies/currencies_list.tpl (revision 11363)
+++ branches/RC/in-commerce/admin_templates/currencies/currencies_list.tpl (revision 11364)
@@ -1,122 +1,124 @@
<inp2:m_RequireLogin permissions="in-commerce:currencies.view" system="1"/>
<inp2:m_include t="incs/header" nobody="yes"/>
<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
<inp2:m_RenderElement name="section_header" prefix="curr" icon="icon46_currencies" module="in-commerce" title="!la_title_Currencies!"/>
<inp2:m_RenderElement name="blue_bar" prefix="curr" title_preset="currencies_list" module="in-commerce" icon="icon46_currencies"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
function edit()
{
std_edit_item('curr', 'in-commerce/currencies/currencies_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarSeparator('sep6') );
a_toolbar.AddButton( new ToolBarButton('primary_currency', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
submit_event('curr','OnSetPrimary');
}
) );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('curr','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('curr','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('curr','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('curr','OnMassMoveDown');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('update_rates', '<inp2:m_phrase label="la_ToolTip_UpdateRates" escape="1"/>', function() {
if(Grids['curr'].CountSelected() > 0)
{
message = '<inp2:m_phrase label="la_warning_UpdateSelectedCurrencyRates" />?';
}
else
{
message = '<inp2:m_phrase label="la_warning_UpdateAllCurrencyRates" />?';
}
if(confirm(message))
{
submit_event('curr','OnUpdateRates');
}
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="curr_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="curr_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="curr_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
+
+ <inp2:m_RenderElement name="search_main_toolbar" prefix="curr" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="currency_caption_td" >
- <td valign="top" class="text"><inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>
- <span class="priority"><inp2:m_if check="{$PrefixSpecial}_fieldequals" field="Priority" value="0"><inp2:m_else/><sup><inp2:{$PrefixSpecial}_field field="Priority" /></sup></inp2:m_if></span></td>
+ <inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>
+ <span class="priority"><inp2:m_if check="{$PrefixSpecial}_fieldequals" field="Priority" value="0"><inp2:m_else/><sup><inp2:{$PrefixSpecial}_field field="Priority" /></sup></inp2:m_if></span>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="curr" IdField="CurrencyId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
<script type="text/javascript">
Grids['curr'].SetDependantToolbarButtons( new Array('edit','primary_currency','approve','decline','move_up','move_down') );
</script>
<inp2:m_DefineElement name="remove_unused_warning" >
<input type="hidden" name="unused_ids" id="unused_ids" value="<inp2:m_param name="unused_ids" />">
<script type="text/javascript">
if(inpConfirm('<inp2:m_phrase label="la_WarningCurrenciesNotUsed" />: <inp2:m_param name="unused_iso" />. <inp2:m_phrase label="la_WarningRemoveUnusedCurrencies" />?'))
{
submit_event('curr', 'OnDisableUnused');
}
</script>
</inp2:m_DefineElement>
<inp2:curr_DisableUnusedWarning block="remove_unused_warning" />
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/currencies/currencies_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.6.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/user_order_item_tab.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/user_order_item_tab.tpl (revision 11363)
+++ branches/RC/in-commerce/admin_templates/user_order_item_tab.tpl (revision 11364)
@@ -1,34 +1,36 @@
<inp2:m_DefineElement name="order_catalog_tab">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
<div id="orders_div" prefix="<inp2:m_param name="prefix"/>" view_template="in-commerce/user_order_item_tab" edit_template="in-commerce/orders/orders_edit" dep_buttons="new_order" category_id="-1" class="catalog-tab"></div>
<script type="text/javascript">$Catalog.registerTab('orders');</script>
</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="tab_init" value="2">
<inp2:{$prefix}_UnitOption name="$title_property" result_to_var="tab_title"/>
<inp2:m_RenderElement name="item_tab" prefix="$prefix" title="$tab_title"/>
</inp2:m_if>
<inp2:m_else/>
<inp2:m_include t="incs/blocks"/>
- <inp2:m_include t="incs/grid_blocks"/>
+ <inp2:m_include t="incs/in-portal"/>
<inp2:m_include t="categories/ci_blocks"/>
<inp2:m_include template="in-commerce/orders/order_blocks"/>
+
+ <inp2:$prefix_InitList grid="$grid_name"/>
+
$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_TotalRecords/>');
$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id"/>);
+ $Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
+
+ <inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="OrderId" grid="$grid_name" menu_filters="yes"/>
- <inp2:m_RenderElement name="grid_js" selected_class="selected_div" tag_name="tr" PrefixSpecial="$prefix" IdField="OrderId" grid="Default" menu_filters="yes"/>
- <inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="$prefix" grid="Default" ajax="1"/>
Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete'));
$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
#separator#
<!-- orders tab: begin -->
<inp2:m_RenderElement name="kernel_form" form_name="orders_form"/>
-
- <inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="OrderId" grid="Search" no_toolbar="no_toolbar" menu_filters="yes"/>
-
+ <inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="OrderId" grid="$grid_name" menu_filters="yes"/>
<inp2:m_RenderElement name="kernel_form_end"/>
<!-- orders tab: end -->
</inp2:m_if>
</inp2:m_DefineElement>
-<inp2:ord_InitCatalogTab render_as="order_catalog_tab"/>
\ No newline at end of file
+<inp2:ord_InitCatalogTab render_as="order_catalog_tab" default_grid="Search" radio_grid="Radio"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/user_order_item_tab.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.4
\ No newline at end of property
+1.1.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/payment_type/payment_type_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/payment_type/payment_type_list.tpl (revision 11363)
+++ branches/RC/in-commerce/admin_templates/payment_type/payment_type_list.tpl (revision 11364)
@@ -1,107 +1,107 @@
<inp2:m_RequireLogin permissions="in-commerce:payment_types.view" system="1"/>
<inp2:m_include t="incs/header" nobody="yes"/>
<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
<inp2:m_RenderElement name="section_header" prefix="pt" icon="icon46_payment_types" module="in-commerce" title="!la_title_PaymentTypes!"/>
<inp2:m_RenderElement name="blue_bar" prefix="pt" title_preset="payment_type_list" module="in-commerce" icon="icon46_payment_types"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('pt', 'in-commerce/payment_type/payment_type_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('in-commerce:new_paymenttype', '<inp2:m_phrase label="la_ToolTip_NewPaymentType" escape="1"/>',
function() {
std_precreate_item('pt', 'in-commerce/payment_type/payment_type_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('pt')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('primary_paymenttype', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
submit_event('pt','OnSetPrimary');
}
) );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('pt','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('pt','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('pt','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('pt','OnMassMoveDown');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="payment_caption_td" >
- <td valign="top" class="text"><inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>
- <span class="priority"><inp2:m_if check="{$PrefixSpecial}_fieldequals" field="Priority" value="0"><inp2:m_else/><sup><inp2:{$PrefixSpecial}_field field="Priority" /></sup></inp2:m_if></span></td>
+ <inp2:Field field="$field" grid="$grid"/>
+ <span class="priority"><inp2:m_if check="FieldEquals" field="Priority" value="0"><inp2:m_else/><sup><inp2:Field field="Priority" /></sup></inp2:m_if></span>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="primary_type_delete_error" >
<script>
alert('<inp2:m_Phrase label="la_error_CannotDeletePaymentType"/>');
</script>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="pt" IdField="PaymentTypeId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['pt'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','primary_paymenttype') );
</script>
<inp2:m_DefineElement name="remove_unused_warning" >
<input type="hidden" name="unused_ids" id="unused_ids" value="<inp2:m_param name="unused_ids" />">
<script type="text/javascript">
if(inpConfirm('<inp2:m_phrase label="la_WarningCurrenciesNotUsed" />: <inp2:m_param name="unused_iso" />. <inp2:m_phrase label="la_WarningRemoveUnusedCurrencies" />?'))
{
submit_event('curr', 'OnDisableUnused');
}
</script>
</inp2:m_DefineElement>
<inp2:curr_DisableUnusedWarning block="remove_unused_warning" />
<inp2:pt_DeleteError block="primary_type_delete_error"/>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/payment_type/payment_type_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9.2.1
\ No newline at end of property
+1.9.2.2
\ No newline at end of property

Event Timeline