Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Webbies

Pioneers
  • Posts

    26
  • Joined

  • Last visited

Profile Information

Webbies's Achievements

  1. tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$dup_products_id . "', '" . (int)$categories_id . "')"); $products_id = $dup_products_id; } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id . '&pID=' . $products_id)); break; case 'new_product_preview': // copy image only if modified // BOF astro - update database with new images $products_image = new upload('products_image'); $products_image_2 = new upload('products_image_2'); $products_image_3 = new upload('products_image_3'); $products_image_4 = new upload('products_image_4'); $products_image_5 = new upload('products_image_5'); $products_image_6 = new upload('products_image_6'); $products_image->set_destination(DIR_FS_CATALOG_IMAGES); $products_image_2->set_destination(DIR_FS_CATALOG_IMAGES); $products_image_3->set_destination(DIR_FS_CATALOG_IMAGES); $products_image_4->set_destination(DIR_FS_CATALOG_IMAGES); $products_image_5->set_destination(DIR_FS_CATALOG_IMAGES); $products_image_6->set_destination(DIR_FS_CATALOG_IMAGES); if ($products_image->parse() && $products_image->save()) { $products_image_name = $products_image->filename; } else { $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : ''); } if ($products_image_2->parse() && $products_image_2->save()) { $products_image_2_name = $products_image_2->filename; } else { $products_image_2_name = (isset($HTTP_POST_VARS['products_previous_image_2']) ? $HTTP_POST_VARS['products_previous_image_2'] : ''); } if ($products_image_3->parse() && $products_image_3->save()) { $products_image_3_name = $products_image_3->filename; } else { $products_image_3_name = (isset($HTTP_POST_VARS['products_previous_image_3']) ? $HTTP_POST_VARS['products_previous_image_3'] : ''); } if ($products_image_4->parse() && $products_image_4->save()) { $products_image_4_name = $products_image_4->filename; } else { $products_image_4_name = (isset($HTTP_POST_VARS['products_previous_image_4']) ? $HTTP_POST_VARS['products_previous_image_4'] : ''); } if ($products_image_5->parse() && $products_image_5->save()) { $products_image_5_name = $products_image_5->filename; } else { $products_image_5_name = (isset($HTTP_POST_VARS['products_previous_image_5']) ? $HTTP_POST_VARS['products_previous_image_5'] : ''); } if ($products_image_6->parse() && $products_image_6->save()) { $products_image_6_name = $products_image_6->filename; } else { $products_image_6_name = (isset($HTTP_POST_VARS['products_previous_image_6']) ? $HTTP_POST_VARS['products_previous_image_6'] : ''); } // EOF astro - update database with new images break; } } // check if the catalog image directory exists if (is_dir(DIR_FS_CATALOG_IMAGES)) { if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error'); } else { $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error'); } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="SetFocus();"> <div id="spiffycalendar" class="text"></div> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"> <?php if ($action == 'new_product') { $parameters = array('products_name' => '', 'products_description' => '', 'products_url' => '', 'products_id' => '', 'products_quantity' => '', 'products_model' => '', 'products_image' => '', // BOF astro - update database with new images 'products_image_2' => '', 'products_image_3' => '', 'products_image_4' => '', 'products_image_5' => '', 'products_image_6' => '', // EOF astro - update database with new images 'products_price' => '', 'products_weight' => '', 'products_date_added' => '', 'products_last_modified' => '', 'products_date_available' => '', 'products_status' => '', 'products_tax_class_id' => '', 'manufacturers_id' => ''); $pInfo = new objectInfo($parameters); if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) { // BOF astro - update database with new images $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.product_image_2, p.product_image_3, p.product_image_4, p.product_image_5, p.product_image_6, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); // EOF astro - update database with new images $product = tep_db_fetch_array($product_query); $pInfo->objectInfo($product); } elseif (tep_not_null($HTTP_POST_VARS)) { $pInfo->objectInfo($HTTP_POST_VARS); $products_name = $HTTP_POST_VARS['products_name']; $products_description = $HTTP_POST_VARS['products_description']; $products_url = $HTTP_POST_VARS['products_url']; } $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE)); $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']); } $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE)); $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title"); while ($tax_class = tep_db_fetch_array($tax_class_query)) { $tax_class_array[] = array('id' => $tax_class['tax_class_id'], 'text' => $tax_class['tax_class_title']); } $languages = tep_get_languages(); if (!isset($pInfo->products_status)) $pInfo->products_status = '1'; switch ($pInfo->products_status) { case '0': $in_status = false; $out_status = true; break; case '1': default: $in_status = true; $out_status = false; } ?> <link rel="stylesheet" type="text/css" href="includes/javascript/spiffyCal/spiffyCal_v2_1.css"> <script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script> <script language="javascript"><!-- var dateAvailable = new ctlSpiffyCalendarBox("dateAvailable", "new_product", "products_date_available","btnDate1","<?php echo $pInfo->products_date_available; ?>",scBTNMODE_CUSTOMBLUE); //--></script> <script language="javascript"><!-- var tax_rates = new Array(); <?php for ($i=0, $n=sizeof($tax_class_array); $i<$n; $i++) { if ($tax_class_array[$i]['id'] > 0) { echo 'tax_rates["' . $tax_class_array[$i]['id'] . '"] = ' . tep_get_tax_rate_value($tax_class_array[$i]['id']) . ';' . "\n"; } } ?> function doRound(x, places) { return Math.round(x * Math.pow(10, places)) / Math.pow(10, places); } function getTaxRate() { var selected_value = document.forms["new_product"].products_tax_class_id.selectedIndex; var parameterVal = document.forms["new_product"].products_tax_class_id[selected_value].value; if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) { return tax_rates[parameterVal]; } else { return 0; } } function updateGross() { var taxRate = getTaxRate(); var grossValue = document.forms["new_product"].products_price.value; if (taxRate > 0) { grossValue = grossValue * ((taxRate / 100) + 1); } document.forms["new_product"].products_price_gross.value = doRound(grossValue, 4); } function updateNet() { var taxRate = getTaxRate(); var netValue = document.forms["new_product"].products_price_gross.value; if (taxRate > 0) { netValue = netValue / ((taxRate / 100) + 1); } document.forms["new_product"].products_price.value = doRound(netValue, 4); } //--></script> <?php echo tep_draw_form('new_product', FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=new_product_preview', 'post', 'enctype="multipart/form-data"'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo sprintf(TEXT_NEW_PRODUCT, tep_output_generated_category_path($current_category_id)); ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo TEXT_PRODUCTS_STATUS; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_radio_field('products_status', '1', $in_status) . ' ' . TEXT_PRODUCT_AVAILABLE . ' ' . tep_draw_radio_field('products_status', '0', $out_status) . ' ' . TEXT_PRODUCT_NOT_AVAILABLE; ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?><br><small>(YYYY-MM-DD)</small></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' '; ?><script language="javascript">dateAvailable.writeControl(); dateAvailable.dateFormat="yyyy-MM-dd";</script></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_MANUFACTURER; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?> <tr> <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td> <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td> </tr> <?php } ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id, 'onchange="updateGross()"'); ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <script language="javascript"><!-- updateGross(); //--></script> <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?> <tr> <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td> <td><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td> <td class="main"><?php echo tep_draw_fckeditor('products_description[' . $languages[$i]['id'] . ']','600','300',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> </tr> </table></td> </tr> <?php } ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_QUANTITY; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_quantity', $pInfo->products_quantity); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_MODEL; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_model', $pInfo->products_model); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td> </tr> <?php // BOF astro - update database with new images?> <tr> <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image_2') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->product_image_2 . tep_draw_hidden_field('products_previous_image_2', $pInfo->product_image_2); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image_3') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->product_image_3 . tep_draw_hidden_field('products_previous_image_3', $pInfo->product_image_3); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image_4') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->product_image_4 . tep_draw_hidden_field('products_previous_image_4', $pInfo->product_image_4); ?></td> </tr><tr> <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image_5') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->product_image_5 . tep_draw_hidden_field('products_previous_image_5', $pInfo->product_image_5); ?></td> </tr><tr> <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image_6') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->product_image_6 . tep_draw_hidden_field('products_previous_image_6', $pInfo->product_image_6); ?></td> </tr> <?php // EOF astro - update database with new images ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?> <tr> <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_URL . '<br><small>' . TEXT_PRODUCTS_URL_WITHOUT_HTTP . '</small>'; ?></td> <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('products_url[' . $languages[$i]['id'] . ']', (isset($products_url[$languages[$i]['id']]) ? stripslashes($products_url[$languages[$i]['id']]) : tep_get_products_url($pInfo->products_id, $languages[$i]['id']))); ?></td> </tr> <?php } ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_weight', $pInfo->products_weight); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main" align="right"><?php echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </tr> </table></form> <?php } elseif ($action == 'new_product_preview') { if (tep_not_null($HTTP_POST_VARS)) { $pInfo = new objectInfo($HTTP_POST_VARS); $products_name = $HTTP_POST_VARS['products_name']; $products_description = $HTTP_POST_VARS['products_description']; $products_url = $HTTP_POST_VARS['products_url']; } else { $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'"); $product = tep_db_fetch_array($product_query); $pInfo = new objectInfo($product); $products_image_name = $pInfo->products_image; } $form_action = (isset($HTTP_GET_VARS['pID'])) ? 'update_product' : 'insert_product'; echo tep_draw_form($form_action, FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"'); $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) { $pInfo->products_name = tep_get_products_name($pInfo->products_id, $languages[$i]['id']); $pInfo->products_description = tep_get_products_description($pInfo->products_id, $languages[$i]['id']); $pInfo->products_url = tep_get_products_url($pInfo->products_id, $languages[$i]['id']); } else { $pInfo->products_name = tep_db_prepare_input($products_name[$languages[$i]['id']]); $pInfo->products_description = tep_db_prepare_input($products_description[$languages[$i]['id']]); $pInfo->products_url = tep_db_prepare_input($products_url[$languages[$i]['id']]); } ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $pInfo->products_name; ?></td> <td class="pageHeading" align="right"><?php echo $currencies->format($pInfo->products_price); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->products_description; ?></td> </tr> <?php if ($pInfo->products_url) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo sprintf(TEXT_PRODUCT_MORE_INFORMATION, $pInfo->products_url); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php if ($pInfo->products_date_available > date('Y-m-d')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_AVAILABLE, tep_date_long($pInfo->products_date_available)); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_ADDED, tep_date_long($pInfo->products_date_added)); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) { if (isset($HTTP_GET_VARS['origin'])) { $pos_params = strpos($HTTP_GET_VARS['origin'], '?', 0); if ($pos_params != false) { $back_url = substr($HTTP_GET_VARS['origin'], 0, $pos_params); $back_url_params = substr($HTTP_GET_VARS['origin'], $pos_params + 1); } else { $back_url = $HTTP_GET_VARS['origin']; $back_url_params = ''; } } else { $back_url = FILENAME_CATEGORIES; $back_url_params = 'cPath=' . $cPath . '&pID=' . $pInfo->products_id; } ?> <tr> <td align="right"><?php echo '<a href="' . tep_href_link($back_url, $back_url_params, 'NONSSL') . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td> </tr> <?php } else { ?> <tr> <td align="right" class="smallText"> <?php /* Re-Post all POST'ed variables */ reset($HTTP_POST_VARS); while (list($key, $value) = each($HTTP_POST_VARS)) { if (!is_array($HTTP_POST_VARS[$key])) { echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value))); } } $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']]))); echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]['id']]))); echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']]))); } // BOF astro - update database with new images echo tep_draw_hidden_field('products_image', stripslashes($products_image_name)); echo tep_draw_hidden_field('products_image_2', stripslashes($products_image_2_name)); echo tep_draw_hidden_field('products_image_3', stripslashes($products_image_3_name)); echo tep_draw_hidden_field('products_image_4', stripslashes($products_image_4_name)); echo tep_draw_hidden_field('products_image_5', stripslashes($products_image_5_name)); echo tep_draw_hidden_field('products_image_6', stripslashes($products_image_6_name)); // EOF astro - update database with new images echo tep_image_submit('button_back.gif', IMAGE_BACK, 'name="edit"') . ' '; if (isset($HTTP_GET_VARS['pID'])) { echo tep_image_submit('button_update.gif', IMAGE_UPDATE); } else { echo tep_image_submit('button_insert.gif', IMAGE_INSERT); } echo ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </tr> </table></form> <?php } } else { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="headerNavigation"> <?php echo $breadcrumb->trail(' » '); ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('search', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search'); echo '</form>'; ?> </td> </tr> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('goto', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'); echo '</form>'; ?> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $categories_count = 0; $rows = 0; if (isset($HTTP_GET_VARS['search'])) { $search = tep_db_prepare_input($HTTP_GET_VARS['search']); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name"); } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name"); } while ($categories = tep_db_fetch_array($categories_query)) { $categories_count++; $rows++; // Get parent_id for subcategories if search if (isset($HTTP_GET_VARS['search'])) $cPath= $categories['parent_id']; if ((!isset($HTTP_GET_VARS['cID']) && !isset($HTTP_GET_VARS['pID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $categories['categories_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { $category_childs = array('childs_count' => tep_childs_in_category_count($categories['categories_id'])); $category_products = array('products_count' => tep_products_in_category_count($categories['categories_id'])); $cInfo_array = array_merge($categories, $category_childs, $category_products); $cInfo = new objectInfo($cInfo_array); } if (isset($cInfo) && is_object($cInfo) && ($categories['categories_id'] == $cInfo->categories_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a> <b>' . $categories['categories_name'] . '</b>'; ?></td> <td class="dataTableContent" align="center"> </td> <td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($categories['categories_id'] == $cInfo->categories_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } $products_count = 0; if (isset($HTTP_GET_VARS['search'])) { $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, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' 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 = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name"); } while ($products = tep_db_fetch_array($products_query)) { $products_count++; $rows++; // Get categories_id for product if search if (isset($HTTP_GET_VARS['search'])) $cPath = $products['categories_id']; if ( (!isset($HTTP_GET_VARS['pID']) && !isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['pID']) && ($HTTP_GET_VARS['pID'] == $products['products_id']))) && !isset($pInfo) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { // find out the rating average from customer reviews $reviews_query = tep_db_query("select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int)$products['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); $pInfo_array = array_merge($products, $reviews); $pInfo = new objectInfo($pInfo_array); } if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products['products_name']; ?></td> <td class="dataTableContent" align="center"> <?php if ($products['products_status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag&flag=0&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag&flag=1&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } ?></td> <td class="dataTableContent" align="right"><?php if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } $cPath_back = ''; if (sizeof($cPath_array) > 0) { for ($i=0, $n=sizeof($cPath_array)-1; $i<$n; $i++) { if (empty($cPath_back)) { $cPath_back .= $cPath_array[$i]; } else { $cPath_back .= '_' . $cPath_array[$i]; } } } $cPath_back = (tep_not_null($cPath_back)) ? 'cPath=' . $cPath_back . '&' : ''; ?> <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="' . tep_href_link(FILENAME_CATEGORIES, $cPath_back . 'cID=' . $current_category_id) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a> '; if (!isset($HTTP_GET_VARS['search'])) echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_category') . '">' . tep_image_button('button_new_category.gif', IMAGE_NEW_CATEGORY) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_product') . '">' . tep_image_button('button_new_product.gif', IMAGE_NEW_PRODUCT) . '</a>'; ?> </td> </tr> </table></td> </tr> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'new_category': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_CATEGORY . '</b>'); $contents = array('form' => tep_draw_form('newcategory', FILENAME_CATEGORIES, 'action=insert_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_NEW_CATEGORY_INTRO); $category_inputs_string = ''; $languages = tep_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $category_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']'); } $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_NAME . $category_inputs_string); $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image')); $contents[] = array('text' => '<br>' . TEXT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', '', 'size="2"')); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'edit_category': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_CATEGORY . '</b>'); $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"') . tep_draw_hidden_field('categories_id', $cInfo->categories_id)); $contents[] = array('text' => TEXT_EDIT_INTRO); $category_inputs_string = ''; $languages = tep_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $category_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', tep_get_category_name($cInfo->categories_id, $languages[$i]['id'])); } $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string); $contents[] = array('text' => '<br>' . tep_image(DIR_WS_CATALOG_IMAGES . $cInfo->categories_image, $cInfo->categories_name) . '<br>' . DIR_WS_CATALOG_IMAGES . '<br><b>' . $cInfo->categories_image . '</b>'); $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image')); $contents[] = array('text' => '<br>' . TEXT_EDIT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"')); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'delete_category': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_CATEGORY . '</b>'); $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=delete_category_confirm&cPath=' . $cPath) . tep_draw_hidden_field('categories_id', $cInfo->categories_id)); $contents[] = array('text' => TEXT_DELETE_CATEGORY_INTRO); $contents[] = array('text' => '<br><b>' . $cInfo->categories_name . '</b>'); if ($cInfo->childs_count > 0) $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_CHILDS, $cInfo->childs_count)); if ($cInfo->products_count > 0) $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $cInfo->products_count)); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'move_category': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_CATEGORY . '</b>'); $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=move_category_confirm&cPath=' . $cPath) . tep_draw_hidden_field('categories_id', $cInfo->categories_id)); $contents[] = array('text' => sprintf(TEXT_MOVE_CATEGORIES_INTRO, $cInfo->categories_name)); $contents[] = array('text' => '<br>' . sprintf(TEXT_MOVE, $cInfo->categories_name) . '<br>' . tep_draw_pull_down_menu('move_to_category_id', tep_get_category_tree(), $current_category_id)); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_move.gif', IMAGE_MOVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'delete_product': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_PRODUCT . '</b>'); $contents = array('form' => tep_draw_form('products', FILENAME_CATEGORIES, 'action=delete_product_confirm&cPath=' . $cPath) . tep_draw_hidden_field('products_id', $pInfo->products_id)); $contents[] = array('text' => TEXT_DELETE_PRODUCT_INTRO); $contents[] = array('text' => '<br><b>' . $pInfo->products_name . '</b>'); $product_categories_string = ''; $product_categories = tep_generate_category_path($pInfo->products_id, 'product'); 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); $product_categories_string .= tep_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>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'move_product': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_PRODUCT . '</b>'); $contents = array('form' => tep_draw_form('products', FILENAME_CATEGORIES, 'action=move_product_confirm&cPath=' . $cPath) . tep_draw_hidden_field('products_id', $pInfo->products_id)); $contents[] = array('text' => sprintf(TEXT_MOVE_PRODUCTS_INTRO, $pInfo->products_name)); $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_CATEGORIES . '<br><b>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</b>'); $contents[] = array('text' => '<br>' . sprintf(TEXT_MOVE, $pInfo->products_name) . '<br>' . tep_draw_pull_down_menu('move_to_category_id', tep_get_category_tree(), $current_category_id)); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_move.gif', IMAGE_MOVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'copy_to': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>'); $contents = array('form' => tep_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath) . tep_draw_hidden_field('products_id', $pInfo->products_id)); $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO); $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_CATEGORIES . '<br><b>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</b>'); $contents[] = array('text' => '<br>' . TEXT_CATEGORIES . '<br>' . tep_draw_pull_down_menu('categories_id', tep_get_category_tree(), $current_category_id)); $contents[] = array('text' => '<br>' . TEXT_HOW_TO_COPY . '<br>' . tep_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br>' . tep_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_copy.gif', IMAGE_COPY) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if ($rows > 0) { if (isset($cInfo) && is_object($cInfo)) { // category info box contents $heading[] = array('text' => '<b>' . $cInfo->categories_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=edit_category') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=delete_category') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=move_category') . '">' . tep_image_button('button_move.gif', IMAGE_MOVE) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added)); if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified)); $contents[] = array('text' => '<br>' . tep_info_image($cInfo->categories_image, $cInfo->categories_name, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '<br>' . $cInfo->categories_image); $contents[] = array('text' => '<br>' . TEXT_SUBCATEGORIES . ' ' . $cInfo->childs_count . '<br>' . TEXT_PRODUCTS . ' ' . $cInfo->products_count); } elseif (isset($pInfo) && is_object($pInfo)) { // product info box contents $heading[] = array('text' => '<b>' . tep_get_products_name($pInfo->products_id, $languages_id) . '</b>'); /* Optional Related Products (ORP) */ $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=delete_product') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=move_product') . '">' . tep_image_button('button_move.gif', IMAGE_MOVE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=copy_to') . '">' . tep_image_button('button_copy_to.gif', IMAGE_COPY_TO) . '</a> <a href="' . tep_href_link(FILENAME_RELATED_PRODUCTS, 'products_id_view=' . $pInfo->products_id) . '" target="_new">' . tep_image_button('button_related_products.gif', IMAGE_RELATED_PRODUCTS) . '</a>' ); //ORP: end $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . tep_date_short($pInfo->products_date_added)); if (tep_not_null($pInfo->products_last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($pInfo->products_last_modified)); if (date('Y-m-d') < $pInfo->products_date_available) $contents[] = array('text' => TEXT_DATE_AVAILABLE . ' ' . tep_date_short($pInfo->products_date_available)); $contents[] = array('text' => '<br>' . tep_info_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . $pInfo->products_image); $contents[] = array('text' => '<br>' . TEXT_PRODUCTS_PRICE_NINFO . ' ' . $currencies->format($pInfo->products_price) ); $get_tax_qry = tep_db_query("SELECT tr.tax_rate FROM " . TABLE_PRODUCTS . " p INNER JOIN " . TABLE_TAX_RATES . " tr ON (p.products_tax_class_id = tr.tax_class_id) WHERE (p.products_id = " . $pInfo->products_id . ")"); $get_tax_res = tep_db_fetch_array($get_tax_qry); $products_price_with_tax = tep_add_tax($pInfo->products_price, $get_tax_res['tax_rate']); $get_special_price_qry = tep_db_query("SELECT s.specials_new_products_price, s.`status` FROM ".TABLE_SPECIALS." s WHERE (s.products_id = '".$pInfo->products_id."')"); $get_special_price_res = tep_db_fetch_array($get_special_price_qry); if($get_special_price_res){ $get_special_price_with_tax = tep_add_tax($get_special_price_res['specials_new_products_price'], $get_tax_res['tax_rate']); } $contents[] = array('text' => '<br>' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($products_price_with_tax) . '<br><br>' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity); if($get_special_price_with_tax >= '0' && $get_special_price_res['status'] =1) { $contents[] = array('text' => '<br>' . TEXT_PRODUCTS_PRICE_SINFO . ' ' . $currencies->format($get_special_price_with_tax) ); } $contents[] = array('text' => '<br>' . TEXT_PRODUCTS_AVERAGE_RATING . ' ' . number_format($pInfo->average_rating, 2) . '%'); } } else { // create category/product info $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>'); $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table> <?php } ?> </td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  2. Thanks, but that's one of the codes I tried :-" My categories is:
  3. Hi, I'm using the addon Multiple Images for Products, which is a very nice and simple addon. link to addon but their is one thing I'd like to have in this: delete a image I tried to change the code but no success :angry: . Is there anyone who can help me with this? thanks Angelique
  4. :blush: :blush: :sweating: I now see the manufacturer description is only visible by th style manufacturer. Oke! sorry But I have another question :wacko: The right colomn (with the cart etc.) is removed to down cause the product listing is there. In your examples I see the right columns on their right place. I did played with the settings but It's still the same problem. Sorry for all my questions. Angelique
  5. aaaah that's the short description and not the manufacturer description. Oke. :blush: I removed that but I still didn't get the manufacturer description on top of the product list when I select the manufacturer. I put in de admin a text. In the code of the product listing there's if ($row) { $i = 0 ; $nbx = class_exists(noborderBox); if ($col > 0 && $row > 1 && $nbx && !$grid) { for ($i=0, $n=$col; $i < $n; $i++) { $last_row[0][$i] = $info_box_contents[$row][$i]; unset($info_box_contents[$row][$i]); } } if (!$i) {$col = 0;$row ++;$info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" ', 'text' => ' '); } if ($nbx) new noborderBox($info_box_contents); else new contentBox($info_box_contents); if($i) new noborderBox($last_row); echo $Tborderend; } else {$empty_list=true; } } elseif (strstr($thumbnail_view, 'manufacturer')) { //manufacturer $row = 0;$col = 0; if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { $filterlist_sql= tep_db_query("select distinct m.manufacturers_id, m.manufacturers_name, mi.manufacturers_description from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "'"); }else{ $filterlist_sql= tep_db_query("select distinct m.manufacturers_id, m.manufacturers_name, mi.manufacturers_description from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' and mi.languages_id = '" . (int)$languages_id . "' order by m.manufacturers_name"); } if (tep_db_num_rows($filterlist_sql)) { $rows = 0; while ($manufacturer = tep_db_fetch_array($filterlist_sql)) { $info_box_heading = array(); if ($rows) echo tep_draw_separator('pixel_trans.gif', '100%', '4'); echo $border2; $info_box_heading[0] = array('text' => '<big>'.$manufacturer['manufacturers_name'].'</big><br />'.(MANU_DESCRIPTION == 'true' ? $manufacturer['manufacturers_description'].'<br />' : '')); new infoBoxHeading($info_box_heading, false, false); but why isn't there a description in the productlist when I click on a manufacturer? Angelique
  6. :o now I get the error: 1054 - Unknown column 'pd.short_desc' in 'field list' select p.products_image, m.manufacturers_name, pd.products_name, pd.short_desc, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id, products_to_categories p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '4' and p2c.categories_id = '40' order by pd.products_name limit 0, 30 this is the index.php <?php /* $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // fix manufacture reset bug if (isset($_GET['manufacturers_id']) && !tep_not_null($_GET['manufacturers_id'])) { tep_redirect(tep_href_link(FILENAME_DEFAULT));} ################# $page_query = tep_db_query("select p.pages_id, p.sort_order, p.status, s.pages_title, s.pages_html_text from " . TABLE_PAGES . " p LEFT JOIN " .TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id where p.status = 1 and s.language_id = '" . (int)$languages_id . "' and p.page_type = 1"); $page_check = tep_db_fetch_array($page_query); $pagetext=stripslashes($page_check[pages_html_text]); ##################### // the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <?php # cDynamic Meta Tags /*<title><?php echo TITLE; ?>*/ require(DIR_WS_INCLUDES . 'meta_tags.php'); # ?> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <?php if ($category_depth == 'nested') { $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'"); $category = tep_db_fetch_array($category_query); ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo $breadcrumb->last(' » '); ?></td> <td class="pageHeading" align="center"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category $category_links = array_reverse($cPath_array); for($i=0, $n=sizeof($category_links); $i<$n; $i++) { $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $categories = tep_db_fetch_array($categories_query); if ($categories['total'] < 1) { // do nothing, go through the loop } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); break; // we've found the deepest category the customer is in } } } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); } $number_of_categories = tep_db_num_rows($categories_query); $rows = 0; while ($categories = tep_db_fetch_array($categories_query)) { $rows++; $cPath_new = tep_get_path($categories['categories_id']); $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%'; echo ' <td align="center" class="accountCategory" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n"; if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) { echo ' </tr>' . "\n"; echo ' <tr>' . "\n"; } } // needed for the new products module shown below ?> </tr> </table></td> </tr> <tr> </tr> <tr> </tr> </table></td> </tr> </table></td> <?php } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) { // create column list $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE, 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } $select_column_list = ''; for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name, '; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; } } $select_column_list .= 'pd.short_desc, '; // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } } if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; } } } else { $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); $sort_order = substr($HTTP_GET_VARS['sort'], 1); switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= " order by pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo $breadcrumb->last(' » '); ?></td> <?php // optional Product List Filter if (PRODUCT_LIST_FILTER > 0) { if (isset($HTTP_GET_VARS['manufacturers_id'])) { $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name"; } $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo ' <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } echo tep_draw_hidden_field('sort', $_GET['sort']).(isset($_GET['list']) ? tep_draw_hidden_field('list', $_GET['list']) : '') . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : ''); while ($filterlist = tep_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"'); echo tep_hide_session_id() . '</form></td>' . "\n"; } } // Get the right image for the top-right $image = DIR_WS_IMAGES . 'table_background_list.gif'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $image = tep_db_fetch_array($image); $image = $image['manufacturers_image']; } elseif ($current_category_id) { $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $image = tep_db_fetch_array($image); $image = $image['categories_image']; } ?> <td align="right"> </td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td> </tr> </table></td> <?php } else { // default page ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo $breadcrumb->last(' » '); ?></td> <td class="pageHeading" align="center"><?php ?></td> </tr> </table></td> </tr> <?php // BOF: Store Mode if (STORE_MODE == 'Closed') { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="stockWarning" align="center"><?php echo CLOSED_MESSAGE . ONLINE_DATE_TIME ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } // EOF: Store Mode ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="main"><?php echo tep_customer_greeting(); ?></td> </tr><!-- BEGIN newsdesk --> <tr><td><?php include(DIR_WS_MODULES . FILENAME_NEWSDESK_STICKY); ?></td></tr> <!-- //END newsdesk --> <!-- BEGIN newsdesk --> <tr><td><?php include(DIR_WS_MODULES . FILENAME_NEWSDESK); ?></td></tr> <!-- //END newsdesk --> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFINE_MAINPAGE); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> </tr> <?php include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?> </table></td> </tr> </table></td> <?php } ?> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  7. I forgot to tell you that I also had run the sql. I checked and put again the alter table manufacturers_info but get: SQL-query: ALTER TABLE `manufacturers_info` ADD `manufacturers_description` varchar( 64 ) NULL MySQL retourneerde: Documentatie #1060 - Duplicate column name 'manufacturers_description' so it's seems the same issue as from october 25th. Angelique
  8. Thank you for this wonderfull contribution. The product list is working fine! The only thing what's not working for me is the manufacturer short description on the product listing when I choose for a manufacturer. I made all the changes for the index.php, Set the manufacturer's description on True, made all the changes of your text file, put the includes files from your zip V2.0. But I get the same error as nfarafo on october 25th. 1054 - Unknown column 'manufacturers_description' in 'field list' I reinstalled a backup and tried again but same error. Cause I can't find an other contribution for manufacturers descriptions on the product list I hope you have time to look at this issue :unsure: . Kind regards, Angelique
  9. Jim, You're my hero!! It's working now Regards, Angelique
  10. Hi Jim, I installed your code but get the following: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE prp.pop_products_id_slave = pa.products_id AND pa.product' at line 14 SELECT prp.pop_products_id_slave, pa.products_name, pb.products_model, pb.products_price, pb.products_quantity, pb.products_tax_class_id, pi.image_filename FROM products_related_products prp, products_description pa, products pb left join products_images pi on pb.products_id = pi.products_id and pi.category_page = '1', WHERE prp.pop_products_id_slave = pa.products_id AND pa.products_id = pb.products_id AND pa.language_id = '4' AND prp.pop_products_id_master = '60' AND products_status = '1' ORDER BY rand() :unsure:
  11. Jim, I appreciate your input very very much but I'm not getting there. It's driving me crazy. With the changes you send me I get the filename of the related product but not the thumbnail. And I think it's a very small change but don't no what grrrrrrr. The code of the product_info.php is now: <?php /* $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $ $Loc: catalog/ $ $Mod: 20081216 More Pics 2.0 kymation $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php if ($product_check['total'] < 1) { ?> <tr> <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { // BOF: More Pics 6 Removed images $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); // EOF: More Pics 6 $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"> <?php If (($product_info['products_quantity']<>0) and ($product_info['products_price']>0)) { echo '' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/in_stock.gif', IMAGE_BUTTON_IN_STOCK). '<br><br>'; } else { echo '' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/out_stock.gif', IMAGE_BUTTON_OUT_STOCK) . '<br><br>'; } ?> <?php // BOF: More Pics if (MORE_PICS_TABLE_LOCATION == 'above' || MORE_PICS_TABLE_LOCATION == 'sides') { include (DIR_WS_MODULES . FILENAME_MORE_PICS); } $product_images_query = tep_db_query ("select image_filename from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int) $_GET['products_id'] . "' and product_page = '1' "); $product_images = tep_db_fetch_array ($product_images_query); $products_main_image = $product_images['image_filename']; if (tep_not_null ($products_main_image) && MORE_PICS_SHOW_ORIG_ON_PRODUCT_INFO == 'true') { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <?php if (MORE_PICS_LINK_CSS_IMAGES == 'true') { echo '<a href="' . tep_href_link (FILENAME_PRODUCT_INFO, tep_get_all_get_params() . '#morepics') . '">' . tep_image (DIR_WS_IMAGES . $products_main_image, $product_info['products_name'], (MORE_PICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MORE_PICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br></a>'; } else { ?> <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $products_main_image, addslashes($product_info['products_name']), (MORE_PICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MORE_PICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link (DIR_WS_IMAGES . $products_main_image) . '" target="_blank">' . tep_image (DIR_WS_IMAGES . $products_main_image, $product_info['products_name'], (MORE_PICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MORE_PICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>'; ?> </noscript> <br> <?php If (($product_info['products_quantity']<>0) and ($product_info['products_price']>0)) { echo '<br>' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/in_stock.gif', IMAGE_BUTTON_IN_STOCK). '<br><br>'; } else { echo '<br>' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/out_stock.gif', IMAGE_BUTTON_OUT_STOCK). '<br><br>'; } ?> <?php } // if (MORE_PICS_LINK_CSS_IMAGES ... else ... // EOF: More Pics ?> </td> </tr> </table> <?php } // Points/Rewards system V2.1rc2a BOF if ((USE_POINTS_SYSTEM == 'true') && (DISPLAY_POINTS_INFO == 'true')) { if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price_points = tep_display_points($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])); } else { $products_price_points = tep_display_points($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } $products_points = tep_calc_products_price_points($products_price_points); $products_points_value = tep_calc_price_pvalue($products_points); if ((USE_POINTS_FOR_SPECIALS == 'true') || $new_price == false) { echo '<p>' . sprintf(TEXT_PRODUCT_POINTS , number_format($products_points,POINTS_DECIMAL_PLACES), $currencies->format($products_points_value)) . '</p>'; } } // Points/Rewards system V2.1rc2a EOF ?> <p><?php echo stripslashes($product_info['products_description']); ?></p> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php } ?> </table> <?php } // BOF: More Pics 6 if (MORE_PICS_TABLE_LOCATION == 'below') { include (DIR_WS_MODULES . FILENAME_MORE_PICS); } // EOF: More Pics 6 ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <tr> <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (tep_not_null($product_info['products_url'])) { ?> <tr> <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"> </td> <td class="main" align="right"><?php If (($product_info['products_quantity']<>0) and ($product_info['products_price']>0)) { echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); }else{ echo tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/button_out_stock.gif', IMAGE_BUTTON_OUT_STOCK); } ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> </td> </tr> <?php if (MORE_PICS_TABLE_LOCATION == 'bottom') { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td align="center" class="smallText"><?php include_once (DIR_WS_MODULES . FILENAME_MORE_PICS); ?></td> </tr> <?php } ?> <?php include(DIR_WS_MODULES . FILENAME_RELATED_PRODUCTS); $slave_images_query = tep_db_query ("select image_filename from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int) $products_id_slave . "' and product_page = '1' "); $slave_images = tep_db_fetch_array ($slave_images_query); $products_slave_image = $slave_images['image_filename']; ?> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> And from the related_products.php: <?php /* $Id: optional_related_products.php, ver 1.0 02/05/2007 Exp $ Part of Contribution: Optional Related Products Ver 4.0 Based on code from Optional Relate Products, ver 2.0 05/01/2005 Copyright © 2004-2005 Daniel Bahna ([email protected]) osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Released under the GNU General Public License */ $orderBy = 'ORDER BY '; $orderBy .= (RELATED_PRODUCTS_RANDOMIZE)?'rand()':'pop_order_id, pop_id'; $orderBy .= (RELATED_PRODUCTS_MAX_DISP)?' limit ' . RELATED_PRODUCTS_MAX_DISP:''; $attributes = " SELECT pop_products_id_slave, products_name, products_model, products_price, products_quantity, products_tax_class_id, products_image FROM " . TABLE_PRODUCTS_RELATED_PRODUCTS . ", " . TABLE_PRODUCTS_DESCRIPTION . " pa, ". TABLE_PRODUCTS . " pb WHERE pop_products_id_slave = pa.products_id AND pa.products_id = pb.products_id AND language_id = '" . (int)$languages_id . "' AND pop_products_id_master = '".$HTTP_GET_VARS['products_id']."' AND products_status='1' " . $orderBy; $attribute_query = tep_db_query($attributes); if (mysql_num_rows($attribute_query)>0) { $count = 0; ?> <tr> <td> <table class="productlisting" border="0" cellspacing="0" cellpadding="2" width="100%"> <tr> <td align="center" class="productListing-heading"> <?php echo TEXT_RELATED_PRODUCTS ?> </td> </tr><tr> <td align="center" class="productListing-data"> <table border="0" cellspacing="0" cellpadding="2" width="100%" align="center"> <tr> <?php while ($attributes_values = tep_db_fetch_array($attribute_query)) { $products_name_slave = ($attributes_values['products_name']); $products_model_slave = ($attributes_values['products_model']); $products_qty_slave = ($attributes_values['products_quantity']); $products_id_slave = ($attributes_values['pop_products_id_slave']); if ($new_price = tep_get_products_special_price($products_id_slave)) { $products_price_slave = $currencies->display_price($new_price, tep_get_tax_rate($attributes_values['products_tax_class_id'])); } else { $products_price_slave = $currencies->display_price($attributes_values['products_price'], tep_get_tax_rate($attributes_values['products_tax_class_id'])); } echo '<td class="productListing-data" align="center">' . "\n"; // show thumb image if Enabled if (RELATED_PRODUCTS_SHOW_THUMBS == 'True') { echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id_slave) . '">' . "\n" . tep_image(DIR_WS_IMAGES . $attributes_values['products_slave_image'], $attributes_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"').'</a><br>' . "\n"; } $caption = ''; if (RELATED_PRODUCTS_SHOW_NAME == 'True') { $caption .= '<p>' . $products_name_slave; if (RELATED_PRODUCTS_SHOW_MODEL == 'True') { $caption .= sprintf(RELATED_PRODUCTS_MODEL_COMBO, $products_model_slave); } $caption .= '</p>' . "\n"; } elseif (RELATED_PRODUCTS_SHOW_MODEL == 'True') { $caption .= '<p>' . $products_model_slave . '</p>' . "\n"; } if (RELATED_PRODUCTS_SHOW_PRICE == 'True') { $caption .= '<p>' . sprintf(RELATED_PRODUCTS_PRICE_TEXT, $products_price_slave) . '</p>' . "\n"; } if (RELATED_PRODUCTS_SHOW_QUANTITY == 'True') { $caption .= '<p>' . sprintf(RELATED_PRODUCTS_QUANTITY_TEXT, $products_qty_slave) . '</p>' . "\n"; } echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id_slave) . '">' . $caption . '</a>' . "\n"; if (RELATED_PRODUCTS_SHOW_BUY_NOW== 'True') { echo '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=rp_buy_now&rp_products_id=' . $products_id_slave) . '">' . tep_image_button('button_rp_buy_now.gif', IMAGE_BUTTON_RP_BUY_NOW) . '</a>'; } echo '</td>' . "\n"; $count++; if ((RELATED_PRODUCTS_USE_ROWS == 'True') && ($count%RELATED_PRODUCTS_PER_ROW == 0)) { echo '</tr><tr>' . "\n"; } } ?> </tr></table> </td> </tr></table> </td> </tr> <?php } ?> and this is the result: Best regards Lieke
  12. Jim, I think I'm not clear. More pics is working just fine. But I installed Related Products and thats nog compatible with more pics. Now the products info.php shows the thumbnail and the images of the product and then the Related Products: and then their should be thumbnails of the product_slave but now its shows the thumbnail of the main product. See the image. So I've to tell that the thumbnail must be the one from the product_slave but how? Lieke
  13. I installed this great contributions and it's working fine exept for the thumbnail (that's why I asked if there's someone who uses this and more pics. I changed the code in the catalog\includes\modules\optional_related_products.php: from: // show thumb image if Enabled if (RELATED_PRODUCTS_SHOW_THUMBS == 'True') { echo '<a href="' products_image. tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id_slave) . '">' . "\n" . tep_image(DIR_WS_IMAGES . $attributes_values['products_image'], $attributes_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"').'</a><br>' . "\n"; } to: // show thumb image if Enabled if (RELATED_PRODUCTS_SHOW_THUMBS == 'True') { echo '<a href="' . tep_href_link (FILENAME_PRODUCT_INFO, tep_get_all_get_params() . '#morepics') . '">' . tep_image (DIR_WS_IMAGES . $products_main_image, $product_info['products_name'], (MORE_PICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MORE_PICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br></a>'; And now the frontend shows a thumbnail but of course from the orginal image and not from the related product. I have to put somewhere the $products_id_slave? } Anyone who can help me with this problem? Thanks in advance
  14. Jim, I made some progress, I'm almost there but need some input. I changed the code in the catalog\includes\modules\optional_related_products.php: from: // show thumb image if Enabled if (RELATED_PRODUCTS_SHOW_THUMBS == 'True') { echo '<a href="' products_image. tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id_slave) . '">' . "\n" . tep_image(DIR_WS_IMAGES . $attributes_values['products_image'], $attributes_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"').'</a><br>' . "\n"; } to: // show thumb image if Enabled if (RELATED_PRODUCTS_SHOW_THUMBS == 'True') { echo '<a href="' . tep_href_link (FILENAME_PRODUCT_INFO, tep_get_all_get_params() . '#morepics') . '">' . tep_image (DIR_WS_IMAGES . $products_main_image, $product_info['products_name'], (MORE_PICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MORE_PICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br></a>'; And now the frontend shows a thumbnail but of course from the orginal image and not from the related product. I have to put somewhere the $products_id_slave? } Thanks in advance
  15. Hi Jim, I tried to make some changes in the includes\modules\optional_related_products.php but no success. Herewith I send you the code from admin\sql_setup_related_products.php. thank you so much for looking at it. Lieke <?php /* sql_setup_related_products.php SQL Setup Utility For Optional Related Products, Ver 4.0 Copyright © 2007 Anita Cross (http://www.callofthewildphoto.com/) osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Released under the GNU General Public License */ require('includes/application_top.php'); $contrib = 'Related Products'; $filename = FILENAME_RELATED_PRODUCTS; function install_ORP_to_sql($gid = 0) { $old_table_name = tep_db_fetch_array(tep_db_query("SHOW TABLES LIKE 'products_options_products'")); if (tep_not_null($old_table_name)) { tep_db_query("RENAME TABLE products_options_products TO products_related_products"); } $insert_relationship_table = "CREATE TABLE IF NOT EXISTS `products_related_products` ( `pop_id` int(11) NOT NULL auto_increment, `pop_products_id_master` int(11) NOT NULL default '0', `pop_products_id_slave` int(11) NOT NULL default '0', `pop_order_id` smallint(6) NOT NULL default '0', PRIMARY KEY (`pop_id`) ) TYPE=MyISAM;"; tep_db_query($insert_relationship_table); if (!$gid) { tep_db_query("INSERT INTO `configuration_group` VALUES ( '', 'Related Products', 'Optional Related Products module', '999', '1' )"); $set_group_id = tep_db_insert_id(); } else { $set_group_id = $gid; } tep_db_query("INSERT INTO `configuration` VALUES ('', 'Current Version', 'RELATED_PRODUCTS_VERSION_INSTALLED', '4.0', 'This key is used by the SQL install to automatically update your database during upgrades. It is read only.', " . $set_group_id . ", '0', NULL, now(), NULL , 'tep_version_readonly('), ('', 'Display Thumbnail Images', 'RELATED_PRODUCTS_SHOW_THUMBS', 'True', 'Show Product Image', " . $set_group_id . ", '1', NULL, now(), NULL , 'tep_cfg_select_option(array(\'True\', \'False\'),'), ('', 'Display Product Name', 'RELATED_PRODUCTS_SHOW_NAME', 'True', 'Show Product Name', " . $set_group_id . ", 2, NULL, now(),NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'), ('', 'Display Product Model', 'RELATED_PRODUCTS_SHOW_MODEL', 'False', 'Show Product Model', " . $set_group_id . ", 3, NULL, now(),NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'), ('', 'Display Price', 'RELATED_PRODUCTS_SHOW_PRICE', 'True', 'Show Product Price', " . $set_group_id . ", 4, NULL, now(),NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'), ('', 'Display Quantity Available', 'RELATED_PRODUCTS_SHOW_QUANTITY', 'False', 'Show Product Quantity', " . $set_group_id . ", 5, NULL, now(),NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'), ('', 'Display Buy Now Button', 'RELATED_PRODUCTS_SHOW_BUY_NOW', 'False', 'Show Buy Now Button', " . $set_group_id . ", 6, NULL, now(),NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'), ('', 'Split Display Into Rows','RELATED_PRODUCTS_USE_ROWS','False','Set this option to True to display Related Products in multiple rows.'," . $set_group_id . ", 7,NULL, now(),NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'), ('', 'Define Number of Items Per Row','RELATED_PRODUCTS_PER_ROW','3','Maximum number of items to display per row when Split Display Into Rows is set to True.'," . $set_group_id . ", 8,NULL, now(),NULL,''), ('', 'Define Number of Items to Display', 'RELATED_PRODUCTS_MAX_DISP', '0', 'Maximum number of Related Products to display. 0 is unlimited.', " . $set_group_id . ", 9, NULL, now(),NULL,''), ('', 'Use Random Display Order', 'RELATED_PRODUCTS_RANDOMIZE', 'False', 'Adds random sort order to products displayed. Recommended if maximum number of products is set.', " . $set_group_id . ", 10, NULL, now(),NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'), ('', 'Admin Display: Maximum Rows', 'RELATED_PRODUCTS_MAX_ROW_LISTS_OPTIONS', '10', 'Sets the maximum number of rows to display per page.', " . $set_group_id . ", 11, NULL, now(),NULL,''), ('', 'Admin Display: Drop-Down List Maximum Length', 'RELATED_PRODUCTS_MAX_NAME_LENGTH', '25', 'Sets the maximum length (in characters) of product name displayed in drop-down lists. Enter \'0\' to set this option to false.', " . $set_group_id . ", 12, NULL, now(),NULL,''), ('', 'Admin Display: Display List Maximum Length', 'RELATED_PRODUCTS_MAX_DISPLAY_LENGTH', '0', 'Sets the maximum length (in characters) of product name displayed in list. Enter \'0\' to set this option to false.', " . $set_group_id . ", 13, NULL, now(),NULL,''), ('', 'Admin Display: Use Product Model', 'RELATED_PRODUCTS_ADMIN_USE_MODEL', 'False', 'Uses Product Model in lists. When Product Name is also selected, Product Model is displayed first.', " . $set_group_id . ", 14, NULL, now(),NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'), ('', 'Admin Display: Use Product Name', 'RELATED_PRODUCTS_ADMIN_USE_NAME', 'True', 'Uses Product Name in lists. When Product Model is also selected, Product Model is displayed first.', " . $set_group_id . ", 15, NULL, now(),NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'), ('', 'Admin Display: Combine Model and Name separator', 'RELATED_PRODUCTS_ADMIN_MODEL_SEPARATOR', ': ', 'Enter the characters you would like to separate Model from Name, when using both. Leave empty if only using Model.', " . $set_group_id . ", 16, NULL, now(),NULL,''), ('', 'Admin Function: Use Delete Confirmation', 'RELATED_PRODUCTS_CONFIRM_DELETE', 'True', 'When set to True, a confirmation box will pop-up when deleting an association. Set to False to Delete without confirmation.', " . $set_group_id . ", 17, NULL, now(),NULL,'tep_cfg_select_option(array(\'True\', \'False\'),'), ('', 'Admin Function: Combine Insert with Inherit', 'RELATED_PRODUCTS_INSERT_AND_INHERIT', 'True', 'When set to True, clicking on Inherit will also Insert the product association. When False, Inherit works as before.', " . $set_group_id . ", 18, NULL, now(),NULL,'tep_cfg_select_option(array(\'True\', \'False\'),') "); } function get_group_id($config_title) { $group_id_array = tep_db_fetch_array(tep_db_query("SELECT configuration_group_id FROM " . TABLE_CONFIGURATION_GROUP . " WHERE configuration_group_title like '". $config_title . "'")); if (sizeof($group_id_array <= 1)) { return $group_id_array['configuration_group_id']; } remove_group_id($contrib); return 0; } function remove_keys($gid) { if (tep_not_null($gid)) { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$gid . "'"); } else { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", keys()) . "')"); } } function remove_group_id($title) { tep_db_query("delete from " . TABLE_CONFIGURATION_GROUP . " WHERE configuration_group_title = '" . $title . "'"); } function remove_table() { tep_db_query("DROP TABLE IF EXISTS `products_related_products`"); } function keys() { $keys = array(); $keys[] = 'RELATED_PRODUCTS_VERSION_INSTALLED'; $keys[] = 'MODULE_RELATED_PRODUCTS_SHOW_THUMBS'; $keys[] = 'RELATED_PRODUCTS_SHOW_THUMBS'; $keys[] = 'RELATED_PRODUCTS_SHOW_NAME'; $keys[] = 'RELATED_PRODUCTS_SHOW_MODEL'; $keys[] = 'RELATED_PRODUCTS_SHOW_PRICE'; $keys[] = 'RELATED_PRODUCTS_SHOW_QUANTITY'; $keys[] = 'RELATED_PRODUCTS_SHOW_BUY_NOW'; $keys[] = 'RELATED_PRODUCTS_USE_ROWS'; $keys[] = 'RELATED_PRODUCTS_PER_ROW'; $keys[] = 'RELATED_PRODUCTS_MAX_DISP'; $keys[] = 'RELATED_PRODUCTS_RANDOMIZE'; $keys[] = 'RELATED_PRODUCTS_MAX_ROW_LISTS_OPTIONS'; $keys[] = 'RELATED_PRODUCTS_MAX_NAME_LENGTH'; $keys[] = 'RELATED_PRODUCTS_MAX_DISPLAY_LENGTH'; $keys[] = 'RELATED_PRODUCTS_ADMIN_USE_MODEL'; $keys[] = 'RELATED_PRODUCTS_ADMIN_USE_NAME'; $keys[] = 'RELATED_PRODUCTS_ADMIN_MODEL_SEPARATOR'; $keys[] = 'RELATED_PRODUCTS_CONFIRM_DELETE'; $keys[] = 'RELATED_PRODUCTS_INSERT_AND_INHERIT'; return $keys; } switch ($HTTP_GET_VARS['install']) { case ('new'): install_ORP_to_sql(); tep_redirect(tep_href_link($filename)); break; case ('remove'): $group_id = get_group_id($contrib); remove_keys($group_id); remove_group_id($contrib); remove_table(); tep_redirect(tep_href_link($filename)); break; case ('upgrade'): $group_id = get_group_id($contrib); remove_keys($group_id); install_ORP_to_sql($group_id); tep_redirect(tep_href_link($filename)); break; } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <style> .intro_section {padding:20px 20px 0px 20px;} .intro_section p {width:590px;} .intro_section b {font-size:.8em;font-weight:bold;color:#900;} .setup_section {width:600px;border:solid 1px black;margin:10px;padding:3px 3px 10px 3px;} .setup_section p {margin:10px;padding:3px} </style> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <?php require(DIR_WS_INCLUDES . 'header.php'); /* header */?> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <?php require(DIR_WS_INCLUDES . 'column_left.php'); /* left_navigation */?> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"> <?php echo HEADING_TITLE_ORP; ?> </td> </tr> <tr> <td class="intro_section"> <p><?php echo TEXT_ORP_INTRODUCTION; ?></p> <p><b><?php echo TEXT_ORP_WARNING; ?></b></p> </td> </tr> </table> </td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><form name="new_install" action="<?php echo tep_href_link('sql_setup_related_products.php'); ?>" method="get"> <div class="setup_section"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="pageHeading"> <?php echo SECTION_TITLE_NEW_INSTALL; ?> </td> </tr> <tr> <td><p><?php echo SECTION_DESCRIPTION_NEW_INSTALL; ?></p> </td> </tr> <tr> <td> <p><?php echo tep_draw_hidden_field('install', 'new') . tep_image_submit('button_new_install_sql.gif', IMAGE_BUTTON_NEW_INSTALL_SQL); ?></p> </td> </tr> </table></div> </form></td> </tr> <tr> <td><form name="update_install" action="<?php echo tep_href_link('sql_setup_related_products.php'); ?>" method="get"> <div class="setup_section"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="pageHeading"> <?php echo SECTION_TITLE_UPGRADE; ?> </td> </tr> <tr> <td><p><?php echo SECTION_DESCRIPTION_UPGRADE; ?></p> </td> </tr> <tr> <td> <p><?php echo tep_draw_hidden_field('install', 'upgrade') . tep_image_submit('button_upgrade_sql.gif', IMAGE_BUTTON_UPGRADE_SQL); ?></p> </td> </tr> </table></div> </form></td> </tr> <tr> <td><form name="update_install" action="<?php echo tep_href_link('sql_setup_related_products.php'); ?>" method="get"> <div class="setup_section"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="pageHeading"> <?php echo SECTION_TITLE_REMOVE; ?> </td> </tr> <tr> <td><p><?php echo SECTION_DESCRIPTION_REMOVE; ?></p> </td> </tr> <tr> <td> <p><?php $param = 'onclick="var x=confirm(\''. TEXT_CONFIRM_REMOVE_SQL . '\')"'; echo tep_draw_hidden_field('install', 'remove') . tep_image_submit('button_remove_sql.gif', IMAGE_BUTTON_REMOVE_SQL, $param); ?></p> </td> </tr> </table></div> </form></td> </tr> </table> </td> </tr> </table></td> </tr> </table> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
×
×
  • Create New...