function getMap()
 {
     $params = array("gc_id" => $this->id, "gc_code" => $this->code, "gc_from" => $this->from_like, "gc_to" => $this->to_like, 'gc_message' => $this->message_like, 'gc_amount' => $this->amount, 'gc_amount_min' => $this->amount_min, 'gc_amount_max' => $this->amount_max, 'gc_remainder' => $this->remainder, 'gc_remainder_min' => $this->remainder_min, 'gc_remainder_max' => $this->remainder_max, 'gc_date_created' => $this->date_created, 'gc_date_created_min' => $this->date_created_min, 'gc_date_created_max' => $this->date_created_max, 'gc_sendtype' => $this->sendtype, 'gc_status' => $this->status, 'sort_by' => $this->sort_by, 'sort_order' => $this->sort_order, 'paginator' => $this->paginator, 'purchased_order_id' => $this->purchased_order_id);
     if ($this->use_paginator === true) {
         $params['paginator'] = null;
         $params['paginator'] = execQueryPaginator('SELECT_GC_LIST_BY_FILTER', $params);
     }
     return $params;
 }
 function searchPgCustomerReviews($search_filter, $pg_enable)
 {
     if ($pg_enable == PAGINATOR_ENABLE) {
         $search_filter['use_paginator'] = true;
     }
     return execQueryPaginator('SELECT_CUSTOMER_REVIEWS_BY_FILTER', $search_filter);
 }
Example #3
0
 function searchPgMenu($filter, $pg_enable = PAGINATOR_ENABLE)
 {
     if ($pg_enable == PAGINATOR_ENABLE) {
         $filter['use_paginator'] = true;
     }
     return execQueryPaginator('SELECT_CMS_MENU_LIST', $filter);
 }
 function selectProductSearchResultPg($params, $pg_enable)
 {
     if ($pg_enable == PAGINATOR_ENABLE) {
         $params['use_paginator'] = true;
     }
     return execQueryPaginator('SELECT_PRODUCT_SEARCH_RESULTS', $params);
 }
 function getPgSearchCustomersResult()
 {
     if ($this->_customers_search_filter === null) {
         return '';
     }
     if ($this->_customers_search_filter['type'] == 'custom' && !preg_match("/^[0-9]+\$/", $this->_customers_search_filter['search_string'])) {
         $attrs_to_search = array('FirstName', 'LastName', 'Email', 'Phone');
         $attrs_ids = execQuery('SELECT_ATTRS_GROUP_IDS_BY_ATTR_NAMES', $attrs_to_search);
         $this->_customers_search_filter['attr_group_ids'] = array();
         foreach ($attrs_ids as $v) {
             $this->_customers_search_filter['attr_group_ids'][] = $v['ag_id'];
         }
     } else {
         unset($this->_customers_search_filter['attr_group_ids']);
     }
     if (!isset($this->_customers_search_filter['currency_code'])) {
         $this->_customers_search_filter['currency_code'] = modApiFunc('Localization', 'getCurrencyCodeById', modApiFunc('Localization', 'getLocalMainCurrency'));
     }
     $this->_customers_search_filter['main_currency_code'] = modApiFunc('Localization', 'getCurrencyCodeById', modApiFunc('Localization', 'getLocalMainCurrency'));
     return execQueryPaginator('SELECT_SEARCH_CUSTOMERS', $this->_customers_search_filter);
 }
