Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

All Products SEO


231 replies to this topic

#1 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 08 September 2008, 01:59

This is the release of All Products SEO. It is really an update to my previous version, All Products with Images, but like so many contributions lately, that one has been damaged by all of the various changes. So I moved it to a new version and locked it to better control what gets "fixed." This version fixes some problems in my last version of that contribution as well as some introduced by others. It adds several options to admin to allow better control of the display and is setup ready to run with Header Tags SEO.

Jack

#2 dargond

  • Community Member
  • 1 posts
  • Real Name:Michael

Posted 08 September 2008, 07:50

Hi Jack_mcs,

this is the german translation for your Contrib:


define('NAVBAR_TITLE', 'Alle Produkte');
define('HEADING_TITLE', 'Alle Produkte');
define('HEADING_SUB_TEXT','Diesen Text mit der Beschreibung für die Alle Produkte Seite ersetzen.');
define('BOX_INFORMATION_ALLPRODS', 'Alle Produkte anzeigen');
define('TABLE_HEADING_IMAGE', '');
define('TABLE_HEADING_MODEL', 'Produktnr.');
define('TABLE_HEADING_PRODUCTS', 'Produktname');
define('TABLE_HEADING_MANUFACTURER', 'Hersteller');
define('TABLE_HEADING_QUANTITY', 'Anzahl');
define('TABLE_HEADING_PRICE', 'Preis');
define('TABLE_HEADING_WEIGHT', 'Gewicht');
define('TABLE_HEADING_BUY_NOW', 'Jetzt kaufen');
define('TEXT_NO_PRODUCTS', 'In dieser Kategorie gibt es keine Produkte.');


dargond

#3 FWR Media

  • Community Member
  • 6,463 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 08 September 2008, 07:59

All Products SEO is here
Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls

KissMT Dynamic SEO Meta & Canonical Header Tags

KissER Error Handling and Debugging

If you found my post useful please click the green + sign to the right

Please only PM me for paid work.


#4 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 08 September 2008, 11:32

Michael - Thanks for posting that. I'll add it in.

Robert - Thanks for the link. I meant to come back and add that but got sidetracked.

Jack

#5 jhande

  • Community Member
  • 2,050 posts
  • Real Name:Jim Hande
  • Gender:Male
  • Location:White Mountains, NH USA

Posted 08 September 2008, 18:34

Fantastic Jack, thank you for another great contrib! ;)

Uninstalled the old version and had this one up and running in about 10 minutes. Whohoo...

I like how it automatically uses the thumbnail images, no need to set image sizes in Admin (can't). :)

Problem solved regarding the buy now and sold out buttons too, wonderful.

I have 2 questions for you though. :blush:

1) How can we change the color of the first link seperator, both do not display the same as the following links?

2) How can I change the number links from 1 to 1920's | 1930's | 1940's | etc... so that if someone clicked on say 1920's all products from 1920 to 1929 would show?

I'm sure they are probably easy fixes but my brain is fried. :blink:

http://handeshobbies.com/catalog/all-products.php
- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.1 install -

#6 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 09 September 2008, 00:12

View Postjhande, on Sep 8 2008, 02:34 PM, said:

1) How can we change the color of the first link seperator, both do not display the same as the following links?

2) How can I change the number links from 1 to 1920's | 1930's | 1940's | etc... so that if someone clicked on say 1920's all products from 1920 to 1929 would show?
1 - Try changing this at line 88
$firstletter_nav = ' '.ALL_PRODUCTS_SEO_LINK_SEPARATOR;
to
$firstletter_nav = ' <span style="color: #XXXXXX">'.ALL_PRODUCTS_SEO_LINK_SEPARATOR . '</span>';
where XXXXXX is the color code.

