Example #1
0
 public static function getAll()
 {
     global $_module;
     $result = lC_Products::getAll($_GET[$_module]);
     $result['rpcStatus'] = RPC_STATUS_SUCCESS;
     echo json_encode($result);
 }
Example #2
0
 public static function newArrivalsListing()
 {
     global $lC_Vqmod;
     include_once $lC_Vqmod->modCheck('includes/classes/products.php');
     $lC_Products = new lC_Products();
     $Qlisting = $lC_Products->execute();
     $cnt = 0;
     $listing = '';
     while ($Qlisting->next()) {
         $lC_Product = new lC_Product($Qlisting->valueInt('products_id'));
         $listing .= '<li>' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()), substr($lC_Product->getTitle(), 0, 20)) . '</li>';
         $cnt++;
         if ($cnt == 5) {
             break;
         }
     }
     return $listing;
 }
Example #3
0
 protected function _process()
 {
     global $lC_Manufacturer, $lC_Products;
     include 'includes/classes/products.php';
     $lC_Products = new lC_Products();
     $lC_Products->setManufacturer($lC_Manufacturer->getID());
     if (isset($_GET['filter']) && is_numeric($_GET['filter']) && $_GET['filter'] > 0) {
         $lC_Products->setCategory($_GET['filter']);
     }
     if (isset($_GET['sort']) && !empty($_GET['sort'])) {
         if (strpos($_GET['sort'], '|d') !== false) {
             $lC_Products->setSortBy(substr($_GET['sort'], 0, -2), '-');
         } else {
             $lC_Products->setSortBy($_GET['sort']);
         }
     } else {
         if (defined('PRODUCT_LISTING_DISPLAY_ORDER') && PRODUCT_LISTING_DISPLAY_ORDER != null) {
             $lC_Products->setSortBy(PRODUCT_LISTING_DISPLAY_ORDER);
         }
     }
 }
Example #4
0
 protected function _process()
 {
     global $current_category_id, $lC_Products;
     include 'includes/classes/products.php';
     $lC_Products = new lC_Products($current_category_id);
     if (isset($_GET['filter']) && is_numeric($_GET['filter']) && $_GET['filter'] > 0) {
         $lC_Products->setManufacturer($_GET['filter']);
     }
     if (isset($_GET['sort']) && !empty($_GET['sort'])) {
         if (strpos($_GET['sort'], '|d') !== false) {
             $lC_Products->setSortBy(substr($_GET['sort'], 0, -2), '-');
         } else {
             $lC_Products->setSortBy($_GET['sort']);
         }
     } else {
         if (defined('PRODUCT_LISTING_DISPLAY_ORDER') && PRODUCT_LISTING_DISPLAY_ORDER != null) {
             $lC_Products->setSortBy(strtolower(str_replace(' ', '_', PRODUCT_LISTING_DISPLAY_ORDER)));
         }
     }
 }
Example #5
0
  <h1 class="page-title"><?php 
echo $lC_Template->getPageTitle();
?>
</h1>
  
  <div id="content-product-listing-category-description-container">
    <?php 
if (lC_Template_output::getCategoryDescription() != '') {
    echo '<div id="content-product-listing-category-description">' . lC_Template_output::getCategoryDescription() . '</div>';
}
?>
  </div>
  
  <div class="content-product-listing-container">
    <?php 
$lC_Products = new lC_Products();
$lC_Products->setSortBy('date_added', '-');
$Qlisting = $lC_Products->execute(NEW_PRODUCTS_PER_PAGE_DISPLAY);
if (PRODUCT_LIST_FILTER == '1') {
    echo lC_Template_output::getManufacturerFilter();
}
if ($Qlisting->numberOfRows() > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) {
    ?>
      <!-- PAGINATION-->
      <div class="product-listing-module-pagination margin-bottom">
        <div class="pull-left large-margin-bottom page-results"><?php 
    echo $Qlisting->getBatchTotalPages($lC_Language->get('result_set_number_of_products'));
    ?>
</div>
        <div class="pull-right large-margin-bottom no-margin-top">
          <ul class="pagination">