oscommerce アドミンエリア 商品一覧 表示制限

|

★SQL実行

INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'', 'max products per page admin-side', 'MAX_PROD_ADMIN_SIDE', '30', 'Maximum numba of products per page in administration panel', '3', NULL , '2003-11-10 14:54:12', '2003-11-10 14:54:12', NULL , NULL
);

-----------------------------------
admin/categories.phpカスタマイズ


★781行目に挿入

<?php
    $categories_count = 0;


<?php
 #QUERY TO KNOW THE MAX_PROD_ADMIN_SIDE
 $max_prod_admin_side_q=tep_db_query("select configuration_value FROM configuration WHERE configuration_key='MAX_PROD_ADMIN_SIDE'");
 $max_prod_admin_side=(tep_db_fetch_array($max_prod_admin_side_q));
 #
 $lmt=$max_prod_admin_side['configuration_value'];
 #
    $categories_count = 0;


★818行目

    $products_count = 0;
    if ($HTTP_GET_VARS['search']) {


    $products_count = 0;
 if (! $limite_1){
 $limite_1=0;
 }
 if (! $limite_2){
 $limite_2=$lmt;
 }
    if ($HTTP_GET_VARS['search']) {


★824行目

    } else {
      $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . $current_category_id . "' order by pd.products_name");
    }


    } else {
 if (! $limite_1 & ! $limite_2)
  {
  $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . $current_category_id . "' order by pd.products_name");
     }
  else
  {
    $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . $current_category_id . "' order by pd.products_name LIMIT $limite_1, $limite_2 ");
     }
    }

 

★874行目

              <tr>
                <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>


              <tr>
                <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr><td colspan="3" class="smallText">
    <?
    if ( $cPath){
    $num_prod=tep_db_query("SELECT * from products_to_categories where categories_id=$cPath");
    $np=mysql_num_rows($num_prod);
    echo "<b><font=1>NUMERO TOTALE DI ARTICOLI PER QUESTA CATEGORIA</font></b>\n".$np;
    }
    ?></td>
    </tr>
    <tr>
    <td colspan="3" class="smallText">
    <?
    if ( $cPath){
    $records_per_page=$lmt;
    $page_num=round(($np/$records_per_page),0);
    echo "go to page: ";
    $lim_1=0;
    $lim_2=$lmt;
    for ($i=0; $i <= $page_num; $i++)
    {
    $a=$i+1;
    echo "<a href=categories.php?cPath=$cPath&limite_1=$lim_1&limite_2=$lim_2>".$a."</a>|";
    $lim_1=$lim_1+$lim_2;
    }
    }
    ?>
    
    </td>
    </tr>
                  <tr>

---------------------------------------------

 

カテゴリ

このブログ記事について

このページは、adminが2008年5月19日 22:37に書いたブログ記事です。

ひとつ前のブログ記事は「離床センサー作成」です。

次のブログ記事は「form 文字化け utf-8 IE accept-charset」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。