$heading[] = array('text' => '<b>' . $product_to_copy->fields['products_id'] . ' ' . $product_to_copy->fields['products_name'] . '</b>'); if ($products_filter > 0) { $contents[] = array('text' => zen_image(DIR_WS_CATALOG_IMAGES . $product_to_copy->fields['products_image'], $product_to_copy->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)); } $contents[] = array('text' => '<br />' . TEXT_PRODUCTS_NAME . $product_to_copy->fields['products_name']); $contents[] = array('text' => TEXT_PRODUCTS_MODEL . $product_to_copy->fields['products_model']); $contents[] = array('text' => TEXT_PRODUCTS_PRICE . zen_get_products_display_price($products_filter)); switch (true) { case $product_to_copy->fields['master_categories_id'] == 0 and $products_filter > 0: $contents[] = array('text' => '<br /><span class="alert">' . WARNING_MASTER_CATEGORIES_ID . '</span><br /> '); break; default: $contents[] = array('text' => '<form action="' . FILENAME_PRODUCTS_TO_CATEGORIES . '.php' . '?action=edit&products_filter=' . $products_filter . '¤t_category_id=' . $current_category_id . '" method="post">'); $contents[] = array('align' => 'center', 'text' => '<input type="submit" value="' . BUTTON_NEW_PRODUCTS_TO_CATEGORIES . '"></form>'); $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '3') . '<br /> '); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'products_filter=' . $products_filter) . '">' . zen_image_button('button_edit_attribs.gif', IMAGE_EDIT_ATTRIBUTES) . '</a> ' . '<a href="' . zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, '&products_filter=' . $products_filter) . '">' . zen_image_button('button_products_price_manager.gif', IMAGE_PRODUCTS_PRICE_MANAGER) . '</a><br /><br />' . '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . zen_get_parent_category_id($products_filter) . '&pID=' . $products_filter . '&product_type=' . zen_get_products_type($products_filter)) . '">' . zen_image_button('button_details.gif', IMAGE_DETAILS) . '</a> ' . '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=new_product' . '&cPath=' . zen_get_parent_category_id($products_filter) . '&pID=' . $products_filter . '&product_type=' . zen_get_products_type($products_filter)) . '">' . zen_image_button('button_edit_product.gif', IMAGE_EDIT_PRODUCT) . '</a>' . '<br /> '); break; } break; } if (zen_not_null($heading) && zen_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </td></table> </tr>
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: sidebox_delete_product.php 3358 2006-04-03 04:33:32Z ajeh $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_PRODUCT . '</b>'); $contents = array('form' => zen_draw_form('products', $type_admin_handler, 'action=delete_product_confirm&product_type=' . $product_type . '&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . zen_draw_hidden_field('products_id', $pInfo->products_id)); $contents[] = array('text' => TEXT_DELETE_PRODUCT_INTRO); $contents[] = array('text' => '<br /><b>' . $pInfo->products_name . ' ID#' . $pInfo->products_id . '</b>'); // zen_get_category_name(zen_get_parent_category_id($pInfo->products_id), (int)$_SESSION['languages_id']) $product_categories_string = ''; $product_categories = zen_generate_category_path($pInfo->products_id, 'product'); if (sizeof($product_categories) > 1) { $contents[] = array('text' => '<br /><b><span class="alert">' . TEXT_MASTER_CATEGORIES_ID . '</span>' . '</b>'); } for ($i = 0, $n = sizeof($product_categories); $i < $n; $i++) { $category_path = ''; for ($j = 0, $k = sizeof($product_categories[$i]); $j < $k; $j++) { $category_path .= $product_categories[$i][$j]['text'] . ' > '; } $category_path = substr($category_path, 0, -16); if (sizeof($product_categories) > 1 && zen_get_parent_category_id($pInfo->products_id) == $product_categories[$i][sizeof($product_categories[$i]) - 1]['id']) { $product_categories_string .= '<strong><span class="alert">' . zen_draw_checkbox_field('product_categories[]', $product_categories[$i][sizeof($product_categories[$i]) - 1]['id'], true) . ' ' . $category_path . '</strong></span><br />'; } else { $product_categories_string .= zen_draw_checkbox_field('product_categories[]', $product_categories[$i][sizeof($product_categories[$i]) - 1]['id'], true) . ' ' . $category_path . '<br />'; } } $product_categories_string = substr($product_categories_string, 0, -4); $contents[] = array('text' => '<br />' . $product_categories_string); $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');