2 - Change this line
	   $numbers = array(0 => '0', 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9');
to use the numbers you want like
	   $numbers = array(0 => '1920', 1 => '1930');
I haven't tested either of these so do a backup first.

Jack

#7 jhande

  • Community Member
  • 2,050 posts
  • Real Name:Jim Hande
  • Gender:Male
  • Location:White Mountains, NH USA

Posted 09 September 2008, 12:57

View PostJack_mcs, on Sep 8 2008, 08:12 PM, said:

1 - Try changing this at line 88
$firstletter_nav = ' '.ALL_PRODUCTS_SEO_LINK_SEPARATOR;
to
$firstletter_nav = ' <span style="color: #XXXXXX">'.ALL_PRODUCTS_SEO_LINK_SEPARATOR . '</span>';
where XXXXXX is the color code.
That didn't do it, I even tried the span tag for the table cell and even line 95. I'll keep playing around with it. Where is the ALL_PRODUCTS_SEO_LINK_SEPARATOR defined? Just in the database?

Quote

2 - Change this line
$numbers = array(0 => '0', 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9');
to use the numbers you want like
$numbers = array(0 => '1920', 1 => '1930');
When I changed it to = $numbers = array(0 => '1920', that returned zero results. But when I changed it to $numbers = array(0 => '192', it found products such as 1924 & 1929 so that seemed to work. Which now leads to another question. Is there some way to display to the customer 1920's but have the search function look for 192?

Thank you for your help Jack. ;)
- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.1 install -

#8 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 09 September 2008, 13:42

View Postjhande, on Sep 9 2008, 08:57 AM, said:

That didn't do it, I even tried the span tag for the table cell and even line 95. I'll keep playing around with it. Where is the ALL_PRODUCTS_SEO_LINK_SEPARATOR defined? Just in the database?


When I changed it to = $numbers = array(0 => '1920', that returned zero results. But when I changed it to $numbers = array(0 => '192', it found products such as 1924 & 1929 so that seemed to work. Which now leads to another question. Is there some way to display to the customer 1920's but have the search function look for 192?

Thank you for your help Jack. ;)
ALL_PRODUCTS_SEO_LINK_SEPARATOR is defined in the database - in the configuration table.

I'm sure there is a way to display the items as you want but I would have to play with the code since a solution doesn't come to mind.

Jack

#9 jhande

  • Community Member
  • 2,050 posts
  • Real Name:Jim Hande
  • Gender:Male
  • Location:White Mountains, NH USA

Posted 09 September 2008, 15:40

Thank you Jack

When I get some free time I'll dig through some of my PHP books to see if there's anything regarding how to display the links.

Well I guess adding a color to the separator is out since it's only in the database. Again when I have time I'll play around with it.

Thanks again ;)
- :: Jim :: -
- My Toolbox ~ Adobe Web Bundle & WinMerge | Install ~ osCommerce v2.2 MS2 060817 -
- Not 4 Hire ~ Please DO NOT PM me for help. I really do not have a clue what I am doing! -
- Working on a new 2.3.1 install -

#10 alymirza

  • Community Member
  • 36 posts
  • Real Name:Aly Mirza

Posted 12 September 2008, 12:53

i am having little bit of problem....
i did as mentioned in the file bt i got this pelase check

www.thecricketcompany.com/all-products.php




also the point 7....
You need to have at least one link to the all products page. The more you have,
the better your chances of having the search engines find the page.

//categories.php infobox (RECOMMENDED)
FIND:

new infoBox($info_box_contents);

ADD this BEFORE it:

$info_box_contents[] = array('align' => 'center',
'text' => '<a class="allproductsBox" href="' . tep_href_link(FILENAME_ALLPRODS_SEO, '', 'NONSSL') . '" title="' . BOX_INFORMATION_ALLPRODS_SEO_CATEGORIES . '">' . BOX_INFORMATION_ALLPRODS_SEO_CATEGORIES . '</a>');


We have to add these lines in catalogue/includes/boxes/categories.php?

and its written we have to add above
new infoBox($info_box_contents);
but in my files its
new infoBoxHeading($info_box_contents, true, false);
so will this effect anything?

#11 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 12 September 2008, 13:12

Your first problem is becuase you are using a template so the included file is formatted differently than what is needed for your template. You will need to make the necessary changes to the all-products file for it to display properly. You will find that you will have this problem with any contribution that adds a file to display.

For the second problem, you are looking at the wrong place in the ile. Scroll farther down to find the correct line. Although I'm not sure it will help you since templates like yours usually don't use the infoboxes.

Jack

#12 Grorakel

  • Community Member
  • 9 posts
  • Real Name:vasilis

Posted 14 September 2008, 11:07

hello i have a problem with the character set. I use a shop in Greek. If i click of view all products i see the complett shop in not true characters.
Can i fix this? The shop is Visit My Website

#13 Grorakel

  • Community Member
  • 9 posts
  • Real Name:vasilis

Posted 14 September 2008, 11:33

View PostGrorakel, on Sep 14 2008, 11:07 AM, said:

hello i have a problem with the character set. I use a shop in Greek. If i click of view all products i see the complett shop in not true characters.
Can i fix this? The shop is Visit My Website

i work with FCKeditor is i change the FCKConfig.IncludeGreekEntities = true ; of "false" to see the charakter in code ok than have this problem.
if is of true is not problem.

Extra i have some produkt names in latein and in Greek. At view all products A | B | C | D | ect.
I see the Products with "S" and in Greek with " Σ" not in the self site.

How can i change this?

#14 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 14 September 2008, 12:34

I'm not sure I understand your problem but if I go to your site and click on the All Products page, the error, include(includes/languages/english/all-products.php), is displayed. That means you are missing the all products file in the english directory. That needs to be fixed before working on anything else.

Jack

#15 West One Hosting

  • Community Member
  • 558 posts
  • Real Name:simon
  • Location:North Lincolnshire (UK)

Posted 15 September 2008, 21:31

Hi Jack

I have this installed and it is working so so good.

I also have installed Hide Categories & Products V1 by Spooks ( http://addons.oscommerce.com/info/5907 )

and I need to get this to work with this add-on.

can you help me?

this is the install info for Hide Categories & Products V1 by Spooks:

Hide Categories & Products

For OScommerce2.2 rc1

I searched for a solution for this, solutions I found were either over complex, or poorly done, so this is my solution.

I believe in keeping things as simple as possible & not re-inventing the wheel.
OSC already has functions to hide any product, so I use that for products.
This adds a new entry in the category table (categories_status) so all thats needed on the client side is to add a filter added to sql queries ( and categories_status = 1 ).
This does not allow for per-customer filtering, although I reckon it wouldent be too difficult to add.

Most changes occur in admin/categories.php.  These allow you to change the status of any category & the status of all products within a category.

My site is heavily modified, so you may need to alter this contribution to fit your site.

Added Missing Entry From 1.0 pointed out by stanec.

INSTALLATION

BACKUP - BACKUP - BACKUP 

First apply the following SQL queries with phpMyAdmin

ALTER TABLE `categories` ADD `categories_status` INT( 1 ) NOT NULL DEFAULT '1';
ALTER TABLE `categories` CHANGE `categories_status` `categories_status` INT( 1 ) NOT NULL DEFAULT '0';

Add images to catalog/adim/images

********************************************

In catalog/admin/categories.php

Near Line 42 Find:

	  case 'insert_category':
	  case 'update_category':

Add Before
	case 'setcats':
		if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
		  if (isset($HTTP_GET_VARS['cID'])) {
			tep_set_category_status($HTTP_GET_VARS['cID'], $HTTP_GET_VARS['flag']);
		  }

		  if (USE_CACHE == 'true') {
			tep_reset_cache_block('categories');
			tep_reset_cache_block('also_purchased');
		  }
		}
tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'] . '&cID=' . $HTTP_GET_VARS['cID']));
		break;

Near Line 77 Find:	

		  tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "'");
		}	

Add After:

// BOF Cx Prod Status 
$cxstat = (($HTTP_POST_VARS['cxstat'] <> 9) ? $HTTP_POST_VARS['cxstat'] : '');
$products_query = tep_db_query("select p.products_id, cd.categories_name  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES_DESCRIPTION . " cd  where  p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$categories_id . "' and cd.categories_id = p2c.categories_id");$cnt=0;
	if ($cxstat <> '') {
		while ($products = tep_db_fetch_array($products_query)) { 
		$cnt++;$categories_name = $products['categories_name'];
		tep_set_product_status($products['products_id'], $cxstat);
		}	
		$message = ($cxstat ? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED);	 
		$messageStack->add_session('', 'none');
		$messageStack->add_session('Set ' . $cnt . ' Products In ' . $categories_name . ' To ' . $message, 'success');		
		if (USE_CACHE == 'true') {
						tep_reset_cache_block('categories');
						tep_reset_cache_block('also_purchased');
							  }
		}
// EOF Cx Prod Status	 

Near 777 find:

	  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name");
	} else {
	  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name");
	}

