本文整理汇总了PHP中mslib_fe::getProductsPageSet方法的典型用法代码示例。如果您正苦于以下问题:PHP mslib_fe::getProductsPageSet方法的具体用法?PHP mslib_fe::getProductsPageSet怎么用?PHP mslib_fe::getProductsPageSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mslib_fe
的用法示例。
在下文中一共展示了mslib_fe::getProductsPageSet方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: IN
$categoriesStartingPoint = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'categoriesStartingPoint', 's_advanced');
if (!$categoriesStartingPoint and is_numeric($this->conf['categoriesStartingPoint'])) {
$categoriesStartingPoint = $this->conf['categoriesStartingPoint'];
}
if ($categoriesStartingPoint > 0) {
$cats = mslib_fe::get_subcategory_ids($categoriesStartingPoint);
$cats[] = $categoriesStartingPoint;
if ($this->ms['MODULES']['FLAT_DATABASE']) {
$tbl = 'pf.';
} else {
$tbl = 'p2c.';
}
$filter[] = '(' . $tbl . 'categories_id IN (' . implode(",", $cats) . '))';
}
$limit_per_page = $this->ms['MODULES']['PRODUCTS_LISTING_LIMIT'];
$pageset = mslib_fe::getProductsPageSet($filter, $offset, $this->ms['MODULES']['PRODUCTS_LISTING_LIMIT'], $orderby, $having, $select, $where, 0, $from, array(), 'hot_products', 'p.products_id,COUNT(' . $tbl . 'products_id) as total_quantity');
$products = $pageset['products'];
if ($pageset['total_rows'] > 0) {
if (strstr($this->ms['MODULES']['PRODUCTS_LISTING_TYPE'], "..")) {
die('error in PRODUCTS_LISTING_TYPE value');
} else {
if (strstr($this->ms['MODULES']['PRODUCTS_LISTING_TYPE'], "/")) {
require $this->DOCUMENT_ROOT . $this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] . '.php';
} else {
if (!$this->ms['MODULES']['PRODUCTS_LISTING_TYPE']) {
$this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] = 'default';
}
require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/includes/products_listing/' . $this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] . '.php';
}
}
// pagination
示例2: elseif
$having[] = "final_price <='" . $price_filter . "'";
} elseif ($char == '>') {
$having[] = "final_price >='" . $price_filter . "'";
}
}
}
}
if ($this->ms['MODULES']['FLAT_DATABASE'] and count($having)) {
$filter[] = $having[0];
unset($having);
}
if (isset($this->get['stock_from']) && !empty($this->get['stock_from']) && isset($this->get['stock_till']) && !empty($this->get['stock_till'])) {
$prefix = 'p.';
$filter[] = "(" . $prefix . "products_quantity between " . $this->get['stock_from'] . " and " . $this->get['stock_till'] . ")";
}
$pageset = mslib_fe::getProductsPageSet($filter, $offset, $this->ms['MODULES']['PRODUCTS_LISTING_LIMIT'], $orderby, $having, $select, $where, 0, array(), array(), 'admin_products_search');
$products = $pageset['products'];
$product_tax_rate_js = array();
if ($pageset['total_rows'] > 0) {
$subpartArray = array();
$subpartArray['###FORM_ACTION_PRICE_UPDATE_URL###'] = mslib_fe::typolink($this->shop_pid . ',2003', '&tx_multishop_pi1[page_section]=admin_products_search_and_edit&' . mslib_fe::tep_get_all_get_params(array('tx_multishop_pi1[action]', 'p', 'Submit', 'weergave', 'clearcache')));
$query_string = mslib_fe::tep_get_all_get_params(array('tx_multishop_pi1[action]', 'tx_multishop_pi1[order_by]', 'tx_multishop_pi1[order]', 'p', 'Submit', 'weergave', 'clearcache'));
$key = 'products_name';
if ($this->get['tx_multishop_pi1']['order_by'] == $key) {
$final_order_link = $order_link;
} else {
$final_order_link = 'a';
}
$subpartArray['###FOOTER_SORTBY_PRODUCT_LINK###'] = mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=admin_products_search_and_edit&tx_multishop_pi1[order_by]=' . $key . '&tx_multishop_pi1[order]=' . $final_order_link . '&' . $query_string);
$subpartArray['###HEADER_SORTBY_PRODUCT_LINK###'] = mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=admin_products_search_and_edit&tx_multishop_pi1[order_by]=' . $key . '&tx_multishop_pi1[order]=' . $final_order_link . '&' . $query_string);
//
示例3: array_reverse
$cats = array_reverse($cats);
$where = '';
if (count($cats) > 0) {
foreach ($cats as $cat) {
$catsname[] = $cat['name'];
}
}
// get all cats to generate multilevel fake url eof
}
$return_data[$counter]['text'] = htmlentities(implode(" > ", $catsname) . ' > ' . $row['products_name']);
$return_data[$counter]['id'] = $row['products_id'];
$counter++;
}
}
} else {
$products = mslib_fe::getProductsPageSet($filter, 0, 100, array($prefix . 'products_name asc'));
$counter = 0;
foreach ($products['products'] as $product) {
if ($product['products_name'] && !empty($product['products_name'])) {
$catsname = array();
if ($product['categories_id']) {
// get all cats to generate multilevel fake url
$level = 0;
$cats = mslib_fe::Crumbar($product['categories_id']);
$cats = array_reverse($cats);
$where = '';
if (count($cats) > 0) {
foreach ($cats as $cat) {
$catsname[] = $cat['name'];
}
}
示例4: IN
$string .= " or ";
}
$string .= "categories_id_" . $i . " = '" . $parent_id . "'";
}
$string .= ')';
if ($string) {
$filter[] = $string;
}
} else {
$cats = mslib_fe::get_subcategory_ids($parent_id);
$cats[] = $parent_id;
$filter[] = "p2c.categories_id IN (" . implode(",", $cats) . ")";
}
}
//error_log(print_r($filter,1));
$pageset = mslib_fe::getProductsPageSet($filter, $offset, $limit, $orderby, $having, $select, $where, 0, array(), array(), 'admin_ajax_products_search');
$resultset['products'] = $pageset;
$max_page = ceil($pageset['total_rows'] / $limit);
if ($pageset['total_rows'] > $limit && $p + 1 < $max_page) {
$have_paging = true;
}
if ($pageset['total_rows'] > 0) {
$results_counter++;
}
}
$content = '';
$tmp_listing = '';
// product search eof
// now build up the listing
// admin cms
if (count($resultset['admin_cms']['admin_cms'])) {
示例5: array
}
} else {
$orderby[] = 'rand()';
}
// filter by products name eof
if ($this->ms['MODULES']['FLAT_DATABASE']) {
$orderby[] = 'final_price_difference desc';
} else {
$orderby[] = 'p.products_date_available desc';
}
if ($this->ajax_content) {
$limit = 4;
} else {
$limit = 25;
}
$pageset = mslib_fe::getProductsPageSet($filter, '', $this->limit, $orderby, $having, $select, $where, 0, array(), array(), 'products_specials');
$products = $pageset['products'];
$total = count($products);
if (!$pageset['total_rows']) {
$this->no_database_results = 1;
} else {
if (!$this->ms['MODULES']['SPECIALS_LISTING_TYPE']) {
$this->ms['MODULES']['SPECIALS_LISTING_TYPE'] = 'default';
}
if (strstr($this->ms['MODULES']['SPECIALS_LISTING_TYPE'], "..")) {
die('error in SPECIALS_LISTING_TYPE value');
} else {
if (strstr($this->ms['MODULES']['SPECIALS_LISTING_TYPE'], "/")) {
require $this->DOCUMENT_ROOT . $this->ms['MODULES']['SPECIALS_LISTING_TYPE'] . '.php';
} else {
require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/includes/specials_listing/' . $this->ms['MODULES']['SPECIALS_LISTING_TYPE'] . '.php';
示例6: array
break;
default:
// custom hook that can be controlled by third-party plugin
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/includes/ultrasearch_server.php']['ultrasearchOrderByFilter'])) {
$params = array('from' => &$from, 'where' => &$where, 'filter' => &$filter, 'orderby' => &$orderby, 'select' => &$select, 'extra_join' => &$extra_join);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/includes/ultrasearch_server.php']['ultrasearchOrderByFilter'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
break;
}
}
//error_log(print_r($filter, 1));
// GET PRODUCTS FOR LISTING
//$this->msDebug=1;
$pageset = mslib_fe::getProductsPageSet($filter, $offset, $limit, $orderby, $having, $select, $where, 0, $from, array(), 'ajax_products_search', $select_total_count, 0, 1, $extra_join);
//error_log($this->msDebugInfo);
//echo $this->msDebugInfo;
//die();
// error_log($pageset['total_rows']);
// error_log($this->ms['MODULES']['PRODUCTS_LISTING_LIMIT']);
if ($pageset['total_rows'] > 0) {
$products = $pageset['products'];
if (count($products)) {
if ($this->post['tx_multishop_pi1']['q']) {
mslib_befe::storeProductsKeywordSearch($this->post['tx_multishop_pi1']['q']);
}
$totpage = ceil($pageset['total_rows'] / $limit);
foreach ($products as $index => $product) {
if ($product['categories_id']) {
// get all cats to generate multilevel fake url
示例7: array
case 'manufacturers_asc':
$orderby[] = $tbl_m . "manufacturers_name asc";
break;
case 'manufacturers_desc':
$orderby[] = $tbl_m . "manufacturers_name desc";
break;
}
}
if ($this->ms['MODULES']['FLAT_DATABASE']) {
$tbl = 'pf.';
} else {
$tbl = 'p.';
}
$filter[] = $tbl . "manufacturers_id='" . $this->get['manufacturers_id'] . "'";
//$this->msDebug=1;
$pageset = mslib_fe::getProductsPageSet($filter, $offset, $limit_per_page, $orderby, $having, $select, $where, 0, array(), array(), 'manufacturers_products', '', 0, 1, $extra_join);
//echo $this->msDebugInfo;
$products = $pageset['products'];
if ($pageset['total_rows'] > 0) {
if (strstr($this->ms['MODULES']['PRODUCTS_LISTING_TYPE'], "..")) {
die('error in PRODUCTS_LISTING_TYPE value');
} else {
if (!$this->ms['MODULES']['PRODUCTS_LISTING_TYPE']) {
$this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] = 'default';
}
if (strstr($this->ms['MODULES']['PRODUCTS_LISTING_TYPE'], "/")) {
require $this->DOCUMENT_ROOT . $this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] . '.php';
} else {
require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/includes/products_listing/' . $this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] . '.php';
}
}
示例8: array
case 'new_asc':
$orderby[] = $tbl . "products_date_added desc";
break;
case 'new_desc':
$orderby[] = $tbl . "products_date_added asc";
break;
case 'manufacturers_asc':
$orderby[] = $tbl_m . "manufacturers_name asc";
break;
case 'manufacturers_desc':
$orderby[] = $tbl_m . "manufacturers_name desc";
break;
}
}
//$this->msDebug=true;
$pageset = mslib_fe::getProductsPageSet($filter, $offset, $limit_per_page, $orderby, array(), $select, $where, 0, $extra_from, array(), 'products_listing', '', 0, 1, $extra_join);
//echo $this->msDebugInfo;
//die();
$products = $pageset['products'];
// load products listing
$products_compare = true;
if (!count($products)) {
if ($current['content'] and !$p) {
$hide_no_products_message = 1;
if ($current['content']) {
$content .= mslib_fe::htmlBox($current['categories_name'], $current['content'], 1);
} else {
$show_default_header = 1;
}
}
if (!$hide_no_products_message) {
示例9: getProductRelativesBox
//.........这里部分代码省略.........
$prefix = 'p.';
} else {
$prefix = '';
}
$filter[] = $prefix . "products_id IN (" . implode(',', $product_ids) . ")";
break;
case 'categories_id':
if ($this->ms['MODULES']['FLAT_DATABASE']) {
$filter[] = 'pf.categories_id=' . $product['categories_id'];
} else {
$filter[] = 'c.categories_id=' . $product['categories_id'];
}
break;
case 'specials':
if ($this->ms['MODULES']['FLAT_DATABASE']) {
$filter[] = 'pf.sstatus=1';
} else {
$filter[] = 's.status=1';
}
break;
case 'products_model':
if (strlen($product['products_model']) > 2) {
$array = explode(" ", $product['products_model']);
$total = count($array);
$oldsearch = 0;
foreach ($array as $item) {
if (strlen($item) < 2) {
$oldsearch = 1;
break;
}
}
if ($this->ms['MODULES']['FLAT_DATABASE']) {
$tbl = 'pf.';
} else {
$tbl = 'p.';
}
if ($oldsearch) {
// do normal indexed search
$filter[] = "(" . $tbl . "products_model like '" . addslashes($product['products_model']) . "%')";
} else {
// do fulltext search
$tmpstr = addslashes(mslib_befe::ms_implode(', ', $array, '"', '+', true));
$select[] = "MATCH (" . $tbl . "products_model) AGAINST ('" . $tmpstr . "' in boolean mode) AS score";
$where[] = "MATCH (" . $tbl . "products_model) AGAINST ('" . $tmpstr . "' in boolean mode)";
$orderby[] = 'score desc';
}
}
break;
}
if (is_numeric($this->get['manufacturers_id'])) {
if ($this->ms['MODULES']['FLAT_DATABASE']) {
$tbl = 'pf.';
} else {
$tbl = 'p.';
}
$filter[] = "(" . $tbl . "manufacturers_id='" . addslashes($this->get['manufacturers_id']) . "')";
}
if ($this->ms['MODULES']['FLAT_DATABASE']) {
$tbl = 'pf.';
if ($this->ms['MODULES']['FLAT_DATABASE_ORDER_PRODUCTS_BY_SORT_ORDER']) {
$orderby[] = 'pf.sort_order';
}
} else {
$tbl = 'p.';
}
$filter[] = "(" . $tbl . "products_id <> '" . $product['products_id'] . "')";
if ($this->ms['MODULES']['FLAT_DATABASE'] and count($having)) {
$filter[] = $having[0];
unset($having);
}
$offset = 0;
// custom hook that can be controlled by third-party plugin
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/front_pages/products_relatives.php']['productsRelativesQueryPreHook'])) {
$params = array('filter' => &$filter, 'offset' => &$offset, 'limit' => &$limit, 'orderby' => &$orderby, 'having' => &$having, 'select' => &$select, 'where' => &$where);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/front_pages/products_relatives.php']['productsRelativesQueryPreHook'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
// custom hook that can be controlled by third-party plugin eof
$pageset = mslib_fe::getProductsPageSet($filter, $offset, $limit, $orderby, $having, $select, $where, 0, array(), array(), 'products_relatives');
$products = $pageset['products'];
if ($pageset['total_rows'] > 0) {
$content = '';
if ($pageset['total_rows']) {
if (!$this->ms['MODULES']['PRODUCTS_RELATIVES_TYPE']) {
$this->ms['MODULES']['PRODUCTS_RELATIVES_TYPE'] = 'default';
}
if (strstr($this->ms['MODULES']['PRODUCTS_RELATIVES_TYPE'], "..")) {
die('error in PRODUCTS_RELATIVES_TYPE value');
} else {
if (strstr($this->ms['MODULES']['PRODUCTS_RELATIVES_TYPE'], "/")) {
require $this->DOCUMENT_ROOT . $this->ms['MODULES']['PRODUCTS_RELATIVES_TYPE'] . '.php';
} else {
require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/includes/products_relatives/' . $this->ms['MODULES']['PRODUCTS_RELATIVES_TYPE'] . '.php';
}
}
}
}
return $content;
}
示例10: IN
$categoriesStartingPoint = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'categoriesStartingPoint', 's_advanced');
if (!$categoriesStartingPoint and is_numeric($this->conf['categoriesStartingPoint'])) {
$categoriesStartingPoint = $this->conf['categoriesStartingPoint'];
}
if ($categoriesStartingPoint > 0) {
$cats = mslib_fe::get_subcategory_ids($categoriesStartingPoint);
$cats[] = $categoriesStartingPoint;
if ($this->ms['MODULES']['FLAT_DATABASE']) {
$tbl = 'pf.';
} else {
$tbl = 'p2c.';
}
$filter[] = '(' . $tbl . 'categories_id IN (' . implode(",", $cats) . '))';
}
//$limit_per_page=$this->ms['MODULES']['PRODUCTS_LISTING_LIMIT'];
$pageset = mslib_fe::getProductsPageSet($filter, $offset, $limit_per_page, $orderby, $having, $select, $where, 0, array(), array(), 'new_products');
$products = $pageset['products'];
$products_compare = false;
if ($pageset['total_rows'] > 0) {
if (strstr($this->ms['MODULES']['PRODUCTS_LISTING_TYPE'], "..")) {
die('error in PRODUCTS_LISTING_TYPE value');
} else {
if (strstr($this->ms['MODULES']['PRODUCTS_LISTING_TYPE'], "/")) {
require $this->DOCUMENT_ROOT . $this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] . '.php';
} else {
if (!$this->ms['MODULES']['PRODUCTS_LISTING_TYPE']) {
$this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] = 'default';
}
require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/includes/products_listing/' . $this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] . '.php';
}
}
示例11: array
$where = array();
$orderby = array();
$select = array();
if ($this->ms['MODULES']['FLAT_DATABASE']) {
$tbl = 'pf.';
} else {
$tbl = 'p.';
}
if (is_array($rand_keys) and count($rand_keys)) {
$filter[] = $tbl . 'products_id IN (' . implode(",", $rand_keys) . ')';
if (is_numeric($this->get['products_id'])) {
$filter[] = $tbl . 'products_id NOT IN (' . $this->get['products_id'] . ')';
}
}
$limit_per_page = $this->ms['MODULES']['PRODUCTS_LISTING_LIMIT'];
$pageset = mslib_fe::getProductsPageSet($filter, $offset, $this->ms['MODULES']['PRODUCTS_LISTING_LIMIT'], $orderby, $having, $select, $where);
$products = $pageset['products'];
$no_content = false;
if ($pageset['total_rows'] > 0) {
// disable the order by and results limit dropdown
$this->ms['MODULES']['PRODUCTS_LISTING_DISPLAY_PAGINATION_FORM'] = 0;
$this->ms['MODULES']['PRODUCTS_LISTING_DISPLAY_ORDERBY_FORM'] = 0;
if (strstr($this->ms['MODULES']['PRODUCTS_LISTING_TYPE'], "..")) {
die('error in PRODUCTS_LISTING_TYPE value');
} else {
if (strstr($this->ms['MODULES']['PRODUCTS_LISTING_TYPE'], "/")) {
require $this->DOCUMENT_ROOT . $this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] . '.php';
} else {
if (!$this->ms['MODULES']['PRODUCTS_LISTING_TYPE']) {
$this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] = 'default';
}
示例12: EXISTS
/*
if (!$this->ms['MODULES']['FLAT_DATABASE']) {
$filter[]='NOT EXISTS (SELECT subp.products_id from tx_multishop_products subp, tx_multishop_catalog_to_feeds subctf, tx_multishop_products_to_categories subp2c where subp2c.categories_id=c.categories_id and subp2c.node_id=subctf.exclude_id and subctf.exclude_type=\'categories\' and subctf.feed_id=\''.$feed['id'].'\' and subctf.negate=1 order by subp2c.crumbar_identifier asc)';
}
*/
//echo print_r($filter);
//die();
//$this->conf['debugEnabled']=1;
//hook to let other plugins further manipulate the settings
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/download_product_feed.php']['productFeedQueryPreProc'])) {
$params = array('post_data' => &$post_data, 'filter' => &$filter, 'offset' => &$offset, 'orderby' => &$orderby, 'having' => &$having, 'select' => &$select, 'where' => &$where, 'fields' => &$fields, 'row' => &$row, 'fetchExtraDataFromProducts' => &$fetchExtraDataFromProducts);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/download_product_feed.php']['productFeedQueryPreProc'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
$pageset = mslib_fe::getProductsPageSet($filter, $offset, 99999, $orderby, $having, $select, $where, 0, array(), array(), 'products_feeds', '', 0, 1, array(), $includeDisabled);
$products = $pageset['products'];
if ($pageset['total_rows'] > 0) {
foreach ($pageset['products'] as $row) {
$fetchExtraDataFromProducts = 1;
//hook to let other plugins further manipulate the settings
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/download_product_feed.php']['productFeedIteratorPreProc'])) {
$params = array('fields' => &$fields, 'row' => &$row, 'fetchExtraDataFromProducts' => &$fetchExtraDataFromProducts);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/download_product_feed.php']['productFeedIteratorPreProc'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
if (!$fetchExtraDataFromProducts) {
$records[] = $row;
} else {
$product = mslib_fe::getProduct($row['products_id'], '', '', $includeDisabled);