Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 11 votes

How Do I ...? All the basic install questions regularly asked...


562 replies to this topic

#481 adamantasaurus

  • Community Member
  • 8 posts
  • Real Name:Adamanto

Posted 25 November 2010, 03:22

Ignore my last post I figured out the color, but I still can't figure out why it wont change the background to a picture, I put my picture in the images folder, and then put in a background-image: ; tag in the css and it doesnt work I thought it might of been the size but I tried smalled pics and it still didn't work..

I would really appreciate your help..

Thanks

Adamanto

#482 adamantasaurus

  • Community Member
  • 8 posts
  • Real Name:Adamanto

Posted 30 November 2010, 06:02

Hello for some reason when I installed oscommerce the catalouge link does not work it just directs me towards my homepage instead of the catalouge page is there a way to fix that??

thanks

#483 seriousbbs

  • Community Member
  • 7 posts
  • Real Name:Lauren

Posted 02 December 2010, 23:31

While trying to edit my index i deleted it by accident. Im new to this. How do i get the code back?

Thank you

#484 ogwinilo

  • Community Member
  • 150 posts
  • Real Name:Felix
  • Gender:Male

Posted 04 December 2010, 05:03

I have been changing my stylesheet file with new background colours etc,. At the bottom of the pages where buttons appear as well as when I call on the 'contact us' page, that area becomes black, instead of these having background colour of choice.
How can I be helped?

Regards

Felix

#485 mrblack66

  • Community Member
  • 2 posts
  • Real Name:Darryl

Posted 04 December 2010, 18:54

View Posthauruapai, on 30 August 2007, 14:22, said:

Here is a “How Do I …?” list for the basic questions that get asked in this forum. After spending a lot of time searching for this list, and realising that the same things are asked over and over, I thought I would put this list here with answers to make it easier for others to find!

Maybe this could get pinned to make it easy to find and others could add to this list their How do I...? with the ANSWER!

How Do I ……

1. … Change the OsCommerce in the Title?
Log into the admin then go to Configuration > My Store and edit Store Name

2. … Change the What’s New Here on the front page?
Go to catalog/includes/languages/English/index.php
Find the following line and change it to what you want it to say
  define('HEADING_TITLE', 'What\'s New Here?');

