Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Remove Date in Product Info


nierc

Recommended Posts

Posted

I am trying to figure out how to just remove the date in the product info where it says "This product will be in stock..." I just want to show the month and year with no date. My distributor goes by month so I never get a day. ID there a way of doing this so it just says this product will be in stock on Month/Year? Thanks for the help.

  • 2 weeks later...
Posted

I was able to accomplish what you are describing by modifying the product_info.php page.

 

In product_info.php, find the following code:

<?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?>

 

 

You can reformat your date variable here by changing this code to be:

<?php echo sprintf(TEXT_DATE_AVAILABLE, date('F Y',strtotime($product_info['products_date_available']))); ?>

 

I am using the php date function to reformat the date stored in the database. You can learn more about reformatting dates here.

 

Hope this helps!

Archived

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

×
×
  • Create New...