kudeedee Posted May 29, 2010 Share Posted May 29, 2010 Hi, Is there a way to change the "New Products for [Month]" text on the Main Page to the text "Featured Products"? Any help in the right direction will be highly appreciated. Tx Link to comment Share on other sites More sharing options...
germ Posted May 29, 2010 Share Posted May 29, 2010 /catalog/includes/modules/new_products.php $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); Change to $info_box_contents[] = array('text' => TABLE_HEADING_NEW_PRODUCTS ); /catalog/includes/languages/english/index.php define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); Change to: define('TABLE_HEADING_NEW_PRODUCTS', 'Featured Products'); If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Francys Posted June 11, 2010 Share Posted June 11, 2010 /catalog/includes/modules/new_products.php define('TABLE_HEADING_NEW_PRODUCTS', 'Featured Products'); Hi having installed the all products SEO, and when you click to see all new products it shows all products in the shop, how can i filter for like only show the last month added products in products_new.php The solution they have in kb is not up to date. Thanks in advance Francys Link to comment Share on other sites More sharing options...
germ Posted June 11, 2010 Share Posted June 11, 2010 Change: $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; to: $mdy = strftime(DATE_FORMAT_SHORT, time() - (30 * 24 * 60 * 60) ); $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_date_added >= '" . tep_date_raw($mdy) . "'" . " order by p.products_date_added DESC, pd.products_name"; Shows the last 30 days. This code worked for me - No runs, no drips, no errors... If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Francys Posted June 14, 2010 Share Posted June 14, 2010 Change: $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; to: $mdy = strftime(DATE_FORMAT_SHORT, time() - (30 * 24 * 60 * 60) ); $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_date_added >= '" . tep_date_raw($mdy) . "'" . " order by p.products_date_added DESC, pd.products_name"; Shows the last 30 days. This code worked for me - No runs, no drips, no errors... Thank you For your Reply, it's sorted! If you have installed the contribution dynamenu for oscommerce, i have also another bug with All Products SEO and dynamenu, and check this link and if you have the dynamenu showing the all products would be quewl if you say the solution there http://www.oscommerce.com/forums/topic/209045-dynamenu-for-oscommerce/ Thanks Francys Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.