Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Last Updated


pabyford

Recommended Posts

Hello all.

 

I am looking for a way to display somewhere within the product listing the date that the product information was last saved.

 

The store owner wants to be able to see when the PRICE was last changed.

 

I would appreciate any leads to a solution.

 

Cheers

Link to comment
Share on other sites

  • 4 months later...

No, I haven't had any response and I am having a hard time with trying to code this myself.

 

I was able to do this.

 

you have to add the folowing to your sql database(be sure to backup first!)

 

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`) VALUES (250, 'Display Product Last Updated', 'PRODUCT_LIST_LAST_MODIFIED', '5', 'Do You want to display the date an item was last updated?', 8, 90, '2011-07-19 17:33:42', '2011-07-19 11:07:11');

 

open catalog/index.php

------------------------------------------

find:

'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,

below add:

'PRODUCT_LIST_LAST_MODIFIED' => PRODUCT_LIST_LAST_MODIFIED,

------------------------------------------

find:

case 'PRODUCT_LIST_QUANTITY':

$select_column_list .= 'p.products_quantity, ';

break;

below add:

case 'PRODUCT_LIST_LAST_MODIFIED':

$select_column_list .= 'p.products_last_modified, ';

break;

------------------------------------------

find:

case 'PRODUCT_LIST_QUANTITY':

$listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

Below add:

case 'PRODUCT_LIST_LAST_MODIFIED':

$listing_sql .= " order by p.products_last_modified " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

 

******************************************

 

open catalog/includes/modules/product_listing.php

------------------------------------------

find:

case 'PRODUCT_LIST_QUANTITY':

$lc_text = TABLE_HEADING_QUANTITY;

$lc_align = 'left';

break;

below add:

case 'PRODUCT_LIST_LAST_MODIFIED':

$lc_text = TABLE_HEADING_LAST_MODIFIED;

$lc_align = 'left';

break;

------------------------------------------

find:

case 'PRODUCT_LIST_QUANTITY':

$prod_list_contents .= ' <td align="right">' . $listing['products_quantity'] . '</td>';

break;

below add:

case 'PRODUCT_LIST_LAST_MODIFIED':

$prod_list_contents .= ' <td align="left">' . $listing['products_last_modified'] . '</td>';

break;

------------------------------------------

 

open catalog/includes/languages/english/index.php

 

add:

define('TABLE_HEADING_LAST_MODIFIED', 'Last Modified');

 

 

Done.

 

hope it works for you!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...