Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

johnson4

Archived
  • Posts

    29
  • Joined

  • Last visited

Posts posted by johnson4

  1. I have my categories.php reorganized into div (for at tabbed look) therefore I have <?php require_once( 'attributeManager/includes/attributeManagerPlaceHolder.inc.php' )?> inside a div. All works fine except that the popup prompts (and the "blackout" that appears behind them) is down and to the right about 50px. I've tried making changes to the .css file to move the blackout or the popups, but no luck.

    Does anyone know where/how I can move where this popup appears?

    Thanks for any help, Im loving this Contrib

    ===================EDIT==================================

    Here's what I tried and it almost works(could be about 10 more px to the right but much better)

    in attributesManager.js I commented out lines 291, 292

     	
    newBit.style.left = attributeManagerX;
    newBit.style.top = attributeManagerY;

    and changed starting at 308

    	// work out the center postion for the box
    leftPos = (((attributeManagerW - popupContents.scrollWidth) / 2) + attributeManagerX);
    topPos = (((attributeManagerH - popupContents.scrollHeight) / 2) + attributeManagerY);

    to

    	// work out the center postion for the box
    
    	leftPos = ((attributeManagerW - popupContents.scrollWidth) / 2);
    topPos = ((attributeManagerH - popupContents.scrollHeight) / 2);

    If anyone can comment on a better way to go about this please let me know

  2. I made a file called dbclean.php and put this in it

    <?php
     require('includes/application_top.php');
     $product_deletion_query = tep_db_query("select products_id from from " . TABLE_PRODUCTS . " where products_status = 0");
     while ($product_deletion = tep_db_fetch_array($product_deletion_query)) {
    tep_db_query("delete from " . TABLE_PRODUCTS . " where products_id = '" . $product_deletion['products_id'] . "'");	  
    tep_db_query("delete from " . TABLE_SPECIALS . " where products_id = '" . $product_deletion['products_id'] . "'");  
    tep_db_query("delete from " . TABLE_REVIEWS . " where products_id = '" . $product_deletion['products_id'] . "'");  
    tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $product_deletion['products_id'] . "'");  
    tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where products_id = '" . $product_deletion['products_id'] . "'");  
    tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $product_deletion['products_id'] . "'");  
    tep_db_query("delete from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $product_deletion['products_id'] . "'");  
    
     }
    
    ?>

    I tried to run this file with a crontab but it returned

    Status: 404
    
    Content-type: text/html
    
    X-Powered-By: PHP/4.3.2
    
    
    
    No input file specified.

    and if I go to the file with a browser

    I got this

    1064 - You have an error in your SQL syntax near 'from products where products_status = 0' at line 1
    
    select products_id from from products where products_status = 0
    
    [TEP STOP]

     

    any idea where I went wrong? Im sorry if I've done something obviously wrong, my php/mySQL skils are pretty low.

    Thanks again for any help you can give me

  3. Backup and then try:

     

      $product_deletion_query = tep_db_query("select products_id from from " . TABLE_PRODUCTS . " where products_status = 0");
     while ($product_deletion = tep_db_fetch_array($product_deletion_query)) {
    tep_db_query("delete from " . TABLE_PRODUCTS . " where products_id = '" . $product_deletion['products_id'] . "'");	  
    tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $product_deletion['products_id'] . "'");	  
     }

     

    You will need to add any other relevant product tables within the while loop e.g. products_attributes, products_description etc...

    thanks Ill gove it a shot, If I put this in a php file and add a crontab to my server it should keep things all cleaned up.

    thanks again

  4. I really like this cotrib

    Im just trying to add another function, Delete all Products that are inactive.

    I have a field called "products_status" in my products table and I want to be able to delete all the products that have a status of "0"

    This works of course

    "delete from products where products_status = 0"

    but

    "delete from products_to_categories where products_status = 0"

    doesn't cause "products_status" is not in the"products_to_categories"

    table.

     

    any thought on how to wright the script properly for this?

    thanks for any help

  5. ==========

    while ($categories = tep_db_fetch_array($categories_query)) {

    //echo $categories['parent_id'];

    $parent_id = $categories['parent_id'];

    if ($parent_id==0)

    {

    $categories_array[] = array('id' => $categories['categories_id'],

    'text' => $categories['categories_name']);

    } else {

    $txt=NULL;

    while ($parent_id!=0) {

    //echo $parent_id;

    $category_query = tep_db_query("select a.categories_id,parent_id, b.categories_name from " . TABLE_CATEGORIES . " as a," . TABLE_CATEGORIES_DESCRIPTION . " as b where a.categories_id = b.categories_id and a.categories_id = " . $parent_id . " and b.language_id = " . (int)$language_id . " order by categories_name");

    $category = tep_db_fetch_array($category_query);

    $txt .=$category['categories_name']."->" ;

    $parent_id = $category['parent_id'];

    //die($txt.$parent_id.$category['categories_id']);

    }

    $categories_array[] = array('id' => $categories['categories_id'],

    'text' => $txt.$categories['categories_name']);

    }

    }

     

    just above the piece you posted you should see

    //print_r( $languages);
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
    //echo $languages[$i]['directory'];
    if ($languages[$i]['directory']==$language) $language_id=$languages[$i]['id'];
    }
    $categories_array = array(array('id' => '', 'text' => TEXT_NONE));
    $categories_query = tep_db_query("select a.categories_id,parent_id, b.categories_name from " . TABLE_CATEGORIES . " as a," . TABLE_CATEGORIES_DESCRIPTION . " as b where a.categories_id = b.categories_id and b.language_id = " . (int)$language_id . " order by categories_name");

    I changed the

    (int)$language_id . " order by categories_name");

    at the end to

    (int)$language_id . " order by categories_id");

    and got the result that your looking for.

     

    I've noticed though, that when ever you go beyond 2 sub-categories, they get mixed up in this drop down box. It shows up like,

     subcat1->category->subcat2

    instade of

    category->subcat1->subcat2

    can anyoone help me with this?

  6. Hi,

     

    I have installed the Administration Access Level Accounts 2.2a, I also included the Categorie Admin extension and oliswiss last extension.

     

    .......

     

    My current problem is that in the Admin Member column on the right hand side where you can see the Category Access - the category names are not showing - only the ID.

     

    Eg.

     

    (1)

    (2)

    (3)

     

    instead of something like

     

    Bath (1)

    Face (2)

    Body (3)

    Can anyone tell me why the Category Names may not be showing?

     

    I've just installed Administration Access Level Accounts 2.2 and I'm having the same problem with the catagory ID showing up but not the name.\

    Anyone solved this?

    Thanks in advance

    sj

  7. Im having a strange issue.

    I have 2 catalogs setup with this contrib but both catalog are displaying the catagories that belong to the default store......even though the db shows the correct values in the catagories _to_store table. any idea how this is happening or how I can get the right catagories showing up?

  8. Hello

    Im looking for a payment module that doesn't take my customers outside of my catalog (during the payment proccess) And also sends the payment automaticly to my bank account.

    I have a Visa and MC merchant account if that helps.

    I like the standard credit card payment mod but I would like a system that doesn't require me to call in the payments myself.

    Thanks for any advise.

    sj

  9. I have a catalog being shown in i-frames on 2 different sites, and on one site I would like the left column to never appear.

    Do you know a way to detect the location of the catalog, so that the php will hide the left column if the catalog is being viewed in site 1 and show the left column if the catalog is being viewed in site 2?

    Thanks for any help with this,

    sj

  10. I noticed a "send new password" link on the /admin/customers.php page, but file /admin/password_forgotten.php is not in the contribution. Is this something that is being developed?

    Or is there something I can edit in my /catalog/password_forgotten.php so it will work as /admin/password_forgotten.php?

    Thanks for any advice with this

    sj

  11. Hello All,

     

    I don't know if some one made this payment mod yet but I was wondering if there is one or if some one can wipe up a quick payment mod for my site.

     

    I am canadian and I know that through online banking you can send $$$ to a email address and password protect it.

     

    I was wondering if some one can make or if there is one that if they choose that method of payment it will say...

     

    Pay via Online banking (canadian banks only)

     

    Payment Email Address : [email protected]

    Password to use : blah (example)

     

    Simple but easy.

     

    If there is one or something like this already made point me in the right direction if not please can some one makie this for me..

     

    Thank You,

     

    Check out http://www.oscommerce.com/community/contri...earch,usemybank

  12. Please let me know if Ive missed something here, if this functionality already exists.

    Im using the MOECTOE Suite BETA 1 Manual Order Editor And really loving it.

    Im wondering if it's possible to have the manually entered items added to the customers shopping cart.

     

    When I add items they show up in my customers account history, as if already bought and paid for(which is perfect in most situations) but Id like to expand the functionality to give the admin the option of placing items in a customers shopping cart(so they appear there the next time the customer logs in)

     

    Anyone already doing this?

    Thanks in advance for any help that you can offer.

    sj

     

    ps I posted this question here a couple days ago, but I thought it might be better in this thread.

  13. that would only require a simple additional insert into the customers_basket table.

    Could you be a bit more specific, I'm no expert at php/mysql.

    I assume "customers_basket table" is the database table?

    And I would place the additional insert in the same place (in the php) that the information is being inserted in to the account history table?

     

    Thank you for you patients and help

  14. Please let me know if Ive missed something here, if this functionality already exists.

    Im using the MOECTOE Suite BETA 1 Manual Order Editor And really loving it.

    Im wondering if it's possible to have the manually entered items added to the customers shopping cart.

     

    When I add items they show up in my customers account history, as if already bought and paid for(which is perfect in most situations) but Id like to expand the functionality to give the admin the option of placing items in a customers shopping cart(so they appear there the next time the customer logs in)

     

    Anyone already doing this?

    Thanks in advance for any help that you can offer.

    sj

  15. I m getting this error after installing this contrabution,

    Parse error: parse error, expecting `')'' in /home/httpd/vhosts/nettechglobal.ca/httpdocs/payment/admin/includes/boxes/customers.php on line 26

    Any idea what my problem is ?

    The code I have is this

    <?php
     $heading = array();
     $contents = array();
    
     $heading[] = array('text'  => BOX_HEADING_CUSTOMERS,
    				 'link'  => tep_href_link(FILENAME_CUSTOMERS, 'selected_box=customers'));
    
     if ($selected_box == 'customers') {
    $contents[] = array('text'  => '<a href="' . tep_href_link(FILENAME_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CUSTOMERS_CUSTOMERS . '</a><br>' .
    							   '<a href="' . tep_href_link(FILENAME_ORDERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CUSTOMERS_ORDERS . '</a>'
    								'<br>' . BOX_HEADING_MOECTOE_SUITE . '<br>' .
    							   '<a href="' . tep_href_link(FILENAME_MOECTOE_MANUAL_ENTRY, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_MOECTOE_MANUAL_ENTRY . '</a><br>' .
    							   '<a href="' . tep_href_link(FILENAME_MOECTOE_MANUAL_ENTRY, '', 'NONSSL') . '#new_customer" class="menuBoxContentLink">' . BOX_MOECTOE_CREATE_ACCOUNT . '</a><br>' .
    							   '<em>' . BOX_MOECTOE_AUTHNET_TERMINAL . '</em><br>' . );
     }

     

    Thanks in advance

    SJ

  16. Well, I've solved the tep_array_merge problem by simply defining it to return array_merge. There are still tons of other things to do to get it working and useful. I'm considering just working through all the errors and porting it to the new code base.

     

    Is there an a module that does its features? I need a way to create orders manually like if the customer phones in an order, and be able to process the order through payment gateways, and calculate the shipping through the shopping cart. It looks like this one will do it... if I can get it working. I don't see too much else that does it.

     

    I found an order editor that allow orders to be edited - which I do like, but it doesn't process the payments and you have to find a way to calculate the shipping yourself and it doesn't help at all. This is to be used by someone that knows nothing about computers,so I'm trying to set things up for them to be as simple as possible.

     

    Anybody have a solution here? Im woring throught the same issues

  17. 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?

  18. 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.

×
×
  • Create New...