Login Form


Board index » Loaded Commerce Support » Install & Config

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Error on site - Please Help
PostPosted: Thu Apr 05, 2012 7:09 am 
Offline
CRE Freak

Joined: Mon Oct 26, 2009 8:20 am
Posts: 60
Hi does anyone know why i get this error code show up on my site:

Fatal error: require() [function.require]: Failed opening required 'includes/modules/new_products.php' (include_path='.:/usr/local/php5/lib/php') in /home/www/pgracing.co.uk/online/templates/content/index_nested.tpl.php on line 103

This is shown when i click on the catagories, on the Sub catagoris page this is shown.

Link can be found here to the site:
http://www.pgracing.co.uk/online/index.php?cPath=146

Thanks in advance.
Ben


Top
 Profile  
 
 Post subject: Re: Error on site - Please Help
PostPosted: Thu Apr 05, 2012 9:04 am 
Offline
CRE Legend
User avatar

Joined: Thu Jun 12, 2008 6:39 am
Posts: 3175
Location: New Zealand
Create the file new_products.php and upload to /includes/modules using this code:

Code:
<?php
/*
  $Id: new_products.php,v 1.1.1.1 2004/03/04 23:41:14 ccwjr Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
?>
<!-- D mainpages_modules.new_products.php//-->
<?php

//Eversun mod for sppc and qty price breaks
  $info_box_contents = array();
  $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));
 
      $new_products_query = tep_db_query("select distinct
                          p.products_id,
                          p.products_price,
                          p.manufacturers_id,
                          pd.products_name,
                          p.products_tax_class_id,
                          p.products_date_added,
                          p.products_image
                          from (((" . TABLE_PRODUCTS . " p
                         left join " . TABLE_SPECIALS . " s using(products_id))
                         left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id)
                         left join " . TABLE_CATEGORIES . " c on c.parent_id = " . (int)$current_category_id . " ),
                        " . TABLE_PRODUCTS_DESCRIPTION . " pd
                        where
                        p.products_status = '1'
                       and pd.products_id = p.products_id
                       and pd.language_id = '" . $languages_id . "'
                       and c.categories_id = p2c.categories_id
                       and DATE_SUB(CURDATE(),INTERVAL " .NEW_PRODUCT_INTERVAL ." DAY) <= p.products_date_added 
                       order by rand(), p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

  $row = 0;
  $col = 0;
  $num = 0;
  while ($new_products = tep_db_fetch_array($new_products_query)) {
 
    $num ++;
      if ($num == 1) {
  new contentBoxHeading($info_box_contents, tep_href_link(FILENAME_PRODUCTS_NEW));
      }

  $pf->loadProduct($new_products['products_id'],$languages_id);
        $products_price_s = $pf->getPriceStringShort();

 
    $info_box_contents[$row][$col] = array('align' => 'center',
                                           'params' => 'class="smallText" width="33%" valign="top"',
                                           'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $products_price_s);


    $col ++;
    if ($col > 2) {
      $col = 0;
      $row ++;
    }
  }

  if($num) {
  new contentBox($info_box_contents, true, true);

 if (TEMPLATE_INCLUDE_CONTENT_FOOTER =='true'){
   $info_box_contents = array();
   $info_box_contents[] = array('align' => 'left',
                                 'text'  => tep_draw_separator('pixel_trans.gif', '100%', '1')
                               );
  new contentBoxFooter($info_box_contents);
}
 }
?>
<!-- new_products_eof //-->

They must've forgotten about it or had a reason not to include it :)

Simon

_________________
www.codemehappy.com
No PMs thanks - link in signature below.
For Cre Loaded Commerce tips, quotes on coding work, free how-to articles


Top
 Profile  
 
 Post subject: Re: Error on site - Please Help
PostPosted: Thu Apr 05, 2012 9:39 am 
Offline
CRE Freak

Joined: Mon Oct 26, 2009 8:20 am
Posts: 60
Thank you so much.

Yeh i assumed the file was missing.
I did create it and copy the content from products_new.php but it didnt work.

Thanks for the code.

Regards
Ben :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Board index » Loaded Commerce Support » Install & Config

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
It is currently Wed May 22, 2013 9:10 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group