Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I need to know if this can be done for my store


Guest

Recommended Posts

Posted

Hi to all...I would like for someone to walk through my store with me and see if this can be done......ok so go to..http://www.naturalherbs4naturalliving.com....

 

and go into my infobox titled Ailments and click on Acne.....You see where it says Acne where "Let's see what we have here" is suppose to be?? well I want to have that on every ailment page... but the right title corresponding with the correct ailment......i.e if you click on asthma it says asthma at the top because on all of them it says Acne.......and below this to have a description of the ailment......can this be done...is there a contribution for this????

 

 

Any help will be appreciated

 

 

 

Thanks Gloria

Posted

What your realy saying is when people select a category from your pull down, the page title is the category title, not the default:

 

Do this:

 

In catalog/index.php find:

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

replace with

 

<td class="pageHeading"><?php echo ($category['categories_name'] ? $category['categories_name'] : HEADING_TITLE); ?></td>

 

you could also perhaps at a short note by using a category description, to do that add this contrib:

 

category description mod (http://www.oscommerce.com/community/contributions,2343)

 

;)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

Hi, not sure if this is the type of thing you want,

 

category page or product page image ( the images that i have used are just temp)

 

category page or product page head text

 

category page or product page sub text

 

Please look at www.joicohair.net

 

If it is what you want, will run you through what I did

 

gary.

if I had the faintest clue regarding exactly what it was that I may or may not be doing, I would stop it!!

Posted
What your realy saying is when people select a category from your pull down, the page title is the category title, not the default:

 

Do this:

 

In catalog/index.php find:

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

replace with

 

<td class="pageHeading"><?php echo ($category['categories_name'] ? $category['categories_name'] : HEADING_TITLE); ?></td>

 

you could also perhaps at a short note by using a category description, to do that add this contrib:

 

category description mod (http://www.oscommerce.com/community/contributions,2343)

 

;)

 

 

 

Thanks for the help and quick response...but this is not what I was searching to do exactly....thanks anyway

Posted
Hi, not sure if this is the type of thing you want,

 

category page or product page image ( the images that i have used are just temp)

 

category page or product page head text

 

category page or product page sub text

 

Please look at www.joicohair.net

 

If it is what you want, will run you through what I did

 

gary.

 

 

Yes Gary :D this is exactly what im looking to do....the way you have your brands category and you click on ICE....and the description you have on top of the products...this is what im trying to accomplish....

 

looking foward to chatting with you Gary ;)

Posted

Hiya, please back up files and database first as I dont know how changed your osCommerce structure is, also this so far as i have tested will only work if your $cPath is not above 99_99

 

 

Database changes:

 

You need to make 4 new fields after categories_name in categories_description

 

cat_header (varchar 32, null)(This is where your product page heading goes)

categories_header_image (varchar 64, null)( This is where you put the path to your product page image, such as, mypicture.jpg)

cat_head_description (varchar 255, null)(This is where your product page or sub categorie page description goes)

cat_sub_text varchar (255, null))(This is where your sub categorie page header goes)

 

 

Into these fields you can put whatever text you want. Just match it up with the categories_name field.

Set in configuration your MAX_DISPLAY_CATEGORIES_PER_ROW to 1.

 

The only changes in the files are made in index.php

 

Approx line 66 find:

 

