Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Products


EmpressChang

Recommended Posts

In your catalog/default.php, you should find a section of code down around line 284 (in my snapshop 20030514 version, at least) that looks like this:

 

<?php

} else { // default page

?>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

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

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, 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="0">

<tr>

<td class="main"><?php echo tep_customer_greeting(); ?></td>

</tr>

<tr>

<td class="main"><br><?php echo TEXT_MAIN; ?></td>

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

 

Your code in your viewer will probably stretch out and not be this many lines, but look above about 9 lines, and you see the <tr> entry for NEW_PRODUCTS after the "Text Main" piece? If you comment out that <tr> thru the very next </tr>, it should remove it from your default page.

 

Make sure you BACKUP before making any changes.

 

HankFrid

If I build it...they will come.

If I don't try to build it.....I will never know!

Link to comment
Share on other sites

A slightly easier way to turn that off ...

 

Change the code from:

 

<tr> 

<td><br><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> 

</tr>

 

To read:

<tr> 

<td><br><?php // include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> 

</tr>

Link to comment
Share on other sites

Linda;

 

Thank you for your input, that does look simpler.

If you put the "//" in the middle of the line, when does it stop treating the code as comments? Is it after the ";"? Just wondering, as I am newer to php and wouldn't have thought of that.

 

Thanks again.

HankFrid

 

Can you tell I was bored on a holiday weekend? Trying to answer peoples questions, as I figured not too many of us were out here just messing around for their Memorial Day weekend activity.

 

lol

If I build it...they will come.

If I don't try to build it.....I will never know!

Link to comment
Share on other sites

Linda;

 

Thank you for your input, that does look simpler.

If you put the "//" in the middle of the line, when does it stop treating the code as comments? Is it after the ";"? Just wondering, as I am newer to php and wouldn't have thought of that.

 

Thanks again.

HankFrid

 

Can you tell I was bored on a holiday weekend? Trying to answer peoples questions, as I figured not too many of us were out here just messing around for their Memorial Day weekend activity.

 

lol

 

I use to go for those elaborate edits too ... then was playing one day and thought ... gee ... wonder what happens if this line just becomes a comment rather than a real includes ... lo abd behold ... it worked ... :shock:

 

Saved me oh so much work ... to say the least.

 

Comments like the // rule until the end of the line, in this case the ; ?> so it stops right there.

Link to comment
Share on other sites

Linda;

 

Sorry to hound you a little more, but......

 

If it treats the area starting with the "//" and ending with the end of the line as comments, then doesn't that leave the <?php stranded without a ?> to finish the php code section? Or doesn't php care once it sees the new <?php a couple of lines down?

 

Thanks,

HankFrid

If I build it...they will come.

If I don't try to build it.....I will never know!

Link to comment
Share on other sites

Linda;

 

Sorry to hound you a little more, but......

 

If it treats the area starting with the "//" and ending with the end of the line as comments, then doesn't that leave the <?php stranded without a ?> to finish the php code section? Or doesn't php care once it sees the new <?php a couple of lines down?

 

Actually what it does is this ...

 

The original line reads:

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

 

This is the same thing as:

<?php 

include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); 

?>

 

So when you add the comments to:

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

 

It is reading it as:

<?php 

// include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); 

?>

 

It's just because it is on one line that this can seem a bit befuddling on how that works. :D

Link to comment
Share on other sites

Thank you very much for explaining that. Yes, with it on one line, it was a little confusing.

 

Thanks again.

 

HankFrid

If I build it...they will come.

If I don't try to build it.....I will never know!

Link to comment
Share on other sites

  • 1 month later...
How do I remove new products for the month for the individual product pages?

 

I have searched for days now it seems in the oscommerce files and in this forum to no avail.

 

How can I make "New Products for whatever" go away all together.

Surely I am not the only person who doesn't want to use this feature.

Can someone please help?

 

best regards,

mikeb

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...