3. … Change the Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account on the front page?
Go to catalog/includes/languages/English/index.php
Find the following line and change it to what you want it to say [code define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s"><u>log yourself in</u></a>? Or would you prefer to <a href="%s"><u>create an account</u></a>?'); [/code]

4. … Change the default text on the front page?
Go to catalog/includes/languages/English/index.php
Find the following line that starts with the following (about line 13 – usually the first one ) and change it to what you want it to say
  define('HEADING_TITLE', 'TEXT_MAIN', 'This is a default setup  ……  . PROJECT_VERSION . '</b></font>.');');

An easier way to do this is to install the contribution Define MainPage then you can change the default text whenever you like through the Admin section

5. … Remove the ??? box from the left / right side?
Go to catalog/includes/column_left.php OR column_right.php and put // in front of the line with the box name that you want to remove.

An easier way is to install the contribution InfoBox Admin which will let you remove the boxes, move them to the other column through clicking buttons through the admin. You can also add other boxes easily through this as well.

6. … Move the ??? box from the left / right side?
Go to catalog/includes/column_left.php OR column_right.php and put // in front of the line with the box name that you want to remove. Copy that line then add it into the other file where you want it to be.

An easier way is to install the contribution InfoBox Admin which will let you remove the boxes, move them to the other column through clicking buttons through the admin. You can also add other boxes easily through this as well.

7. … Add the ??? box from the left / right side?
Go to catalog/includes/column_left.php OR column_right.php and copy a line then change it into the file that you want to add.

An easier way is to install the contribution InfoBox Admin which will let you remove the boxes, move them to the other column through clicking buttons through the admin. You can also add other boxes easily through this as well.

8. … Remove / Add the rounded corners to the info boxes on the left or right columns?
Go to catalog/includes/boxes and open the corresponding file name for the box you want to change. Here is the code that will change this – look for the line that you have (eg left rounded) then change it to what you want it to be.

No rounded corners
 new infoBoxHeading($info_box_contents, false, false);

Right rounded corner
 new infoBoxHeading($info_box_contents, false, true);

Left rounded corner
 new infoBoxHeading($info_box_contents, true, false);

Both rounded corners
 new infoBoxHeading($info_box_contents, true, true);

9. … Remove / Add the rounded corners to the info boxes in the middle part of the page? (eg: New Products for MONTH)
Go to catalog/includes/modules and open the corresponding file name for the box you want to change. Change the following code to the one above that you want.
 new contentBoxHeading($info_box_contents);


10. … Change the default text ???? on the ???? page
Go to catalog/includes/language/YourLanguage/ and choose the filename with the same name as the page you want to change. Look for the text in there that you want to change

11. … Change the Title in the ???? Box?
Go to catalog/includes/English.php and find the line where NAME_OF_BOX is the box you want to change and Title of Box is the title that is showing and change the Title of Box to what you want
 define('BOX_HEADING_NAME_OF_BOX, 'Title of Box');

12. … Remove the Top from the breadcrumb?
Go to catalog/includes/application_top.php and put // in front of the following line (around 482)
 $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

13. … Change Top or the Catalog on the breadcrumb?
Go to catalog/includes/English.php and find the following lines and make the changes as necessary
 define('HEADER_TITLE_TOP', 'Top');
define('HEADER_TITLE_CATALOG', 'Catalog');

14. … Change the >> in the breadcrumb?
Go to catalog/includes/header.php and find the following line – about 63 and change the bit that begins after trail that begins with the & and ends in the ; to the character that you want.
 <td class="headerNavigation">  <?php echo $breadcrumb->trail(' & raquo; '); ?></td>

15. … Change the default currency to one that is not USD to get the prices to show?
Go to catalog/includes/languages/English.php and around line 39 find
 define('LANGUAGE_CURRENCY', 'USD');
and change the USD to Currency code that you want to use.

16. … Change the date format to DD/MM/YYYY?
Go to catalog/includes/languages/English.php and around line 21
 
define('DATE_FORMAT_SHORT', '%m/%d/%Y');  // this is used for strftime()
change it to
 
define('DATE_FORMAT_SHORT', '%d/%m/%Y');  // this is used for strftime()

Then around line 23 find this
 define('DATE_FORMAT', 'm/d/Y'); // this is used for date()
and change it to
 define('DATE_FORMAT', 'd/m/Y'); // this is used for date()

You also need to make the same changes in catalog/ADMIN/includes/languages/English.php

17. How do I change the font / colour / size?
Go to catalog/includes/stylesheet.css and make the changes in there for the main site.
Go to catalog/admin/includes/stylesheet.css and make the changes in there for the admin section.

Happy coding! :D


#486 mrblack66

  • Community Member
  • 2 posts
  • Real Name:Darryl

Posted 04 December 2010, 18:59

Where do I find this file catalog/includes/ .... I need to get help on changing the banner, editing privacy page and all the others....I've done everthing from adding products and catergories, shipping, language but I need help on the profile of the store page doing all the editing of banner, privacy, shipping, pages.

#487 DunWeb

  • Community Sponsor
  • 10,423 posts
  • Real Name:Chris Dunn
  • Gender:Male
  • Location:Tecumseh, Ontario, Canada N8N 1X8

Posted 04 December 2010, 19:14

Darryl,


Edit the header banner on OSC versions prior to v2.3.1 has to be done by editing the code in the header.php file. That file is located at [catalog]/includes/header.php

MAKE A BACKUP BEFORE EDITING PAGES

Use your FTP program to locate the file on the server and download a copy to your local machine. Use a good text editor to change the code: (Editplus, Notepad++, Vim)

This is the code for the image:

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></td>

Change store_logo.png to your image file name and then upload the file back to your server.

Then, use your FTP to upload your new header banner image to the /images directory on your server.

That's it. The new image will appear in the header on the store.


Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:

:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:

#488 SantiagoLLC

  • Community Member
  • 19 posts
  • Real Name:Michael Sally

Posted 06 December 2010, 21:52

I want to center the product images, what file and how do I chang them?

#489 ErikMM

  • Community Member
  • 204 posts
  • Real Name:Erik M
  • Gender:Male

Posted 09 December 2010, 06:24

View Postadamantasaurus, on 30 November 2010, 06:02, said:

Hello for some reason when I installed oscommerce the catalouge link does not work it just directs me towards my homepage instead of the catalouge page is there a way to fix that??

thanks

change the DirectoryIndex to read DirectoryIndex /catalog/index.php via .htaccess

or

Replace your old "index" in the root folder with the new index.php.
Then add:

&lt;?
Header("Location: catalog/index.php");
?>
<p><span style="color: #FF0000"><a class="bbc_url" href="http://forums.oscommerce.com/topic/368458-231-a-how-to-road-mapno-questions-just-how-tos-please/page__view__findpost__p__1552428" title="">2.3.1 A How To Road Map</a></span> | <a class="bbc_url" href="http://forums.oscommerce.com/topic/307356-oscommerce-road-map-for-the-newbies/" title="">Another Newbie Road Map</a> | <a class="bbc_url" href="http://forums.oscommerce.com/index.php?showtopic=139426" title="">Basic oSc design</a> | <a class="bbc_url" href="http://forums.oscommerce.com/index.php?showtopic=177838" title="">How to Make a Horrible Website</a> | <a class="bbc_url" href="http://forums.oscommerce.com/topic/233458-how-to-install-ssl-on-osc-a-simple-1-2-3-instruction/" title="">SSL made simple</a> | <strong>Web Developer</strong> and Firebug are powerful free tools for web design.<br />
<br />
the consent theory of government is &quot;the universal demolisher of all governments, but not the builder of any.&quot;<br />
outside links in url's not allowed, thank you

#490 ErikMM

  • Community Member
  • 204 posts
  • Real Name:Erik M
  • Gender:Male

Posted 09 December 2010, 06:35

View Postmrblack66, on 04 December 2010, 18:59, said:

Where do I find this file catalog/includes/ .... I need to get help on changing the banner, editing privacy page and all the others....I've done everthing from adding products and catergories, shipping, language but I need help on the profile of the store page doing all the editing of banner, privacy, shipping, pages.
if you have 2.3.1 it can be done really easily/automatically in your Admin control panel under configuration, store logo
<p><span style="color: #FF0000"><a class="bbc_url" href="http://forums.oscommerce.com/topic/368458-231-a-how-to-road-mapno-questions-just-how-tos-please/page__view__findpost__p__1552428" title="">2.3.1 A How To Road Map</a></span> | <a class="bbc_url" href="http://forums.oscommerce.com/topic/307356-oscommerce-road-map-for-the-newbies/" title="">Another Newbie Road Map</a> | <a class="bbc_url" href="http://forums.oscommerce.com/index.php?showtopic=139426" title="">Basic oSc design</a> | <a class="bbc_url" href="http://forums.oscommerce.com/index.php?showtopic=177838" title="">How to Make a Horrible Website</a> | <a class="bbc_url" href="http://forums.oscommerce.com/topic/233458-how-to-install-ssl-on-osc-a-simple-1-2-3-instruction/" title="">SSL made simple</a> | <strong>Web Developer</strong> and Firebug are powerful free tools for web design.<br />
<br />
the consent theory of government is &quot;the universal demolisher of all governments, but not the builder of any.&quot;<br />
outside links in url's not allowed, thank you

#491 ErikMM

  • Community Member
  • 204 posts
  • Real Name:Erik M
  • Gender:Male

Posted 09 December 2010, 06:42

View Postseriousbbs, on 02 December 2010, 23:31, said:

While trying to edit my index i deleted it by accident. Im new to this. How do i get the code back?

Thank you
1. hard lesson learned...back up the code in word pad or word pad plus...as well as back ups in admin

2. 2.3.1 catalog/index is below (I save the originals, and the new one as well with the suffix original, and new1, new2, new3 etc.)

<?php
/*
  $Id$
  $Mod: Modular Front Page 201111 Kymation $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

// the following cPath references come from application_top.php
  $category_depth = 'top';
  if (isset($cPath) && tep_not_null($cPath)) {
    $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
    $categories_products = tep_db_fetch_array($categories_products_query);
    if ($categories_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 = '" . (int)$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);

  require(DIR_WS_INCLUDES . 'template_top.php');

  if ($category_depth == 'nested') {
    $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
    $category = tep_db_fetch_array($category_query);
?>

<h1><?php echo $category['categories_name']; ?></h1>

<div class="contentContainer">
  <div class="contentText">
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>



<?php
    if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
      $category_links = array_reverse($cPath_array);
      for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
        $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
        $categories = tep_db_fetch_array($categories_query);
        if ($categories['total'] < 1) {
          // do nothing, go through the loop
        } else {
          $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
          break; // we've found the deepest category the customer is in
        }
      }
    } else {
      $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
    }

    $number_of_categories = tep_db_num_rows($categories_query);

    $rows = 0;
    while ($categories = tep_db_fetch_array($categories_query)) {
      $rows++;
      $cPath_new = tep_get_path($categories['categories_id']);
      $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
      echo '        <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories['categories_name'] . '</a></td>' . "\n";
      if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
        echo '      </tr>' . "\n";
        echo '      <tr>' . "\n";
      }
    }

// needed for the new products module shown below
    $new_products_category_id = $current_category_id;
?>
      </tr>
    </table>

    <br />

<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>

  </div>
</div>

<?php
  } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
// create column list
    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                         'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
                         'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
                         'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
                         'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
                         'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
                         'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
                         'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

    asort($define_list);

    $column_list = array();
    reset($define_list);
    while (list($key, $value) = each($define_list)) {
      if ($value > 0) $column_list[] = $key;
    }

    $select_column_list = '';

    for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
      switch ($column_list[$i]) {
        case 'PRODUCT_LIST_MODEL':
          $select_column_list .= 'p.products_model, ';
          break;
        case 'PRODUCT_LIST_NAME':
          $select_column_list .= 'pd.products_name, ';
          break;
        case 'PRODUCT_LIST_MANUFACTURER':
          $select_column_list .= 'm.manufacturers_name, ';
          break;
        case 'PRODUCT_LIST_QUANTITY':
          $select_column_list .= 'p.products_quantity, ';
          break;
        case 'PRODUCT_LIST_IMAGE':
          $select_column_list .= 'p.products_image, ';
          break;
        case 'PRODUCT_LIST_WEIGHT':
          $select_column_list .= 'p.products_weight, ';
          break;
      }
    }

// show the products of a specified manufacturer
    if (isset($HTTP_GET_VARS['manufacturers_id'])) {
      if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
        $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
      } else {
// We show them all
        $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
      }
    } else {
// show the products in a given categorie
      if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
        $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
      } else {
// We show them all
        $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
      }
    }

    if ( (!isset($HTTP_GET_VARS['sort'])) || (!preg_match('/^[1-8][ad]$/', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
      for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
        if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
          $HTTP_GET_VARS['sort'] = $i+1 . 'a';
          $listing_sql .= " order by pd.products_name";
          break;
        }
      }
    } else {
      $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
      $sort_order = substr($HTTP_GET_VARS['sort'], 1);

      switch ($column_list[$sort_col-1]) {
        case 'PRODUCT_LIST_MODEL':
          $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_NAME':
          $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
          break;
        case 'PRODUCT_LIST_MANUFACTURER':
          $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_QUANTITY':
          $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_IMAGE':
          $listing_sql .= " order by pd.products_name";
          break;
        case 'PRODUCT_LIST_WEIGHT':
          $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_PRICE':
          $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
      }
    }

    $catname = HEADING_TITLE;
    if (isset($HTTP_GET_VARS['manufacturers_id'])) {
      $image = tep_db_query("select manufacturers_image, manufacturers_name as catname from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
      $image = tep_db_fetch_array($image);
      $catname = $image['catname'];
    } elseif ($current_category_id) {
      $image = tep_db_query("select c.categories_image, cd.categories_name as catname from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
      $image = tep_db_fetch_array($image);
      $catname = $image['catname'];
    }
?>

<h1><?php echo $catname; ?></h1>

<div class="contentContainer">

<?php
// optional Product List Filter
    if (PRODUCT_LIST_FILTER > 0) {
      if (isset($HTTP_GET_VARS['manufacturers_id'])) {
        $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
      } else {
        $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
      }
      $filterlist_query = tep_db_query($filterlist_sql);
      if (tep_db_num_rows($filterlist_query) > 1) {
        echo '<div>' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . '<p align="right">' . TEXT_SHOW . '&nbsp;';
        if (isset($HTTP_GET_VARS['manufacturers_id'])) {
          echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
          $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
        } else {
          echo tep_draw_hidden_field('cPath', $cPath);
          $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
        }
        echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
        while ($filterlist = tep_db_fetch_array($filterlist_query)) {
          $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
        }
        echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
        echo tep_hide_session_id() . '</p></form></div>' . "\n";
      }
    }

    include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);
?>

</div>

<?php
  } else { // default page
?>

<div class="contentContainer">

<?php echo $oscTemplate->getBlocks('front_page'); ?>

</div>

<?php
  }

  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

<p><span style="color: #FF0000"><a class="bbc_url" href="http://forums.oscommerce.com/topic/368458-231-a-how-to-road-mapno-questions-just-how-tos-please/page__view__findpost__p__1552428" title="">2.3.1 A How To Road Map</a></span> | <a class="bbc_url" href="http://forums.oscommerce.com/topic/307356-oscommerce-road-map-for-the-newbies/" title="">Another Newbie Road Map</a> | <a class="bbc_url" href="http://forums.oscommerce.com/index.php?showtopic=139426" title="">Basic oSc design</a> | <a class="bbc_url" href="http://forums.oscommerce.com/index.php?showtopic=177838" title="">How to Make a Horrible Website</a> | <a class="bbc_url" href="http://forums.oscommerce.com/topic/233458-how-to-install-ssl-on-osc-a-simple-1-2-3-instruction/" title="">SSL made simple</a> | <strong>Web Developer</strong> and Firebug are powerful free tools for web design.<br />
<br />
the consent theory of government is &quot;the universal demolisher of all governments, but not the builder of any.&quot;<br />
outside links in url's not allowed, thank you

#492 birdrockdesigns

  • Community Member
  • 77 posts
  • Real Name:Dave

Posted 14 December 2010, 21:48

View PostSantiagoLLC, on 06 December 2010, 21:52, said:

I want to center the product images, what file and how do I chang them?

You can do these in CSS. (should be stylesheet.css)

First, look at your store in the web browser, then 'view source'. Find the code where the pictures are for each product - should be either a <div> or a <td> with a class name.

Then go to your stylesheet and create styles for that class name.

For example:

.product-image-holder img {
    margin: 0 auto;
    text-align: center;
}

See if that works.

#493 jack_frost

  • Community Member
  • 180 posts
  • Real Name:Jesper

Posted 05 January 2011, 14:56

Hi!

Is it possible to add the Order ID to the Invoice somehow?.

Ive tried but with no success .__.

#494 FIMBLE

  • Community Member
  • 6,567 posts
  • Real Name:Nic
  • Gender:Male

Posted 05 January 2011, 17:46

View Postjack_frost, on 05 January 2011, 14:56, said:

Hi!

Is it possible to add the Order ID to the Invoice somehow?.

Ive tried but with no success .__.

Yes...
Back up the files first ....

open the file admin / invoice.php
Find around line 56
          <tr>
            <td class="main"><?php echo '<a href="[email=""]mailto:'[/email] . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td>
          </tr>

add below it..

           <tr>
            <td><b><?php echo ORDER_INVOICE_NUMBER; ?>&nbsp; <?php echo  $oID; ?></b></td>
           </tr>

Save your file and close.

Open file
admin / includes / languages / english / invoice.php (do this for each language you have) & add before the final ?>

define('ORDER_INVOICE_NUMBER', 'Order Number');

Thats it.
regards
Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#495 jack_frost

  • Community Member
  • 180 posts
  • Real Name:Jesper

Posted 10 January 2011, 11:01

View PostFIMBLE, on 05 January 2011, 17:46, said:

Yes...
Back up the files first ....

open the file admin / invoice.php
Find around line 56
          <tr>
            <td class="main"><?php echo '<a href="[email=""]mailto:'[/email] . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td>
          </tr>

add below it..

           <tr>
            <td><b><?php echo ORDER_INVOICE_NUMBER; ?>&nbsp; <?php echo  $oID; ?></b></td>
           </tr>

Save your file and close.

Open file
admin / includes / languages / english / invoice.php (do this for each language you have) & add before the final ?>

define('ORDER_INVOICE_NUMBER', 'Order Number');

Thats it.
regards
Nic

Thanks a lot! - Worked like a charm!


Another little question!

When i am looking at a product, like this:

Link to the product i would very much like the site to be called the name of the Product. So instead of "Fatima - Goth - Punk - Metal" it would say "Top Pinstriped"

How do i achieve this?

Right now, i have spicified <title>Fatima - Goth - Punk - Metal!</title> in all th major php files (Contact_us, Index, Conditions) but im not sure this is the right, or ever a good way to spicify the title in OsC?


Best Regards.

- Jack

#496 FIMBLE

  • Community Member
  • 6,567 posts
  • Real Name:Nic
  • Gender:Male

Posted 10 January 2011, 11:16

Hi Jack, 

Header Tags SEO can do this, you can get it from the add ons section

Nic


Sometimes you're the dog and sometimes the lamp post

My Contributions

#497 shandor

  • Community Member
  • 1 posts
  • Real Name:Shannon Williams

Posted 11 January 2011, 19:26

View Posthauruapai, on 30 August 2007, 14:22, said:

Here is a “How Do I …?” list for the basic questions that get asked in this forum. After spending a lot of time searching for this list, and realising that the same things are asked over and over, I thought I would put this list here with answers to make it easier for others to find!

Maybe this could get pinned to make it easy to find and others could add to this list their How do I...? with the ANSWER!

How Do I ……

1. … Change the OsCommerce in the Title?
Log into the admin then go to Configuration > My Store and edit Store Name

2. … Change the What’s New Here on the front page?
Go to catalog/includes/languages/English/index.php
Find the following line and change it to what you want it to say
  define('HEADING_TITLE', 'What\'s New Here?');

3. … Change the Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account on the front page?
Go to catalog/includes/languages/English/index.php
Find the following line and change it to what you want it to say [code define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s"><u>log yourself in</u></a>? Or would you prefer to <a href="%s"><u>create an account</u></a>?'); [/code]

4. … Change the default text on the front page?
Go to catalog/includes/languages/English/index.php
Find the following line that starts with the following (about line 13 – usually the first one ) and change it to what you want it to say
  define('HEADING_TITLE', 'TEXT_MAIN', 'This is a default setup  ……  . PROJECT_VERSION . '</b></font>.');');

An easier way to do this is to install the contribution Define MainPage then you can change the default text whenever you like through the Admin section

5. … Remove the ??? box from the left / right side?
Go to catalog/includes/column_left.php OR column_right.php and put // in front of the line with the box name that you want to remove.

An easier way is to install the contribution InfoBox Admin which will let you remove the boxes, move them to the other column through clicking buttons through the admin. You can also add other boxes easily through this as well.

6. … Move the ??? box from the left / right side?
Go to catalog/includes/column_left.php OR column_right.php and put // in front of the line with the box name that you want to remove. Copy that line then add it into the other file where you want it to be.

An easier way is to install the contribution InfoBox Admin which will let you remove the boxes, move them to the other column through clicking buttons through the admin. You can also add other boxes easily through this as well.

7. … Add the ??? box from the left / right side?
Go to catalog/includes/column_left.php OR column_right.php and copy a line then change it into the file that you want to add.

An easier way is to install the contribution InfoBox Admin which will let you remove the boxes, move them to the other column through clicking buttons through the admin. You can also add other boxes easily through this as well.

8. … Remove / Add the rounded corners to the info boxes on the left or right columns?
Go to catalog/includes/boxes and open the corresponding file name for the box you want to change. Here is the code that will change this – look for the line that you have (eg left rounded) then change it to what you want it to be.

No rounded corners
 new infoBoxHeading($info_box_contents, false, false);

Right rounded corner
 new infoBoxHeading($info_box_contents, false, true);

Left rounded corner
 new infoBoxHeading($info_box_contents, true, false);

Both rounded corners
 new infoBoxHeading($info_box_contents, true, true);

9. … Remove / Add the rounded corners to the info boxes in the middle part of the page? (eg: New Products for MONTH)
Go to catalog/includes/modules and open the corresponding file name for the box you want to change. Change the following code to the one above that you want.
 new contentBoxHeading($info_box_contents);


10. … Change the default text ???? on the ???? page
Go to catalog/includes/language/YourLanguage/ and choose the filename with the same name as the page you want to change. Look for the text in there that you want to change

11. … Change the Title in the ???? Box?
Go to catalog/includes/English.php and find the line where NAME_OF_BOX is the box you want to change and Title of Box is the title that is showing and change the Title of Box to what you want
 define('BOX_HEADING_NAME_OF_BOX, 'Title of Box');

12. … Remove the Top from the breadcrumb?
Go to catalog/includes/application_top.php and put // in front of the following line (around 482)
 $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

13. … Change Top or the Catalog on the breadcrumb?
Go to catalog/includes/English.php and find the following lines and make the changes as necessary
 define('HEADER_TITLE_TOP', 'Top');
define('HEADER_TITLE_CATALOG', 'Catalog');

14. … Change the >> in the breadcrumb?
Go to catalog/includes/header.php and find the following line – about 63 and change the bit that begins after trail that begins with the & and ends in the ; to the character that you want.
 <td class="headerNavigation">  <?php echo $breadcrumb->trail(' & raquo; '); ?></td>

15. … Change the default currency to one that is not USD to get the prices to show?
Go to catalog/includes/languages/English.php and around line 39 find
 define('LANGUAGE_CURRENCY', 'USD');
and change the USD to Currency code that you want to use.

16. … Change the date format to DD/MM/YYYY?
Go to catalog/includes/languages/English.php and around line 21
 
define('DATE_FORMAT_SHORT', '%m/%d/%Y');  // this is used for strftime()
change it to
 
define('DATE_FORMAT_SHORT', '%d/%m/%Y');  // this is used for strftime()

Then around line 23 find this
 define('DATE_FORMAT', 'm/d/Y'); // this is used for date()
and change it to
 define('DATE_FORMAT', 'd/m/Y'); // this is used for date()

You also need to make the same changes in catalog/ADMIN/includes/languages/English.php

17. How do I change the font / colour / size?
Go to catalog/includes/stylesheet.css and make the changes in there for the main site.
Go to catalog/admin/includes/stylesheet.css and make the changes in there for the admin section.

Happy coding! :D


#498 jack_frost

  • Community Member
  • 180 posts
  • Real Name:Jesper

Posted 14 January 2011, 16:22

The SEO i will look into, thanks alot!

Here is Yet another question!

Is it possible to make a change, so that the pictures in "New products in ****" on the index.php get a different size than the pictures in the "Whats New" box?

I would really like to make the pictures on the index.php bigger, but when i do that, the Sidebar grow to!, becouse of tht "Whats New" box (and the "Specials" box)

#499 FIMBLE

  • Community Member
  • 6,567 posts
  • Real Name:Nic
  • Gender:Male

Posted 19 January 2011, 10:57

View Postjack_frost, on 14 January 2011, 16:22, said:

The SEO i will look into, thanks alot!

Here is Yet another question!

Is it possible to make a change, so that the pictures in "New products in ****" on the index.php get a different size than the pictures in the "Whats New" box?

I would really like to make the pictures on the index.php bigger, but when i do that, the Sidebar grow to!, becouse of tht "Whats New" box (and the "Specials" box)


in your catalog / includes / modules / new_products.php
find the entries for SMALL_IMAGE_HEIGHT and SMALL_IMAGE_WIDTH and add after these +50 (or what ever you want it increased by

e.g SMALL_IMAGE_HEIGHT+50 ,SMALL_IMAGE_WIDTH+50)

Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#500 pmnunez

  • Community Member
  • 3 posts
  • Real Name:Paola

Posted 20 January 2011, 18:56

View PostErikMM, on 09 December 2010, 06:24, said:

change the DirectoryIndex to read DirectoryIndex /catalog/index.php via .htaccess

or

Replace your old "index" in the root folder with the new index.php.
Then add:

&lt;?
Header("Location: catalog/index.php");
?>

I have the same problem and this did not work. I also have an error message in Administrator section of the Configuration Tab.. would you mind helping me too.. I am very NEW to this so please use basic and easy terms and hopefully the solution can be easy too?

This is my error message

Additional Protection With htaccess/htpasswdThis osCommerce Online Merchant Administration Tool installation is not additionally secured through htaccess/htpasswd means.
The following files need to be writable by the web server to enable the htaccess/htpasswd security layer:
•/usr/local/psa/home/vhosts/americantruckcrane.com/httpdocs/catalog/admin/.htaccess
•/usr/local/psa/home/vhosts/americantruckcrane.com/httpdocs/catalog/admin/.htpasswd_oscommerce
Reload this page to confirm if the correct file permissions have been set.