<?php 
// this puts the headers in on sub cat pages
if ($category_depth == 'nested') {
	$categories_id = ("$cPath");
  		$header_query = tep_db_query("select cat_sub_text from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$categories_id . "' ");
	$header_stat = tep_db_fetch_array($header_query);
$header = $header_stat ['cat_sub_text'];
}
{	  echo '                <td align="centre" font size="5" strong width=" " valign="top">' . "$header"  . '</a></td>' . "\n";
}
?></td>
        <tr>
           <td class="pageHeading">
<?php 
//this puts the header text description in on sub cat pages
if ($category_depth == 'nested') {
	$categories_id = ("$cPath");
  		$header_query = tep_db_query("select cat_head_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$categories_id . "' ");
	$header_stat = tep_db_fetch_array($header_query);
$header = $header_stat ['cat_head_description'];
}
{	  echo '                <td align="centre" font size="3" width=" " valign="top">' . "$header"  . '</a></td>' . "\n";
}
?>			
		</td>

 

Approx line 232 find:

 

<?php 
//this puts the headers and images in on product pages

if ($category_depth == 'products') {		
	$categories_id = ereg_replace(".._..",substr("$cPath",3,2),"$cPath");
  		$header_query = tep_db_query("select cat_header,categories_header_image from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$categories_id . "' ");
	$header_stat = tep_db_fetch_array($header_query);
$header = $header_stat ['cat_header'];
$header_image = $header_stat ['categories_header_image'];
}
{	  echo '                <td align="centre" font size="20" >' . "$header"  . '</a></td>' . "\n";
}
{      echo '                ' . tep_image(DIR_WS_IMAGES . "$header_image") . '</a></td>' . "\n";
  }
?></td>
        <tr>
           <td class="pageHeading">
<?php 
//this puts the header text description in on product pages
if ($category_depth == 'products') {
	$categories_id = ereg_replace(".._..",substr("$cPath",3,2),"$cPath");
  		$header_query = tep_db_query("select cat_head_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$categories_id . "' ");
	$header_stat = tep_db_fetch_array($header_query);
$header = $header_stat ['cat_head_description'];
}
{	  echo '                <td align="centre" font size="3" width=" " valign="top">' . "$header"  . '</a></td>' . "\n";
}
?>
</td>

 

 

 

Approx line 87 find:

 

         // 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

 

 

Where you have the line starting:

 

     if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
       echo '              </tr>' . "\n";
       echo '              <tr>' . "\n";

 

 

Add above this:

 

 //this puts the sub cat text in on sub cat pages, along with querys from just above
	  echo '                <td align="centre" font size="3" width=" " valign="top">' . $categories['cat_sub_text'] . '</a></td>' . "\n";

 

 

Thats about it.

if I had the faintest clue regarding exactly what it was that I may or may not be doing, I would stop it!!

Posted
Hiya, please back up files and database first as I dont know how changed your osCommerce structure is, also this so far as i have tested will only work if your $cPath is not above 99_99

 

 

Database changes:

 

You need to make 4 new fields after categories_name in categories_description

 

cat_header (varchar 32, null)(This is where your product page heading goes)

categories_header_image (varchar 64, null)( This is where you put the path to your product page image, such as, mypicture.jpg)

cat_head_description (varchar 255, null)(This is where your product page or sub categorie page description goes)

cat_sub_text varchar (255, null))(This is where your sub categorie page header goes)

 

 

Into these fields you can put whatever text you want. Just match it up with the categories_name field.

Set in configuration your MAX_DISPLAY_CATEGORIES_PER_ROW to 1.

 

The only changes in the files are made in index.php

Approx line 66 find:

 

<?php 
// this puts the headers in on sub cat pages
if ($category_depth == 'nested') {
	$categories_id = ("$cPath");
  		$header_query = tep_db_query("select cat_sub_text from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$categories_id . "' ");
	$header_stat = tep_db_fetch_array($header_query);
$header = $header_stat ['cat_sub_text'];
}
{	  echo '                <td align="centre" font size="5" strong width=" " valign="top">' . "$header"  . '</a></td>' . "\n";
}
?></td>
        <tr>
           <td class="pageHeading">
<?php 
//this puts the header text description in on sub cat pages
if ($category_depth == 'nested') {
	$categories_id = ("$cPath");
  		$header_query = tep_db_query("select cat_head_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$categories_id . "' ");
	$header_stat = tep_db_fetch_array($header_query);
$header = $header_stat ['cat_head_description'];
}
{	  echo '                <td align="centre" font size="3" width=" " valign="top">' . "$header"  . '</a></td>' . "\n";
}
?>			
		</td>

 

Approx line 232 find:

 

<?php 
//this puts the headers and images in on product pages

if ($category_depth == 'products') {		
	$categories_id = ereg_replace(".._..",substr("$cPath",3,2),"$cPath");
  		$header_query = tep_db_query("select cat_header,categories_header_image from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$categories_id . "' ");
	$header_stat = tep_db_fetch_array($header_query);
$header = $header_stat ['cat_header'];
$header_image = $header_stat ['categories_header_image'];
}
{	  echo '                <td align="centre" font size="20" >' . "$header"  . '</a></td>' . "\n";
}
{      echo '                ' . tep_image(DIR_WS_IMAGES . "$header_image") . '</a></td>' . "\n";
  }
?></td>
        <tr>
           <td class="pageHeading">
<?php 
//this puts the header text description in on product pages
if ($category_depth == 'products') {
	$categories_id = ereg_replace(".._..",substr("$cPath",3,2),"$cPath");
  		$header_query = tep_db_query("select cat_head_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$categories_id . "' ");
	$header_stat = tep_db_fetch_array($header_query);
$header = $header_stat ['cat_head_description'];
}
{	  echo '                <td align="centre" font size="3" width=" " valign="top">' . "$header"  . '</a></td>' . "\n";
}
?>
</td>

 

 

 

Approx line 87 find:

 

         // 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

 

 

Where you have the line starting:

 

     if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
       echo '              </tr>' . "\n";
       echo '              <tr>' . "\n";

 

 

Add above this:

 

 //this puts the sub cat text in on sub cat pages, along with querys from just above
	  echo '                <td align="centre" font size="3" width=" " valign="top">' . $categories['cat_sub_text'] . '</a></td>' . "\n";

 

 

Thats about it.

 

 

 

When you say "You need to make 4 new fields after categories_name in categories_description" where exactly is this file?? is this file in catalog/admin/categories.php?? and where do I paste this code??( If it matters where)...and do I make these four new fields for every product I have???

 

 

Thanks in Advance Gary...

Posted

Hi, the 4 new fields need to be created in your datebase, within the categories_description part of the database.

 

All the actual code changes are done in index.php

 

gary

if I had the faintest clue regarding exactly what it was that I may or may not be doing, I would stop it!!

Posted
Hi, the 4 new fields need to be created in your datebase, within the categories_description part of the database.

 

All the actual code changes are done in index.php

 

gary

 

 

never mind dumb question :blush: ??

Posted

shouldnt need to but latin1_general_ci is good

if I had the faintest clue regarding exactly what it was that I may or may not be doing, I would stop it!!

Posted
never mind dumb question :blush: ??

 

 

Hey Gary, in my index.php file my line 66 looks like this because i modified it in an earlier contribution td class="pageHeading"><?php echo ($category['categories_name'] ? $category['categories_name'] : HEADING_TITLE); ?></td>

 

 

 

So how would I place your code in here????

Posted

right, you changed it before to print your category name, now your changing it to put in the

 

a) category name or

B) product name or

c) sub category text or

B) some of the above + an image

 

You did make a back up of index.php? YES

 

Remove all this code:

 

<?php echo ($category['categories_name'] ? $category['categories_name'] : HEADING_TITLE); ?></td>

 

and continue as per above

if I had the faintest clue regarding exactly what it was that I may or may not be doing, I would stop it!!

Posted

Assume the database changes went ok??

if I had the faintest clue regarding exactly what it was that I may or may not be doing, I would stop it!!

Posted
right, you changed it before to print your category name, now your changing it to put in the

 

a) category name or

B) product name or

c) sub category text or