Example #6
0
 function getParams()
 {
     global $application;
     $this->params['category_id'] = $this->category_id;
     $this->params['product_id_list_to_ignore'] = $this->product_id_list_to_ignore;
     $this->params['product_id_list_to_select'] = $this->product_id_list_to_select;
     $this->params['select_mode_recursiveness'] = $this->select_mode_recursiveness;
     $this->params['select_mode_uniqueness'] = $this->select_mode_uniqueness;
     $this->params['filter']['status']['online_only'] = $this->select_online_products_only;
     $this->params['filter']['status']['exact_values'] = $this->select_online_products_only == true ? PRODUCT_STATUS_ONLINE : null;
     $this->params['filter']['membership_visibility']['active'] = $this->membership_filter;
     if ($this->sort_by === SORT_BY_RAND) {
         $this->params['rand'] = rand();
     }
     //                          -                                              .
     if (IN_CATEGORY_RECURSIVELY === $this->select_mode_recursiveness or IN_CATEGORY_RECURSIVELY_WITHOUT_CURRENT === $this->select_mode_recursiveness) {
         $c =& $application->getInstance('CCategoryInfo', $this->category_id);
         if ($this->select_online_products_only === true) {
             //             online    -
             $this->params['filter']['status']['online_subcat_ids'] = $c->_getOnlineSubCategories();
         } else {
             $this->params['category_left'] = $c->getCategoryTagValue('left');
             $this->params['category_right'] = $c->getCategoryTagValue('right');
         }
     }
     $this->params['filter']['stock_level']['min_value'] = $this->filter_stock_level_min;
     $this->params['filter']['stock_level']['max_value'] = $this->filter_stock_level_max;
     $this->params['filter']['stock_level']['sort_flag'] = $this->sort_by == SORT_BY_PRODUCT_QUANTITY_IN_STOCK;
     $this->params['filter']['stock_level']['product_to_skip'] = modApiFunc('Product_Options', 'getEntitiesWhichUseInventoryTracking', 'product');
     $this->params['filter']['type']['exact_values'] = $this->filter_product_type_id_list;
     $this->params['filter']['name']['like_values'] = $this->filter_product_name_like_values;
     $this->params['filter']['name']['search_condition'] = $this->filter_product_name_search_condition;
     $this->params['filter']['manufacturer']['exact_values'] = $this->filter_manufacturer_id_list;
     $this->params['filter']['price']['min_value'] = $this->filter_sale_price_min;
     $this->params['filter']['price']['max_value'] = $this->filter_sale_price_max;
     $this->params['filter']['price']['sort_flag'] = $this->sort_by == SORT_BY_PRODUCT_SALE_PRICE;
     $this->params['filter']['list_price']['min_value'] = $this->filter_list_price_min;
     $this->params['filter']['list_price']['max_value'] = $this->filter_list_price_max;
     $this->params['filter']['list_price']['sort_flag'] = $this->sort_by == SORT_BY_PRODUCT_LIST_PRICE;
     $this->params['filter']['per_item_shipping_cost']['min_value'] = $this->filter_per_item_shipping_cost_min;
     $this->params['filter']['per_item_shipping_cost']['max_value'] = $this->filter_per_item_shipping_cost_max;
     $this->params['filter']['per_item_shipping_cost']['sort_flag'] = $this->sort_by == SORT_BY_PRODUCT_PER_ITEM_SHIPPING_COST;
     $this->params['filter']['per_item_handling_cost']['min_value'] = $this->filter_per_item_handling_cost_min;
     $this->params['filter']['per_item_handling_cost']['max_value'] = $this->filter_per_item_handling_cost_max;
     $this->params['filter']['per_item_handling_cost']['sort_flag'] = $this->sort_by == SORT_BY_PRODUCT_PER_ITEM_HANDLING_COST;
     $this->params['filter']['weight']['min_value'] = $this->filter_weight_min;
     $this->params['filter']['weight']['max_value'] = $this->filter_weight_max;
     $this->params['filter']['weight']['sort_flag'] = $this->sort_by == SORT_BY_PRODUCT_WEIGHT;
     $this->params['filter']['sku']['like_values'] = $this->filter_sku_like_values;
     $this->params['filter']['sku']['search_condition'] = $this->filter_sku_search_condition;
     $this->params['filter']['sku']['sort_flag'] = $this->sort_by == SORT_BY_PRODUCT_SKU;
     $this->params['filter']['short_description']['like_values'] = $this->filter_short_description_like_values;
     $this->params['filter']['short_description']['search_condition'] = $this->filter_short_description_search_condition;
     $this->params['filter']['detailed_description']['like_values'] = $this->filter_detailed_description_like_values;
     $this->params['filter']['detailed_description']['search_condition'] = $this->filter_detailed_description_search_condition;
     $this->params['filter']['page_title']['like_values'] = $this->filter_page_title_like_values;
     $this->params['filter']['page_title']['search_condition'] = $this->filter_page_title_search_condition;
     $this->params['filter']['meta_keywords']['like_values'] = $this->filter_meta_keywords_like_values;
     $this->params['filter']['meta_keywords']['search_condition'] = $this->filter_meta_keywords_search_condition;
     $this->params['filter']['meta_description']['like_values'] = $this->filter_meta_description_like_values;
     $this->params['filter']['meta_description']['search_condition'] = $this->filter_meta_description_search_condition;
     $this->params['sort_by'] = $this->sort_by;
     $this->params['sort_direction'] = $this->sort_direction;
     $this->params['cur_membership'] = modApiFunc('Customer_Account', 'getCurrentSignedCustomerGroupID');
     //
     if ($this->use_paginator === true) {
         $this->params['paginator'] = null;
         $this->params['paginator'] = execQueryPaginator('SELECT_PRODUCT_LIST', $this->params);
     }
     return $this->params;
 }
 /**
  * Builds paginator data for the query to search labels
  */
 function searchPgLabels($search_filter, $pg_enable)
 {
     if ($pg_enable == PAGINATOR_ENABLE) {
         $search_filter['use_paginator'] = true;
     }
     return execQueryPaginator('SELECT_LABELS_BY_FILTER', $search_filter);
 }
 function getTimelineHeaders()
 {
     modAPIFunc('paginator', 'setCurrentPaginatorName', "TimelinePaginator");
     $text_filter_data = modApiFunc('Timeline', 'getFilterByText');
     if ($text_filter_data != null and isset($text_filter_data[0]) and isset($text_filter_data[1]) and is_array($text_filter_data[1])) {
         list($user_input, $index_words_list) = $text_filter_data;
     } else {
         $index_words_list = null;
     }
     $params = array('index_words_list' => $index_words_list, 'types' => $this->getFilterByTypes(), 'paginator' => null);
     $params['paginator'] = execQueryPaginator('SELECT_TIMELINE_HEADERS', $params);
     return execQuery('SELECT_TIMELINE_HEADERS', $params);
 }