- $stored_ids = $this->Conn->GetCol("SELECT PriceId FROM ".$object->TableName." WHERE ProductId=".$this->Application->GetVar("p_id").' '.$where_group);
$this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 0 WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
$this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 1 WHERE ('.$table_info['ForeignKey'].' = '.$table_info['ParentId'].') AND (PriceId = '.$id.')');
//$cheapest_group = $this->Conn->GetOne('SELECT GroupId FROM '.$object->TableName.' WHERE ProductId='.$this->Application->GetVar('p_id').' AND Price IS NOT NULL AND GroupId IN ('.$user_groups.') AND MinQty = 1 GROUP BY GroupId ORDER BY Price ASC');
$sql = 'SELECT PriceId, Price, GroupId
FROM ' . $object->TableName . '
WHERE ProductId = ' . $this->Application->GetVar('p_id') . ' AND Price IS NOT NULL AND GroupId IN (' . $user_groups . ')
if ($event->status == kEvent::erSUCCESS && !$event->redirect) {
$event->SetRedirectParam('pass', 'm');
$event->SetRedirectParam('pass_category', 0); //otherwise mod-rewrite shop-cart URL will include category
$event->redirect = true;
}
else {
if ($this->Application->isAdminUser) {
$event->SetRedirectParam('opener', 'u');
}
}
}
/**
* Check if required options are selected & selected option combination is in stock
*
* @param kEvent $event
* @param Array $options
* @param int $product_id
* @param int $qty
* @param int $selection_mode
* @return bool
*/
function CheckOptions(&$event, &$options, $product_id, $qty, $selection_mode)
{
// 1. check for required options
$selection_filter = $selection_mode == 1 ? ' AND OptionType IN (1,3,6) ' : '';
$req_options = $this->Conn->GetCol('SELECT ProductOptionId FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductId = '.$product_id.' AND Required = 1 '.$selection_filter);
$result = true;
foreach ($req_options as $opt_id) {
if (!getArrayValue($options, $opt_id)) {
$this->Application->SetVar('opt_error', 1); //let the template know we have an error
LEFT JOIN '.TABLE_PREFIX.'Products ON '.TABLE_PREFIX.'Products.ProductId = '.TABLE_PREFIX.'OrderItems.ProductId
LEFT JOIN '.$poc_table.' ON ('.$poc_table.'.CombinationCRC = '.TABLE_PREFIX.'OrderItems.OptionsSalt) AND ('.$poc_table.'.ProductId = '.TABLE_PREFIX.'OrderItems.ProductId)
$sql = 'UPDATE '.$table.' SET Status = 0 WHERE '.$id_field.' = '.$id;
$this->Conn->Query($sql);
}
/* ======================== COMMON CODE ======================== */
/**
* Split one timestamp field into 2 virtual fields
*
* @param kEvent $event
* @access public
*/
function OnAfterItemLoad(&$event)
{
// get user fields
$object =& $event->getObject();
$user_id = $object->GetDBField('PortalUserId');
if($user_id)
{
$user_info = $this->Conn->GetRow('SELECT *, CONCAT(FirstName,\' \',LastName) AS UserTo FROM '.TABLE_PREFIX.'PortalUser WHERE PortalUserId = '.$user_id);
IF('.TABLE_PREFIX.'Products.InventoryStatus = 2, '.$poc_table.'.QtyInStock, '.TABLE_PREFIX.'Products.QtyInStock) AS QtyInStock, '.
TABLE_PREFIX.'Products.QtyInStockMin, '.
$table_prefix.'OrderItems.ProductId, '.
TABLE_PREFIX.'Products.InventoryStatus,'.
$table_prefix.'OrderItems.OptionsSalt AS CombinationCRC
FROM '.$table_prefix.'OrderItems
LEFT JOIN '.TABLE_PREFIX.'Products ON '.TABLE_PREFIX.'Products.ProductId = '.$table_prefix.'OrderItems.ProductId
LEFT JOIN '.$poc_table.' ON ('.$poc_table.'.CombinationCRC = '.$table_prefix.'OrderItems.OptionsSalt) AND ('.$poc_table.'.ProductId = '.$table_prefix.'OrderItems.ProductId)
WHERE OrderId = '.$ord_id.' AND '.TABLE_PREFIX.'Products.Type = 1
if ($an_item['BackOrderFlag'] > 0) { // we don't need to reserve if it's backordered item
$to_reserve = 0;
}
else {
$to_reserve = min($an_item['Quantity']-$an_item['QuantityReserved'], $an_item['QtyInStock']-$an_item['QtyInStockMin']); //it should be equal, but just in case
$combs = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductOptionCombinations WHERE CombinationCRC = '.$crc.' AND ProductId = '.$object->GetDBField('ProductId').' AND (Price != 0 OR (PriceType = 1 AND Price = 0))');
return $combs == 0; // no overriding combinations found
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Name', '', 'In-Commerce', 'in-commerce:contacts');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.04 WHERE VariableName = 'Comm_Contacts_Phone';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.05 WHERE VariableName = 'Comm_Contacts_Fax';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.06 WHERE VariableName = 'Comm_Contacts_Email';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.07 WHERE VariableName = 'Comm_Contacts_Additional';
DELETE FROM Phrase WHERE Phrase IN ('la_fld_ManufacturerId', 'la_fld_DiscountId', 'la_fld_CouponId', 'la_fld_AffiliatePlanId', 'la_fld_AffiliateId', 'la_fld_ZoneId', 'la_fld_EngineId', 'la_fld_ShippingId', 'la_fld_ProductId', 'la_fld_OptionId', 'la_fld_CurrencyId', 'la_fld_Zone_Name');
UPDATE Phrase SET Module = 'In-Commerce' WHERE ((Phrase LIKE '%Product%' OR Phrase LIKE '%Shipping%' OR Phrase LIKE '%Coupon%' OR Phrase LIKE '%Discount%' OR Phrase LIKE '%Report%' OR Phrase LIKE '%Currency%' OR Phrase LIKE '%Cart%') AND (Module = 'Core'));
# ===== v 5.0.1 =====
UPDATE ConfigurationValues SET VariableValue = 'in-commerce/products/product_detail' WHERE VariableName = 'p_ItemTemplate';
UPDATE ConfigurationAdmin SET ValueList = '1=la_opt_Session,2=la_opt_PermanentCookie' WHERE VariableName = 'Comm_AffiliateStorageMethod';
UPDATE ConfigurationAdmin SET ValueList = 'ASC=la_common_Ascending,DESC=la_common_Descending'
WHERE VariableName IN ('product_OrderProductsByDir', 'product_OrderProductsThenByDir');
UPDATE ConfigurationAdmin SET ValueList = '1=la_opt_PriceCalculationByPrimary,2=la_opt_PriceCalculationByOptimal'
WHERE VariableName = 'Comm_PriceBracketCalculation';
UPDATE ConfigurationAdmin
SET ValueList = '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year'
WHERE VariableName IN ('product_ReviewDelay_Interval', 'product_RatingDelay_Interval');
UPDATE CustomField SET FieldLabel = 'la_fld_cust_p_ItemTemplate', Prompt = 'la_fld_cust_p_ItemTemplate' WHERE FieldName = 'p_ItemTemplate';
UPDATE Events SET Type = 1 WHERE Event = 'BACKORDER.FULLFILL';
UPDATE ConfigurationAdmin SET ValueList = 'style="width: 50px;"' WHERE VariableName IN ('product_RatingDelay_Value', 'product_ReviewDelay_Value');
UPDATE Modules SET Path = 'modules/in-commerce/' WHERE `Name` = 'In-Commerce';
UPDATE ConfigurationValues
SET ValueList = '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, IsoCode AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>'
WHERE ValueList = '0=lu_none||<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>';
ALTER TABLE SiteDomains
ADD COLUMN BillingCountry varchar(3) NOT NULL DEFAULT '',
ADD COLUMN ShippingCountry varchar(3) NOT NULL DEFAULT '',
ADD COLUMN PrimaryCurrencyId int(11) NOT NULL DEFAULT '0',
ADD COLUMN Currencies varchar(255) NOT NULL DEFAULT '',
ADD COLUMN PrimaryPaymentTypeId int(11) NOT NULL DEFAULT '0',
ADD COLUMN PaymentTypes varchar(255) NOT NULL DEFAULT '',
ADD INDEX (BillingCountry),
ADD INDEX (ShippingCountry),
ADD INDEX (PrimaryCurrencyId),
ADD INDEX (Currencies),
ADD INDEX (PrimaryPaymentTypeId),
ADD INDEX (PaymentTypes);
UPDATE Phrase SET Module = 'Core' WHERE Phrase IN ('la_btn_Add', 'la_fld_RecipientName', 'la_fld_SenderName');
DELETE FROM Permissions WHERE Permission LIKE 'in-commerce:incommerce_configemail%';
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_Country', 'select', NULL, '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, IsoCode AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 20.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_Country', 'select', NULL, '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, IsoCode AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 30.05, 0, 1, NULL);
INSERT INTO PaymentTypes VALUES (1, 'Credit Card (manual)', 'Credit Card', 'Please enter your credit card details.', NULL, 1, 0, 1, 1, 3, DEFAULT, DEFAULT, ',15,');
INSERT INTO PaymentTypes VALUES (4, 'PayPal', 'PayPal', 'You will be redirected to PayPal site to make the payment after confirming your order on the next checkout step.', NULL, 0, 0, 0, 1, 4, DEFAULT, DEFAULT, ',15,');
INSERT INTO PaymentTypes VALUES (2, 'Check/MO', 'Check or Money Order', NULL, NULL, 0, 0, 0, 1, 1, 1, DEFAULT, ',15,');
INSERT INTO PaymentTypes VALUES (3, 'Authorize.Net', 'Credit Card', 'Please enter your Credit Card details below. Your credit card will not be charged until you confirm your purchase on the next(last) step of checkout process.', NULL, 0, 0, 0, 1, 2, DEFAULT, DEFAULT, ',15,');
INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 4, 131);
INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 2, 131);
INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 3, 131);
INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 1, 131);
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.RATE', 'la_PermName_Product.Rate_desc', 'la_PermName_Product.Rate_error', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW', 'la_PermName_Product.Review_desc', 'la_PermName_Product.Review_error', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW.PENDING', 'la_PermName_Product.Review_Pending_desc', ' la_PermName_Product.Review_Pending_error', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.ADD', 'la_PermName_Product.Add_desc', 'la_PermName_Product.Add_error', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.DELETE', 'la_PermName_Product.Delete_desc', 'la_PermName_Product.Delete_error', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.MODIFY', 'la_PermName_Product.Modify_desc', 'la_PermName_Product.Modify_desc', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.VIEW', 'la_PermName_Product.View_desc', 'la_PermName_Product.View_error', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.RATE', 'la_PermName_Product.Rate_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW', 'la_PermName_Product.Review_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW.PENDING', 'la_PermName_Product.Review_Pending_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.ADD', 'la_PermName_Product.Add_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.DELETE', 'la_PermName_Product.Delete_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.MODIFY', 'la_PermName_Product.Modify_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.VIEW', 'la_PermName_Product.View_desc', 'In-Commerce');
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 14, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.RATE', 13, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.REVIEW', 13, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.REVIEW.PENDING', 13, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 13, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 13, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 12, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.ADD', 11, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.DELETE', 11, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.MODIFY', 11, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 11, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:products.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:deny', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:archive', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:place', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:process', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:ship', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:reset_to_pending', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:move_up', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:move_down', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:update_rate', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:set_primary', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.advanced:set_primary', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:set_primary', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:move_up', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:move_down', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:general.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:general.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:output.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:output.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:search.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:contacts.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:contacts.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:paymentlog.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:downloadlog.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:downloadlog.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:reports.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:reports.add', 11, 1, 1, 0);
-INSERT INTO StylesheetSelectors VALUES (162, 1, 'Calendar''s top and bottom titles', '.calendar .title', 'a:0:{}', '', 1, 'color: #00309C;\r\nbackground-color: #98CEE4;\r\nborder: 1px solid #83B2C5;\r\nborder-top: 0px;\r\npadding: 1px;', 0);
-INSERT INTO StylesheetSelectors VALUES (163, 1, 'Calendar''s control buttons', '.calendar .calendar_button', 'a:0:{}', '', 1, 'color: black;\r\nfont-size: 12px;\r\nbackground-color: #eeeeee;', 0);
-INSERT INTO StylesheetSelectors VALUES (30, 1, 'Block without a border', '.block-no-border', 'a:2:{s:6:"border";s:4:"none";s:13:"margin-bottom";s:4:"10px";}', 'Block without a border', 1, '', 0);