Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

product update variable


jkx

Recommended Posts

when on my products info page i see a line at bottom this

 

This product was added to our catalog on Thursday 10 December, 2005.

 

I have seen code for this in language file and it says something like this

 

This product was added to our catalog on %s.

 

 

I want to know how to change the time from the product update, means whenever i update a product then this line should become like .

 

This product was last updated on Thursday 16 December, 2005.

 

 

what is that i have to put instead of %s on the language file. i mean a variable or somethink that list the product update date and not the product added date.

Link to comment
Share on other sites

modify the catalog\product_info.php

 

from this:

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

 

to this

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

 

Also modify the following query

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

to this

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_last_modified, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

Finally you can modify the string to display "last modified" instead of "added to our catalog"

Link to comment
Share on other sites

Well, I made the above changes and yet it still says .. This product was added to our catalog on . No date now. And where do you modify the "string" ?

Link to comment
Share on other sites

sorry to tell to MoonLight that if u dont update a product then the updation wont show. Go to your Categories / Products in admin panel and update any product and then see the results on the products info page.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...