Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do you safely stop this appearing in the


Guest

Recommended Posts

How do you safely stop this appearing in the product_info.php

 

"This product was added to our catalog on (day month year)"

 

Its awkward when the display box on the index page is displaying the product in "New Products for such and such a month" then people click on the product only to find its not new for that month at all.

 

Ive searched the knowledge base for ages but it seems its just not there.

 

TIA

 

Bob

Link to comment
Share on other sites

This is a good question.

 

I modified my own products_new.php and products_info.php files to remove references to the date added. I no longer have the string appearing, but I do have TEXT_DATE_ADDED appearing in its place. Apparently there's an include some place else that needs to be edited.

 

I'll keep looking, but hopefully one of the pros will be along to point the way.

Link to comment
Share on other sites

How do you safely stop this appearing in the product_info.php

 

"This product was added to our catalog on (day month year)"

 

Its awkward when the display box on the index page is displaying the product in "New Products for such and such a month" then people click on the product only to find its not new for that month at all.

 

Ive searched the knowledge base for ages but it seems its just not there.

 

TIA

 

Bob

 

 

you will find this code there :

 

<?php

}

 

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>

</tr>

<?php

} else {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

}

?>

 

so if you have an availability date set, that is displayed, otherwise the date added is displayed. Remove what you don't want to display.

Treasurer MFC

Link to comment
Share on other sites

*nevermind*

Forum search

Contributions search

Documentation search (note: docs being adapted for MS3, may be different for MS2)

3 tips for better forum searching

 

Want to post? Read this first:

osCommerce for dummies

Topic name etiquette

 

Basics:

Basics for design

Right syntax to use near '-20, 20'

Cannot re-assign $this

Parse error

Link to comment
Share on other sites

you will find this code there :

 

<?php

    }

 

    if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {

?>

      <tr>

        <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>

      </tr>

<?php

    } else {

?>

      <tr>

        <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

      </tr>

<?php

    }

?>

 

so if you have an availability date set, that is displayed, otherwise the date added is displayed. Remove what you don't want to display.

 

 

Where do you find this test? This code is not in either of my products php files.

Link to comment
Share on other sites

For anyone new to osCommerce - you need the following as a minimum:

1. A full copy of all of the osCommerce files on your own computer.

2. A good plain text editor like Text Pad or Crimson Editor - which will show you line numbers (for error reports) but also has a Find In Files feature that allows you to track down where things are.

 

Vger

Link to comment
Share on other sites

Thanks Boxtel.

 

 

Following your directions I looked at this part of the code in my products_info.php:

 

<?php

} else {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

}

?>

 

 

What I did was put in some backslashes and then remove the row <tr></tr> so it now looks like this:

 

 

<?php

} // else {

?>

 

 

<?php

// }

?>

 

 

 

and it works for me. I left in some bits so I know where it can all go back should I change my mind in the future.

 

 

:D

Link to comment
Share on other sites

Thanks Boxtel.

Following your directions I looked at this part of the code in my products_info.php:

 

<?php

    } else {

?>

      <tr>

        <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

      </tr>

<?php

    }

?>

What I did was put in some backslashes and then remove the row <tr></tr> so it now looks like this:

<?php

    } // else {

?>

<?php

  //  }

?>

and it works for me. I left in some bits so I know where it can all go back should I change my mind in the future.

  :D

 

smart move !

Treasurer MFC

Link to comment
Share on other sites

Now I'm confused...

 

This is my products_info.php in its entirety:

 

<?php

/*

$Id: product_info.php,v 1.15 2002/11/19 01:48:08 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_PRODUCT_NOT_FOUND', 'Product not found!');

define('TEXT_CURRENT_REVIEWS', 'Current Reviews:');

define('TEXT_MORE_INFORMATION', 'For more information, please visit this products <a href="%s" target="_blank"><u>webpage</u></a>.');

define('TEXT_DATE_ADDED', 'This product was added to our catalog on %s.');

define('TEXT_DATE_AVAILABLE', '<font color="#ff0000">This product will be in stock on %s.</font>');

define('TEXT_ALSO_PURCHASED_PRODUCTS', 'Customers who bought this product also purchased');

define('TEXT_PRODUCT_OPTIONS', 'Available Options:');

define('TEXT_CLICK_TO_ENLARGE', 'Click to enlarge');

?>

 

Apparently, I don't have the same options you do. So, where do I begin?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...