Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

languages/english/index.php


bbr

Recommended Posts

Hi, i have been trying this for a while but i can admit i am lost. :blush:

 

In the english/index.php i am trying to change the following piece of code:

 

elseif ($category_depth == 'nested') {
 define('HEADING_TITLE', 'Categories');
}
?>

 

Instead of 'Categories' being displayed im trying to get the category title displayed.

 

Any ideas, anyone. Please

Link to comment
Share on other sites

Ok, after a bit more playing i have now come up with this:

 

I think in order to get the Category name displayed instead of just 'CATEGORIES' i need a query.

I have done a small query which looks like this:

 

$categories_name = tep_db_query("select categories_name from categories_description");

 

I think (not sure) i have said that '$categories_name' should get its information from TABLE:categories_description and select only categories_name

 

How am i doing so far?

 

I think i need a little more though.

When someone clicks on the Parent Category in the 'categories box' should i somehow have the 'catgories_id' passed on the link that with the 'categories_name'

to in turn display the category name at the top of the page.??

 

I may just have lost my self with all of that :D

 

I hope it makes sense to someone what im trying to achieve.

 

Just for luck, here is my edited code from: 'language/english/index.php

 

<?php
/*
 $Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
$categories_name = tep_db_query("select categories_name from categories_description");

define('TEXT_MAIN', 'Shop not yet fully fuctional, please come back very soon!');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
 define('HEADING_TITLE', 'Please Select An Item To View Details');
 define('TABLE_HEADING_IMAGE', '');
 define('TABLE_HEADING_MODEL', 'Model');
 define('TABLE_HEADING_PRODUCTS', 'Product Name');
 define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
 define('TABLE_HEADING_QUANTITY', 'Quantity');
 define('TABLE_HEADING_PRICE', 'Price');
 define('TABLE_HEADING_WEIGHT', 'Weight');
 define('TABLE_HEADING_BUY_NOW', 'Buy Now');
 define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
 define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
 define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
 define('TEXT_SHOW', '<b>Show:</b>');
 define('TEXT_BUY', 'Buy 1 \'');
 define('TEXT_NOW', '\' now');
 define('TEXT_ALL_CATEGORIES', 'All Categories');
 define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
 define('HEADING_TITLE', 'What\'s New Here?');
} elseif ($category_depth == 'nested') {
 define('HEADING_TITLE', $categories_name);
}
?>

Link to comment
Share on other sites

There are a couple of contributions that will do that. =)

http://www.oscommerce.com/community/contributions,207 is a great one cause it also helps with search engines

 

http://www.oscommerce.com/community/contributions,1954

http://www.oscommerce.com/community/contributions,2430

http://www.oscommerce.com/community/contributions,1908

 

probably more but i think those are enough choices for you. =)

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...