Replace With:

	  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name");
	} else {
	  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name");
	}


Near Line 820 Find:	

				<td class="dataTableContent" align="center">&nbsp;</td>


Replace With

<td class="dataTableContent" align="center" ><?php   // CATEGORY STATUS
	if ($categories['categories_status'] == '1') {
		echo tep_image(DIR_WS_IMAGES . 'icon_status_greenl.gif', IMAGE_ICON_STATUS_GREEN, 12, 12) . '&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setcats&flag=0&cID=' . $categories['categories_id'] . (isset($HTTP_GET_VARS['cPath']) ? '&cPath=' . $HTTP_GET_VARS['cPath'] : '') ) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_lightl.gif', IMAGE_ICON_STATUS_RED_LIGHT, 12, 12) . '</a>';
	  } else {
		echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setcats&flag=1&cID=' . $categories['categories_id'] . (isset($HTTP_GET_VARS['cPath']) ? '&cPath=' . $HTTP_GET_VARS['cPath'] : '') ) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_lightl.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 12, 12) . '</a>' . '&nbsp;&nbsp;' . tep_image(DIR_WS_IMAGES . 'icon_status_redl.gif', IMAGE_ICON_STATUS_RED, 12, 12);			}					 
 ?></td>	

Near Line 950 Find:	


 $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string);

