RGStephens Posted May 29, 2005 Share Posted May 29, 2005 The problem resides in your config.inc.php file, look at the examples below to determin your correct server settings, ensure file permission is all set, as mention above.IMAGE UPLOADER MANUAL CONFIGURATION: admin/htmlarea/popups/config.inc.php This is what you file looks like now: Try changing your paths to suit your needs like below: Cheers Lee :lol: <{POST_SNAPBACK}> This appears to be the answer but I am not smart enough to understand what goes into /path/from/syste/root/ Can someone provide an actual example of both please (or at least something other than generic names) :'( The post number is 185 on page 10 in case this doesn't work properly (I'm a little new at this). Thanks :rolleyes: Rick Quote Link to comment Share on other sites More sharing options...
tthom77 Posted May 29, 2005 Share Posted May 29, 2005 I installed this great contribution. It does everything it says with the exception of editing product categories. Here on it's download page it says under the OTHER USES section that it edit html for category descriptions. Does anyone know if the feature really works or how to enable it in config? Maybe I'm overlooking something. It would be great to add my own html and pics to the category pages. Thank you. Quote Thom Link to comment Share on other sites More sharing options...
PopTheTop Posted May 31, 2005 Share Posted May 31, 2005 This appears to be the answer but I am not smart enough to understand what goes into /path/from/syste/root/ Can someone provide an actual example of both please (or at least something other than generic names) :'( The post number is 185 on page 10 in case this doesn't work properly (I'm a little new at this). Thanks :rolleyes: Rick <{POST_SNAPBACK}> No, not really because no one here knows what YOUR absolute path to your domain public_html folder is. You have to contact your hosting service provider and ask them what it is. Or go into your C-Panel for that domain and it should be shown there somewhere on the left side. Quote L8r, PopTheTop Published osC Contributions: - eCheck Payment Module v3.1 - Reviews in Product Display v2.0 - Fancier Invoice & Packingslip v6.1 - Admin Notes / Customer Notes v2.2 - Customer Zip & State Validation v2.2 - Search Box with Dropdown Category Menu v1.0 Pop your camper's top today! It's a popup thing... You wouldn't understand Link to comment Share on other sites More sharing options...
Andrew J Posted June 1, 2005 Share Posted June 1, 2005 Does anybody have a working NewsDesk 1.48.3 (admin/newsdesk.php) version with MaxiDVD Added WYSIWYG HTML Area Box + Admin Function? Quote Link to comment Share on other sites More sharing options...
Stevis2002 Posted June 2, 2005 Share Posted June 2, 2005 I installed this contribution on a fresh osCommerce installation. I used the easy installation method and everything installed properly with no error. However, when I go to product description I see only text editor and not HTML editory. My browser is IE 6.0. I have gone through this forum and it appears others had the similar problem but were able to fix it, but I am not sure what the fix is. I am new to this and any help will be greatly appreciated. <{POST_SNAPBACK}> I'm getting this problem too. Did you manage to fix it, as i also see no buttons or html editor options when trying to add a new product. Thanks, Steve Quote Link to comment Share on other sites More sharing options...
♥CodeCutter Posted June 5, 2005 Share Posted June 5, 2005 I installed this contribution and everything worked fine for the first time. However, when I wanted to edit the mainpage 2nd time, I don't see the buttons for editing (bold, underline etc) When I go to "Define Mainpage" I see the text with actual HTML tags in it, not the editor and the buttons. Did I miss something? How do I make the buttons reappear? Thanks in advance. Quote -- Reality is an illusion caused due to lack of alcohol. -- We are never too old to learn something new. Link to comment Share on other sites More sharing options...
♥CodeCutter Posted June 5, 2005 Share Posted June 5, 2005 I installed this contribution and everything worked fine for the first time. However, when I wanted to edit the mainpage 2nd time, I don't see the buttons for editing (bold, underline etc) When I go to "Define Mainpage" I see the text with actual HTML tags in it, not the editor and the buttons. Did I miss something? How do I make the buttons reappear? Thanks in advance. <{POST_SNAPBACK}> I think that I have found what was causing this. First time when I set up the mainpage, I used a computer that has MS Word installed and I had used IE to set up the main page. The next time I was using another computer that does not have MS word installed (I use OpenOffice) Also, I was using Firefox browser. This combination does not let you see the editing features, but just shows you the actual HTML text. I don't know a way to make it work in Firefox, but a request for the original contributor. To avoid someone else getting confused as I did, please put some comment in the contribution saying it will not work in Firefox and OpenOffice. Better yet, make it work :) Thanks a lot for this excellent contribution. It is awesome. Quote -- Reality is an illusion caused due to lack of alcohol. -- We are never too old to learn something new. Link to comment Share on other sites More sharing options...
Doc203 Posted June 13, 2005 Share Posted June 13, 2005 Anyone ever find a solution to the following error when trying to send a newsletter? Fatal error: Cannot redeclare class newsletter in /home/glenssur/public_html/admin/includes/modules/newsletters/newsletter.php on line 0 Thanks for any help. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 3, 2005 Share Posted July 3, 2005 Does anyone know why this is happening? It's the same in IE and slimbrowser. Firefox doesn't like java sadly :( Thank you in advance Tracy Quote Link to comment Share on other sites More sharing options...
Mace Posted July 10, 2005 Share Posted July 10, 2005 Has anyone thought of replacing HTML Area with Tiny MCE? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 19, 2005 Share Posted July 19, 2005 Yeah, i just got it working with Oscommerce today. Need to do some more testing to make sure its stable. Its a lot less hassle than some of the other WYSIWYG editors, im also planning on writing some custom buttons for it and removing others. Quote Link to comment Share on other sites More sharing options...
PopTheTop Posted July 19, 2005 Share Posted July 19, 2005 Yeah, i just got it working with Oscommerce today. Need to do some more testing to make sure its stable.Its a lot less hassle than some of the other WYSIWYG editors, im also planning on writing some custom buttons for it and removing others. <{POST_SNAPBACK}> That's great! I was looking at it too but I just do not have the time right now to mess with in. let us know what you think about it and please tell us what to do. Quote L8r, PopTheTop Published osC Contributions: - eCheck Payment Module v3.1 - Reviews in Product Display v2.0 - Fancier Invoice & Packingslip v6.1 - Admin Notes / Customer Notes v2.2 - Customer Zip & State Validation v2.2 - Search Box with Dropdown Category Menu v1.0 Pop your camper's top today! It's a popup thing... You wouldn't understand Link to comment Share on other sites More sharing options...
Andrew J Posted July 21, 2005 Share Posted July 21, 2005 I'd like to add MaxiDVD Added WYSIWYG HTML Area Box + Admin Function to NewsDesk 1.48.3. NewsDesk has already a HTML area editor. I like MaxiDVD's editor and I use it everywhere in admin's textarea boxes cos I can paste any selected html thing into the textboxarea it will parse like html code. The current html editor of the NewsDesk contribution could not, that's because I want to get rid the old one and implement MaxiDVD's editor. Any help will be appreciated! Andrew Quote Link to comment Share on other sites More sharing options...
rose3694 Posted July 21, 2005 Share Posted July 21, 2005 (edited) Can some one tell me what is wrong here? Lines 8 & 9 below. This is of course the last edit you do to admin/categories.php and I'll be darned can not figure out whats wrong. I caught the issue with the closing needing to be after but other than that I'm dumbfounded. TIA I'm getting the following error for it: Parse error: parse error, unexpected T_ELSE in /home/designsb/public_html/store/admin/categories.php on line 1077 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"; ? ?} ?} 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"; ? ? ?// Add neccessary JS for WYSIWYG editor of category image ? ? ?if($action=='edit_category'){ ? ? ? ?if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){ ? ? ? ? ?echo ' ? ? ? ? ? ? ? ? ?<script language="JavaScript1.2" defer> ? ? ? ? ? ? ? ? ?var config = new Object(); ?// create new config object ? ? ? ? ? ? ? ? ?config.width ?= "250px"; ? ? ? ? ? ? ? ? ?config.height = "35px"; ? ? ? ? ? ? ? ? ?config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;"; ? ? ? ? ? ? ? ? ?config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . '; ? ? ? ? ? ? ? ? ?config.toolbar = [ ["InsertImageURL"] ]; ? ? ? ? ? ? ? ? ?config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '"; ? ? ? ? ? ? ? ? ?editor_generate("categories_image",config); ? ? ? ? ? ? ? ?</script> ? ? ? ? ? ? ?'; ? ? ? ?} ? ? ?} ? ?} ?> Edited July 21, 2005 by rose3694 Quote Link to comment Share on other sites More sharing options...
skipwater Posted July 21, 2005 Share Posted July 21, 2005 Can some one tell me what is wrong here? Lines 8 & 9 below. This is of course the last edit you do to admin/categories.php and I'll be darned can not figure out whats wrong. I caught the issue with the closing needing to be after but other than that I'm dumbfounded. TIA I'm getting the following error for it: Parse error: parse error, unexpected T_ELSE in /home/designsb/public_html/store/admin/categories.php on line 1077 It looks like you have an extra } see below 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"; // Try Removing this } // } 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"; // Add neccessary JS for WYSIWYG editor of category image if($action=='edit_category'){ if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){ echo ' <script language="JavaScript1.2" defer> var config = new Object(); // create new config object config.width = "250px"; config.height = "35px"; config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;"; config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . '; config.toolbar = [ ["InsertImageURL"] ]; config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '"; editor_generate("categories_image",config); </script> '; } } } ?> Quote If only I could remember that. Link to comment Share on other sites More sharing options...
kunal247 Posted August 18, 2005 Share Posted August 18, 2005 I am having some problems with Date Available script since i have installed the WYSIWYG editor v1.7 I am getting a Java Script Error and the field for Date Available is missing. Error: 'dateAvailable' is null or not an object and the other Error: 'ctlSpiffyCalenderBox' is undefined Can some one please help me fix this!!! Thanks in advance Kunal Quote Link to comment Share on other sites More sharing options...
developer_x Posted August 18, 2005 Share Posted August 18, 2005 (edited) I can't say what the error would be without looking at the files. Try re-installing the module if you had taken a back up. Hope that would help. Edited August 18, 2005 by developer_x Quote Irfan, Link to comment Share on other sites More sharing options...
aigarslv Posted August 20, 2005 Share Posted August 20, 2005 Hello, I have a different question about this editor - but didn't want to start another thread. I'm using WYSIWYG Editor 1.7 and CRE Loaded 6.15 Problem is that, I need to enter product categories, products, e.t.c in Latvian language, so I'm using Unicode (UTF-8). Unfortunetly, when I switch to UTF-8 encoding in Catalog -> Categories/Products WYSIWYG Editor dissapears, and I get only error mesage Line:110 Char:75 Error: Undetermined string constants I removed JavaScript include in categories.php that was ment for WYSIWYG Editor - THIS REMOVED error message, but also removed WYSIWYG Editor. Is there a way to use WYSIWYG Editor and display Categories e.t.c. in UTF-8 ? Quote Link to comment Share on other sites More sharing options...
♥Antonio Garcia Posted September 16, 2005 Share Posted September 16, 2005 I have exactly the same problem and it drives me crazy. Using tables in emails and newsletters causes large white areas before the table. It looks nice just before you hit the 'send email' button, but when it arrives in your mailbox its very long and stretched. What's wrong, please somebody help? I'm ashamed to send this to my customers, but right now I have to... <{POST_SNAPBACK}> Hello, I found the solution of 'long and stretched' newsletters... Please see in this forum Solution for stretched newsletters I found a solution for the newsletter in oscommerc. If you want include a sheet in the newsletter, you have a problem. You can solve it by that : function add_html($html, $text = NULL, $images_dir = NULL) { ############### Changed "################ // $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br>', $html); $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), ' ',$html); // $this->html = $html; // ############## End changed ########### I hope it helps. Antonio Quote Link to comment Share on other sites More sharing options...
♥Antonio Garcia Posted September 16, 2005 Share Posted September 16, 2005 ... and If you have se same problem (long and stretched newletters) when you try to 'Preview' them, please change this: In admin/newsletters.php find: <td><tt><?php echo nl2br($nInfo->content); ?></tt></td> and replace with: <td><tt><?php echo $nInfo->content; ?></tt></td> So, only must erase the function nl2br() to avoid this problem. Antonio Quote Link to comment Share on other sites More sharing options...
idlerob Posted September 21, 2005 Share Posted September 21, 2005 When i add a descrition via the editor it shows over my image and other details, how do i move the description down in the product listing?? you can see what i mean here thanks in advance Quote Link to comment Share on other sites More sharing options...
srober Posted October 30, 2005 Share Posted October 30, 2005 I know this question has been asked many times but I cant seem to get a correct answer and my eyes are very tired. I cannot upload images or create folders. Am I suppose to see something under the Images root? When I installed OSC I did not change anything from default as far as the path is concern. I set my catalog/images to 777 that is correct? Quote Link to comment Share on other sites More sharing options...
johnson4 Posted November 3, 2005 Share Posted November 3, 2005 I've added this great contrabition without a problem. The editor seems to be working in all places .....except the product desctiption. This is because I couldn't find the correct place to add <td class="main"><?php include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFINE_MAINPAGE); ?></td> in step 1.5 I believe it's because of my OSc version being old, but is there a way to add step 1.5 to my default.php Can it be done without upgrading OSc? Here it is: <?php require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'top'; if ($cPath) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . $current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . $current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); $location = ''; ?> <!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 (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="<?php echo (getenv('HTTP') ? HTTP_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . "stylesheet.php" ; ?>"> </head> <body marginwidth="0" marginheight="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 = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $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 width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td align="right"><?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 (($HTTP_GET_VARS['cPath']) && (ereg('_', $HTTP_GET_VARS['cPath']))) { // check to see if there are deeper categories within the current category $category_links = tep_array_reverse($cPath_array); for($i=0; $i<sizeof($category_links); $i++) { $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 = '" . $category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' order by sort_order, cd.categories_name"); if (tep_db_num_rows($categories_query) < 1) { // do nothing, go through the loop } else { 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 = '" . $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' order by sort_order, cd.categories_name"); } $rows = 0; while ($categories = tep_db_fetch_array($categories_query)) { $rows++; $cPath_new = tep_get_path($categories['categories_id']); echo ' <td align="center" class="smallText" width="33%" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' . 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 != tep_db_num_rows($categories_query))) { echo ' </tr>' . "\n"; echo ' <tr>' . "\n"; } } ?> </tr> </table></td> </tr> <tr> <td><?php $new_products_category_id = $current_category_id; include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> </table></td> </tr> </table></td> <?php } elseif ($category_depth == 'products' || $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($column, $value) = each($define_list)) { if ($value) $column_list[] = $column; } $select_column_list = ''; for ($col=0; $col<sizeof($column_list); $col++) { if ( ($column_list[$col] == 'PRODUCT_LIST_BUY_NOW') || ($column_list[$col] == 'PRODUCT_LIST_PRICE') ) { continue; } if ($select_column_list != '') { $select_column_list .= ', '; } switch ($column_list[$col]) { 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; } } if ($select_column_list != '') { $select_column_list .= ', '; } // show the products of a specified manufacturer if ($HTTP_GET_VARS['manufacturers_id']) { if ($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, 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, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . $languages_id . "' and p2c.categories_id = '" . $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, 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, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'"; } // We build the categories-dropdown $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 = '" . $languages_id . "' and p.manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { // show the products in a given categorie if ($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, 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, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . $HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . $languages_id . "' and p2c.categories_id = '" . $current_category_id . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, 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, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . $languages_id . "' and p2c.categories_id = '" . $current_category_id . "'"; } // We build the manufacturers Dropdown $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 = '" . $current_category_id . "' order by m.manufacturers_name"; } if ( (!$HTTP_GET_VARS['sort']) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) ) { for ($col=0; $col<sizeof($column_list); $col++) { if ($column_list[$col] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $col+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); if ($sort_col <= sizeof($column_list)) { $listing_sql .= ' order by '; switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= "p.products_model " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? "desc" : ""); break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= "pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= "final_price " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; } } else { for ($col=0; $col<sizeof($column_list); $col++) { if ($column_list[$col] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $col . 'a'; $listing_sql .= " order by pd.products_name"; break; } } } } ?> <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"> <form> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <?php // optional Product List Filter if (PRODUCT_LIST_FILTER) { $filterlist = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist) > 1) { echo ' <td align="center" class="main">' . TEXT_SHOW . '<select size="1" onChange="if(options[selectedIndex].value) window.location.href=(options[selectedIndex].value)">'; if ($HTTP_GET_VARS['manufacturers_id']) { $arguments = 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']; } else { $arguments = 'cPath=' . $cPath; } $arguments .= '&sort=' . $HTTP_GET_VARS['sort']; $option_url = tep_href_link(FILENAME_DEFAULT, $arguments, 'NONSSL'); if (!$HTTP_GET_VARS['filter_id']) { echo '<option value="' . $option_url . '" SELECTED>' . TEXT_ALL . '</option>'; } else { echo '<option value="' . $option_url . '">' . TEXT_ALL . '</option>'; } echo '<option value="">---------------</option>'; while ($filterlist_values = tep_db_fetch_array($filterlist)) { $option_url = tep_href_link(FILENAME_DEFAULT, $arguments . '&filter_id=' . $filterlist_values['id'], 'NONSSL'); if ( ($HTTP_GET_VARS['filter_id']) && ($HTTP_GET_VARS['filter_id'] == $filterlist_values['id']) ) { echo '<option value="' . $option_url . '" SELECTED>' . $filterlist_values['name'] . '</option>'; } else { echo '<option value="' . $option_url . '">' . $filterlist_values['name'] . '</option>'; } } echo '</select></td>' . "\n"; } } // Get the right image for the top-right $image = DIR_WS_IMAGES . 'table_background_list.gif'; if ($HTTP_GET_VARS['manufacturers_id']) { $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $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 = '" . $current_category_id . "'"); $image = tep_db_fetch_array($image); $image = $image['categories_image']; } ?> <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </form> </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 width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td align="right"></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="0"> <tr> <td class="main"><?php echo tep_customer_greeting(); ?></td> </tr> <tr> </tr> <tr> <td><br><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </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'); ?--> Im extremely new, so thanks for bareing with me. Quote Link to comment Share on other sites More sharing options...
johnson4 Posted November 9, 2005 Share Posted November 9, 2005 I've added this great contrabition without a problem.The editor seems to be working in all places .....except the product desctiption. This is because I couldn't find the correct place to add <td class="main"><?php include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFINE_MAINPAGE); ?></td> in step 1.5 I believe it's because of my OSc version being old, but is there a way to add step 1.5 to my default.php Can it be done without upgrading OSc? Here it is: <?php require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'top'; if ($cPath) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . $current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . $current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); $location = ''; ?> <!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 (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="<?php echo (getenv('HTTP') ? HTTP_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . "stylesheet.php" ; ?>"> </head> <body marginwidth="0" marginheight="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 = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $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 width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td align="right"><?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 (($HTTP_GET_VARS['cPath']) && (ereg('_', $HTTP_GET_VARS['cPath']))) { // check to see if there are deeper categories within the current category $category_links = tep_array_reverse($cPath_array); for($i=0; $i<sizeof($category_links); $i++) { $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 = '" . $category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' order by sort_order, cd.categories_name"); if (tep_db_num_rows($categories_query) < 1) { // do nothing, go through the loop } else { 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 = '" . $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' order by sort_order, cd.categories_name"); } $rows = 0; while ($categories = tep_db_fetch_array($categories_query)) { $rows++; $cPath_new = tep_get_path($categories['categories_id']); echo ' <td align="center" class="smallText" width="33%" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' . 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 != tep_db_num_rows($categories_query))) { echo ' </tr>' . "\n"; echo ' <tr>' . "\n"; } } ?> </tr> </table></td> </tr> <tr> <td><?php $new_products_category_id = $current_category_id; include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> </table></td> </tr> </table></td> <?php } elseif ($category_depth == 'products' || $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($column, $value) = each($define_list)) { if ($value) $column_list[] = $column; } $select_column_list = ''; for ($col=0; $col<sizeof($column_list); $col++) { if ( ($column_list[$col] == 'PRODUCT_LIST_BUY_NOW') || ($column_list[$col] == 'PRODUCT_LIST_PRICE') ) { continue; } if ($select_column_list != '') { $select_column_list .= ', '; } switch ($column_list[$col]) { 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; } } if ($select_column_list != '') { $select_column_list .= ', '; } // show the products of a specified manufacturer if ($HTTP_GET_VARS['manufacturers_id']) { if ($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, 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, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . $languages_id . "' and p2c.categories_id = '" . $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, 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, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'"; } // We build the categories-dropdown $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 = '" . $languages_id . "' and p.manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { // show the products in a given categorie if ($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, 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, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . $HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . $languages_id . "' and p2c.categories_id = '" . $current_category_id . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, 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, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . $languages_id . "' and p2c.categories_id = '" . $current_category_id . "'"; } // We build the manufacturers Dropdown $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 = '" . $current_category_id . "' order by m.manufacturers_name"; } if ( (!$HTTP_GET_VARS['sort']) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) ) { for ($col=0; $col<sizeof($column_list); $col++) { if ($column_list[$col] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $col+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); if ($sort_col <= sizeof($column_list)) { $listing_sql .= ' order by '; switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= "p.products_model " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? "desc" : ""); break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= "pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= "final_price " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name"; break; } } else { for ($col=0; $col<sizeof($column_list); $col++) { if ($column_list[$col] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $col . 'a'; $listing_sql .= " order by pd.products_name"; break; } } } } ?> <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"> <form> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <?php // optional Product List Filter if (PRODUCT_LIST_FILTER) { $filterlist = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist) > 1) { echo ' <td align="center" class="main">' . TEXT_SHOW . '<select size="1" onChange="if(options[selectedIndex].value) window.location.href=(options[selectedIndex].value)">'; if ($HTTP_GET_VARS['manufacturers_id']) { $arguments = 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']; } else { $arguments = 'cPath=' . $cPath; } $arguments .= '&sort=' . $HTTP_GET_VARS['sort']; $option_url = tep_href_link(FILENAME_DEFAULT, $arguments, 'NONSSL'); if (!$HTTP_GET_VARS['filter_id']) { echo '<option value="' . $option_url . '" SELECTED>' . TEXT_ALL . '</option>'; } else { echo '<option value="' . $option_url . '">' . TEXT_ALL . '</option>'; } echo '<option value="">---------------</option>'; while ($filterlist_values = tep_db_fetch_array($filterlist)) { $option_url = tep_href_link(FILENAME_DEFAULT, $arguments . '&filter_id=' . $filterlist_values['id'], 'NONSSL'); if ( ($HTTP_GET_VARS['filter_id']) && ($HTTP_GET_VARS['filter_id'] == $filterlist_values['id']) ) { echo '<option value="' . $option_url . '" SELECTED>' . $filterlist_values['name'] . '</option>'; } else { echo '<option value="' . $option_url . '">' . $filterlist_values['name'] . '</option>'; } } echo '</select></td>' . "\n"; } } // Get the right image for the top-right $image = DIR_WS_IMAGES . 'table_background_list.gif'; if ($HTTP_GET_VARS['manufacturers_id']) { $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $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 = '" . $current_category_id . "'"); $image = tep_db_fetch_array($image); $image = $image['categories_image']; } ?> <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </form> </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 width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td align="right"></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="0"> <tr> <td class="main"><?php echo tep_customer_greeting(); ?></td> </tr> <tr> </tr> <tr> <td><br><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </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'); ?--> Im extremely new, so thanks for bareing with me. Anybody have an idea about this? Quote Link to comment Share on other sites More sharing options...
Drako Posted November 26, 2005 Share Posted November 26, 2005 Hi there! very Very Useful Contribution, save me a lot of work and is working just fine! I've searched the forum for this but i've not found nothing: someone did successfully integrated Admin Commet Toolbar with this editor. It's anoying to write the same thing every time.... If somebody have a clue... BYE! Quote my contribution: Alex's Contributions Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.