B) some of the above + an image

 

You did make a back up of index.php? YES

 

Remove all this code:

 

<?php echo ($category['categories_name'] ? $category['categories_name'] : HEADING_TITLE); ?></td>

 

and continue as per above

 

 

Ok, I have input all of the above code and it seems to have did the trick...but where do I go to place all the information for each individual section...i.e image, description

Posted

go back to you database fields that you created, eg: categories_description, then click on browse, there is a small pencil image which allows you to add or change the text, image etc.

 

 

cat_header (This is where your product page heading goes)

categories_header_image ( This is where you put the path to your product page image, such as, mypicture.jpg , you dont need to put www. http, or anything)

cat_head_description (This is where your product page or sub categorie page description goes)

cat_sub_text (This is where your sub categorie page header goes)

 

 

Into these fields you can put whatever text you want.

if I had the faintest clue regarding exactly what it was that I may or may not be doing, I would stop it!!

Posted
go back to you database fields that you created, eg: categories_description, then click on browse, there is a small pencil image which allows you to add or change the text, image etc.

 

 

cat_header (This is where your product page heading goes)

categories_header_image ( This is where you put the path to your product page image, such as, mypicture.jpg , you dont need to put www. http, or anything)

cat_head_description (This is where your product page or sub categorie page description goes)

cat_sub_text (This is where your sub categorie page header goes)

 

 

Into these fields you can put whatever text you want.

 

:D :D Thank you so much for helping me do this...I really appreciate your support.. two thumbs up.gif

Archived

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

×
×
  • Create New...