Replace With:

$select_array[] = array('id' => 9, 'text' => 'No Change');
$select_array[] = array('id' => 0, 'text' => 'Set All Inactive');
$select_array[] = array('id' => 1, 'text' => 'Set All Active');
$contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string);
$contents[] = array('text' => '<br>' . TABLE_HEADING_STATUS . ': <b>' . ($cInfo->categories_status ? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED) . '</b>');

Near Line 960 Find:	

$contents[] = array('text' => '<br>' . TEXT_EDIT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"'));

Replace With:

$contents[] = array('text' => '<br>' . TEXT_EDIT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"'));
$contents[] = array('text' => '<br>' . TEXT_CHANGE_PRODUCTS_STATUS . $cInfo->categories_name . '<br>' );
$contents[] = array('align' => 'center', 'text' => tep_draw_pull_down_menu('cxstat', $select_array, 9));

Near Line 990 Find:	

			if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified));	

Add After:

		   $contents[] = array('text' => '<br>' . TABLE_HEADING_STATUS . ': <b>' . ($cInfo->categories_status ? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED) . '</b>');	

************************************************************

In catalog/admin/includes/functions/general

Near 740 Find:

////
// Sets the status of a product on special

Add Before:

////
// Sets the status of a category
  function tep_set_category_status($categories_id, $status) {
	if ($status == '1') {
	  return tep_db_query("update " . TABLE_CATEGORIES . " set categories_status = '1', last_modified = now() where categories_id = '" . (int)$categories_id . "'");
	} elseif ($status == '0') {
	  return tep_db_query("update " . TABLE_CATEGORIES . " set categories_status = '0', last_modified = now() where categories_id = '" . (int)$categories_id . "'");
	} else {
	  return -1;
	}
  }
	
************************************************************

In catalog/admin/includes/languages/english/categories.php

Near 72 After

define('TEXT_PRODUCTS_STATUS', 'Products Status:');

Add:

define('TEXT_CHANGE_PRODUCTS_STATUS', 'Change Status Of All Products In ');


************************************************************

In catalog/index.php

Near 89 Find:

		  $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");

Replace With:

		 $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_status = 1 and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

Near 94 Find:

	  $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");

Replace With:

	 $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_status = 1 and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");


************************************************************

In catalog/includes/boxes/categories.php

Near 73 Find:

  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

Replace With:

  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and c.categories_status = 1 and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

Near 99 Find:

	  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

Replace With:

	  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and c.categories_status = 1 and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

************************************************************

If you have it,

In catalog/includes/boxes/dm_categories.php

