zencart:管理画面ステータスオフ非表示
Posted on 日曜日, 12 月 20th, 2009 at 3:39 PMzencartにて
複数の管理者がいる為、トラブル防止・・・ステータスオフの場合→非表示。
ただ非表示にしているだけのため 行数が詰められてない^^;
/admin/includes/modules/category_product_listing.php
132
/////status
if (($categories->fields['categories_status'] == '1') or ($products->fields['products_status'] == '1') ){
if (isset($cInfo) && is_object($cInfo) && ($categories->fields['categories_id'] == $cInfo->categories_id) ) {
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CATEGORIES, zen_get_path($categories->fields['categories_id'])) . '\'">' . "\n";
} else {
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CATEGORIES, zen_get_path($categories->fields['categories_id'])) . '\'">' . "\n";
}
/////status
}
149
<?php if ($action == '') { ?>
<?php if (($categories->fields['categories_status'] == '1') or ($products->fields['products_status'] == '1') ){ //?>
<td class="dataTableContent" width="20" align="right"><?php echo $categories->fields['categories_id']; ?></td>
<td class="dataTableContent"><?php echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, zen_get_path($categories->fields['categories_id'])) . '">' . zen_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a> <b>' . $categories->fields['categories_name'] . '</b>'; ?></td>
<td class="dataTableContent" align="center"> </td>
<td class="dataTableContent" align="right"> <?php echo zen_get_products_sale_discount('', $categories->fields['categories_id'], true); ?></td>
<td class="dataTableContent" align="center"> </td>
<td class="dataTableContent" align="right" valign="bottom">
<?php
if (SHOW_COUNTS_ADMIN == 'false') {
// don't show counts
} else {
// show counts
$total_products = zen_get_products_to_categories($categories->fields['categories_id'], true);
$total_products_on = zen_get_products_to_categories($categories->fields['categories_id'], false);
echo $total_products_on . TEXT_PRODUCTS_STATUS_ON_OF . $total_products . TEXT_PRODUCTS_STATUS_ACTIVE;
}
?>
</td>
----
210
// eof: categories meta tags
?>
</td>
<?php } // status //?>
<?php } // action == '' ?>
</tr>
------
302
///status
if (($categories->fields['categories_status'] == '1') or ($products->fields['products_status'] == '1') ){
// Split Page
$type_handler = $zc_products->get_admin_handler($products->fields['products_type']);
if (isset($pInfo) && is_object($pInfo) && ($products->fields['products_id'] == $pInfo->products_id) ) {
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link($type_handler , 'page=' . $_GET['page'] . '&product_type=' . $products->fields['products_type'] . '&cPath=' . $cPath . '&pID=' . $products->fields['products_id'] . '&action=new_product') . '\'">' . "\n";
} else {
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link($type_handler , 'page=' . $_GET['page'] . '&product_type=' . $products->fields['products_type'] . '&cPath=' . $cPath . '&pID=' . $products->fields['products_id'] . '&action=new_product') . '\'">' . "\n";
}
// Split Page
}
?>
----
343
// Split Page
?>
<?php if ($products->fields['products_status'] == '1') { //?>
<td class="dataTableContent" width="20" align="right"><?php echo $products->fields['products_id']; ?></td>
<td class="dataTableContent"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT, 'cPath=' . $cPath . '&pID=' . $products->fields['products_id'] . '&action=new_product_preview&read=only' . '&product_type=' . $products->fields['products_type'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products->fields['products_name']; ?></td>
<td class="dataTableContent"><?php echo $products->fields['products_model']; ?></td>
<td colspan="2" class="dataTableContent" align="right"><?php echo zen_get_products_display_price($products->fields['products_id']); ?></td>
<td class="dataTableContent" align="right"><?php echo $products->fields['products_quantity']; ?></td>
<td class="dataTableContent" width="50" align="left">
----
420
?>
<?php } // status //?>
<?php } // action == '' ?>
</td>
</tr>
-----
444
<?php if ($action == '') { ?>
<?php if ($products->fields['products_status'] == '1') { ////?>
<tr>
<td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="smallText"><?php echo TEXT_CATEGORIES . ' ' . $categories_count . '<br />' . TEXT_PRODUCTS . ' ' . $products_count; ?></td>
<td align="right" class="smallText"><?php if (sizeof($cPath_array) > 0) echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, $cPath_back . 'cID=' . $current_category_id) . '">' . zen_image_button('button_back.gif', IMAGE_BACK) . '</a> '; if (!isset($_GET['search'])) echo (!$zc_skip_categories ? '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_category') . '">' . zen_image_button('button_new_category.gif', IMAGE_NEW_CATEGORY) . '</a> ' : ''); ?>
-------
488
<?php } // hide has cats?>
</td>
</tr>
</table></td>
</tr>
<?php } // turn off when editing ?>
<?php } // status ?>
</table></td>
---
とかでいいかな
関連記事
Leave a reply