Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Featured Products


Recommended Posts

Hi, I have recently installed a Featured Products add-on. I went through the instructions, step by step.

 

However, when I login to the admin panel and click on the 'Featured Products' option I receive the following message:

 

1146 - Table 'moranbev_osc1.featured' doesn't exist

 

select count(*) as total from products p, featured s, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id

 

[TEP STOP]

 

 

Any ideas what the problem is? How can I fix it?

Link to comment
Share on other sites

Mark,

 

Ensure that you have run the provided SQL and that your database now has a featured table. If it does not, run the sql again, watch for errors if the SQL query should fail and post any errors here so we can help you further.

 

 

 

Chris

Link to comment
Share on other sites

Mark,

 

Ensure that you have run the provided SQL and that your database now has a featured table. If it does not, run the sql again, watch for errors if the SQL query should fail and post any errors here so we can help you further.

 

 

 

Chris

 

I have got the SQL code but i'm unsure what I should be doing with it?

 

# --------------------------------------------------------
# $Id: featured_products_english.sql,v 1.3 2008/08/22 22:30:20 aa0001 Exp $

#
# Table structure for table `featured`
#
# Find and replace '18' to the next `configuration_group_id` available
# in table `configuration_group`

CREATE TABLE `featured` (
 `featured_id` int(11) NOT NULL auto_increment,
 `products_id` int(11) NOT NULL default '0',
 `featured_date_added` datetime default NULL,
 `featured_last_modified` datetime default NULL,
 `expires_date` datetime default NULL,
 `date_status_change` datetime default NULL,
 `status` int(1) default '1',
 PRIMARY KEY  (`featured_id`),
 KEY `idx_products_id` (`products_id`)
) ENGINE=MyISAM;

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('18','Featured', 'Featured Products Display', '18', '1'
);

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) VALUES ('Display Featured Products', 'FEATURED_PRODUCTS_DISPLAY', 'true', 'Set to true or false in order to display featured.', '18', '1', now(), now()
);

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) VALUES ('Maximum Display of Featured', 'MAX_DISPLAY_FEATURED_PRODUCTS', '6', 'This is the maximum amount of items to display on the front page.', '18', '2', now(), now()
);

UPDATE `configuration` SET `set_function`="tep_cfg_select_option(array('true', 'false')," WHERE `configuration_key`='FEATURED_PRODUCTS_DISPLAY';

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, set_function) VALUES ('Include Sub Categories When Displaying Featured Products', 'FEATURED_PRODUCTS_SUB_CATEGORIES', 'true', 'Set to true or false in order to display featured including sub categories.', '18', '3', now(), now(), "tep_cfg_select_option(array('true', 'false'),");

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, set_function) VALUES ('Specials Only When Displaying Featured Products', 'FEATURED_PRODUCTS_SPECIALS_ONLY', 'false', 'Set to true or false in order to display only on special featured products.', '18', '4', now(), now(), "tep_cfg_select_option(array('true', 'false'),");

Link to comment
Share on other sites

  • 3 weeks later...
I have got the SQL code but i'm unsure what I should be doing with it?

 

# --------------------------------------------------------
# $Id: featured_products_english.sql,v 1.3 2008/08/22 22:30:20 aa0001 Exp $

#
# Table structure for table `featured`
#
# Find and replace '18' to the next `configuration_group_id` available
# in table `configuration_group`

CREATE TABLE `featured` (
 `featured_id` int(11) NOT NULL auto_increment,
 `products_id` int(11) NOT NULL default '0',
 `featured_date_added` datetime default NULL,
 `featured_last_modified` datetime default NULL,
 `expires_date` datetime default NULL,
 `date_status_change` datetime default NULL,
 `status` int(1) default '1',
 PRIMARY KEY  (`featured_id`),
 KEY `idx_products_id` (`products_id`)
) ENGINE=MyISAM;

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('18','Featured', 'Featured Products Display', '18', '1'
);

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) VALUES ('Display Featured Products', 'FEATURED_PRODUCTS_DISPLAY', 'true', 'Set to true or false in order to display featured.', '18', '1', now(), now()
);

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) VALUES ('Maximum Display of Featured', 'MAX_DISPLAY_FEATURED_PRODUCTS', '6', 'This is the maximum amount of items to display on the front page.', '18', '2', now(), now()
);

UPDATE `configuration` SET `set_function`="tep_cfg_select_option(array('true', 'false')," WHERE `configuration_key`='FEATURED_PRODUCTS_DISPLAY';

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, set_function) VALUES ('Include Sub Categories When Displaying Featured Products', 'FEATURED_PRODUCTS_SUB_CATEGORIES', 'true', 'Set to true or false in order to display featured including sub categories.', '18', '3', now(), now(), "tep_cfg_select_option(array('true', 'false'),");

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, set_function) VALUES ('Specials Only When Displaying Featured Products', 'FEATURED_PRODUCTS_SPECIALS_ONLY', 'false', 'Set to true or false in order to display only on special featured products.', '18', '4', now(), now(), "tep_cfg_select_option(array('true', 'false'),");

 

Run the above sql in your sql interface (eg phpmyadmin) to the database for your site.

 

Open phpmyadmin & enter the code into the sql box provided under the SQL tab. You need to change the number 18 in the code to whatever next id is available in the configuration group table. Mine was 16.

Link to comment
Share on other sites

I've tried to install the Featured Products 1.6.3 contribution, but despite following all the instructions, I have a problem with Step 13 (unlucky for some!).

 

The instructions say:

 

Step 13:

Edit /catalog/index.php and change the two instances of FILENAME_NEW_PRODUCTS to FILENAME_FEATURED:

 

FIND (two instances of this occurs, both must be changed):

 

<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

 

Change to:

 

<td><?php include(DIR_WS_MODULES . FILENAME_FEATURED); ?></td>

 

Unfortunately, when I change the above I get the following errors:

 

Warning: main(includes/modules/FILENAME_FEATURED) [function.main]: failed to open stream: No such file or directory in /home/sites/exclusivechocolates.co.uk/public_html/index.php on line 313

 

Warning: main(includes/modules/FILENAME_FEATURED) [function.main]: failed to open stream: No such file or directory in /home/sites/exclusivechocolates.co.uk/public_html/index.php on line 313

 

Warning: main(includes/modules/FILENAME_FEATURED) [function.main]: failed to open stream: No such file or directory in /home/sites/exclusivechocolates.co.uk/public_html/index.php on line 313

 

Warning: main() [function.include]: Failed opening 'includes/modules/FILENAME_FEATURED' for inclusion (include_path='.:/usr/share/pear') in /home/sites/exclusivechocolates.co.uk/public_html/index.php on line 313

 

This is despite uploading the file featured.php to the includes/module folder as instructed!

 

Any ideas what I should do?

 

Thanks

Link to comment
Share on other sites

Any ideas what I should do?
Without any knowledge of this contribution, I would say that you should add
define('FILENAME_FEATURED', 'featured.php');

to includes/filenames.php -- you can probably confirm this in the install instructions.

Always back up before making changes.

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...