Near 236 Find:

		$result = tep_db_query('select c.categories_id, cd.categories_name, c.parent_id from ' . TABLE_CATEGORIES . ' c, ' . TABLE_CATEGORIES_DESCRIPTION . ' cd where c.categories_id = cd.categories_id and cd.language_id="' . (int)$languages_id .'" '.$parent_query.'order by sort_order, cd.categories_name');

Replace With:

		$result = tep_db_query('select c.categories_id, cd.categories_name, c.parent_id from ' . TABLE_CATEGORIES . ' c, ' . TABLE_CATEGORIES_DESCRIPTION . ' cd where c.categories_id = cd.categories_id and c.categories_status = 1 and cd.language_id="' . (int)$languages_id .'" '.$parent_query.'order by sort_order, cd.categories_name');


************************************************************


There may other instances I have missed, the genereral Rule is:

If there is a general tep_db_query including  TABLE_CATEGORIES add the filter:  and categories_status = 1 

If you applied the sql correctly all your existing categories should default to 'active'.

Thanks Simon

osCommerce Version: Online Merchant v2.2 RC 2a - Test Site with: oscommerce-2.2ms2-060817
cPanel Version: 11.23.4-RELEASE - Apache version: 2.0.63 - PHP version: 5.2.5 - MySQL version: 5.0.51a-community - Operating system: Linux

========================================================================


#16 Syros

  • Community Member
  • 8 posts
  • Real Name:Rinus

Posted 05 October 2008, 17:02

first of all: tnx for this contrib, works great for me, except one thing...

If i include the link into catagory's and i click it, the font and color is different then my other links. (not the link itself, the page with all product) eg header.

when i have it with new products etc, the output is good and correct, so the only problem is in the catagory's.

anyone knows how to fix this? i've been messing with my stylesheet, but that didn't really did it (other all-products link work)

sorry if it's not clear, and tnx in advanged

#17 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 05 October 2008, 18:24

The link uses the allproductsBox class. You need to edit that to match the class used by the other links, usually the A class.

Jack

#18 Syros

  • Community Member
  • 8 posts
  • Real Name:Rinus

Posted 05 October 2008, 18:34

View PostJack_mcs, on Oct 5 2008, 08:24 PM, said:

The link uses the allproductsBox class. You need to edit that to match the class used by the other links, usually the A class.

Jack

like i said: sorry if i was confusing :D

I didn't mean the link itself, that works perfect, changed the colors etc, no problem.

But clicked on the link you get the page with: all products. that heading is just different of color and font-type, different then all others.
the other links of all products (what's new, specials) is working fine, and have the right font once open...

tnx again!

#19 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 05 October 2008, 20:45

The code is trying to use the h1 class from Header Tags. I will fix that in the next release but just add this to your stylesheet.css file and it should work fine (be sure to edit the class to match your site though):
/*** Begin Header Tags SEO ***/
h1 {
 font-family: Verdana, Arial, sans-serif;
 font-size: 20px;
 font-weight: bold;
 margin-bottom: 0;
 padding-bottom: 0;
 color: #000;
}
h2 {
 font-family: Verdana, Arial, sans-serif;
 font-size: 14px;
 font-weight: normal;
 margin-bottom: 0;
 padding-bottom: 0;
 color: #000;
}
/*** End Header Tags SEO ***/

Jack

#20 Syros

  • Community Member
  • 8 posts
  • Real Name:Rinus

Posted 06 October 2008, 04:44

View PostJack_mcs, on Oct 5 2008, 10:45 PM, said:

The code is trying to use the h1 class from Header Tags. I will fix that in the next release but just add this to your stylesheet.css file and it should work fine (be sure to edit the class to match your site though):
/*** Begin Header Tags SEO ***/
h1 {
 font-family: Verdana, Arial, sans-serif;
 font-size: 20px;
 font-weight: bold;
 margin-bottom: 0;
 padding-bottom: 0;
 color: #000;
}
h2 {
 font-family: Verdana, Arial, sans-serif;
 font-size: 14px;
 font-weight: normal;
 margin-bottom: 0;
 padding-bottom: 0;
 color: #000;
}
/*** End Header Tags SEO ***/

Jack


ahhh, perfect way to wake up at 6 am and read this, it works great, many thanks!! :D