CaptureL Posted August 29, 2006 Share Posted August 29, 2006 Hi there I have installed the featured products contribution from the latest version and have followed the instructions to a T, However although ther contrib seems to work on the front end i can't actually add anything in the admin panel. :'( When i click the "New Products" button i get the following error message..... 1146 - Table 'capture_osc1.customers_groups' doesn't exist select customers_group_name, customers_group_id from customers_groups order by customers_group_id [TEP STOP] Now i have searched and searched this problem and did find somebody else that had the same problem but nobody answered his last post so i have no idea if this ever got fixed. I have tried all the suggestions that i have come accross and it would seem that i have everything ok. As i said...i have checked my files repeatidly and can't for the life of me fathom out what to do. ;) I am now at my wits end with this and would be very grateful if someone could point me in the right direction so that i may continue to set up my store. Thankx in advance Lin Link to comment Share on other sites More sharing options...
CaptureL Posted August 30, 2006 Author Share Posted August 30, 2006 Am a little stuck here and really need to sort this out. Anyone? :-" Link to comment Share on other sites More sharing options...
jpweber Posted August 30, 2006 Share Posted August 30, 2006 Hi Lin. First, assuming you've already gone into phpmyadmin or something and looked into your database to make sure that the table does in fact exist, you may have forgotten to define the table in your database. So try doing this. Go to catalog/admin/includes/database_tables.php. Open that up, and add this line: define('CUSTOMER_GROUPS', 'customer groups'); Assuming that's your table name. Your table name must be in ALL CAPS, and then in all lowercase like i just have that. Add that line in alphabetical order to the catalog/admin/includes/database_tables.php file, and upload that file to the proper directory on your server using your FTP tool. Hope this helps. Jason Simple 1-2-3 Intructions on how to get, install and configure SSL The Google Sandbox explained Simple to follow instructions on how to change the look of your OSC How To Make A Horrible OSC Website my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ... Link to comment Share on other sites More sharing options...
CaptureL Posted August 30, 2006 Author Share Posted August 30, 2006 Hi Lin. First, assuming you've already gone into phpmyadmin or something and looked into your database to make sure that the table does in fact exist, you may have forgotten to define the table in your database. So try doing this. Go to catalog/admin/includes/database_tables.php. Open that up, and add this line: define('CUSTOMER_GROUPS', 'customer groups'); Assuming that's your table name. Your table name must be in ALL CAPS, and then in all lowercase like i just have that. Add that line in alphabetical order to the catalog/admin/includes/database_tables.php file, and upload that file to the proper directory on your server using your FTP tool. Hope this helps. Hi Jason Thanks for the reply.... i have checked the file database_tables.php and the line is indeed already defined however i can not find the entry "Customer _Groups" in my database. I followed all the instructions that came with the contribution and the only database it told me to creat was the one called.."Featured" which it included in an sql file. ;) am i missing something? any idea how i create the missing table and what is required? Many thanks Lin Link to comment Share on other sites More sharing options...
jpweber Posted August 30, 2006 Share Posted August 30, 2006 Customer_Groups wasn't part of the SQL file that came with the Featured Products Contribution? Then maybe you have installed the Separate Pricing Per Customer contribution? I think this contribution creates that table. Why don't you try to go and look back to make sure you installed that SQL file properly -- the one that came with Separate Pricing Per Customer, assuming that's the contribution I'm thinking of. As always, backup your database before you change anything. Jason Simple 1-2-3 Intructions on how to get, install and configure SSL The Google Sandbox explained Simple to follow instructions on how to change the look of your OSC How To Make A Horrible OSC Website my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ... Link to comment Share on other sites More sharing options...
jpweber Posted August 30, 2006 Share Posted August 30, 2006 If it is separate pricing per customer, here's the SQL syntax for that contribution: DROP TABLE IF EXISTS customers_groups; CREATE TABLE customers_groups ( customers_group_id smallint UNSIGNED NOT NULL, customers_group_name varchar(32) NOT NULL default '', customers_group_show_tax enum('1','0') NOT NULL, customers_group_tax_exempt enum('0','1') NOT NULL, group_payment_allowed varchar(255) NOT NULL default '', group_shipment_allowed varchar(255) NOT NULL default '', PRIMARY KEY (customers_group_id) ); INSERT INTO customers_groups VALUES('0','Retail','1','0','',''); Here's somebody who had the same problem as you: http://www.oscommerce.com/forums/index.php?sho...mp;#entry741509 Hope this helped. Jason Simple 1-2-3 Intructions on how to get, install and configure SSL The Google Sandbox explained Simple to follow instructions on how to change the look of your OSC How To Make A Horrible OSC Website my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ... Link to comment Share on other sites More sharing options...
CaptureL Posted August 30, 2006 Author Share Posted August 30, 2006 Customer_Groups wasn't part of the SQL file that came with the Featured Products Contribution? Then maybe you have installed the Separate Pricing Per Customer contribution? I think this contribution creates that table. Why don't you try to go and look back to make sure you installed that SQL file properly -- the one that came with Separate Pricing Per Customer, assuming that's the contribution I'm thinking of. As always, backup your database before you change anything. Hi Again I downloaded and installed Featured products contribution.....Not Separate Pricing Per Customer... i have checked the files that came with the contrib and this is the code it tells me to add to my file.. Step 13: For this step some customizing may need to be done. The following code includes the seperate pricing contribution. You may also want to add things like a different model number field, cost, or other description... edit /catalog/admin/includes/functions/html_output.php and at the very bottom right before the ?> add: //draw products multiselect box function tep_draw_products_mselect($name, $parameters = '', $selected_vals) { global $currencies, $languages_id; if ($exclude == '') { $exclude = array(); } $select_string = '<select name="' . $name . '"'; if ($parameters) $select_string .= ' ' . $parameters; $select_string .= ' multiple>'; // BOF - Separate_Pricing_Per_Customer_v3.5 $all_groups=array(); $customers_groups_query = tep_db_query("select distinct customers_group_name, customers_group_id from " . TABLE_CUSTOMERS . " order by customers_group_id "); while ($existing_groups = tep_db_fetch_array($customers_groups_query)) { $all_groups[$existing_groups['customers_group_id']]=$existing_groups['customers_group_name']; } $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_code from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by products_code"); while ($products = tep_db_fetch_array($products_query)) { // BOF - Separate_Pricing_Per_Customer_v3.5 // Next lines were original code // if (!in_array($products['products_id'], $exclude)) { // $select_string .= '<option value="' . $products['products_id'] . '">' . $products['products_name'] . ' (' . $currencies->format($products['products_price']) . ')</option>'; // } $price_query=tep_db_query("select customers_group_price, customers_group_id from " . TABLE_PRODUCTS_GROUPS . " where products_id = " . $products['products_id']); $product_prices=array(); while($prices_array=tep_db_fetch_array($price_query)){ $product_prices[$prices_array['customers_group_id']]=$prices_array['customers_group_price']; } reset($all_groups); $price_string=""; $sde=0; while(list($sdek,$sdev)=each($all_groups)){ //if (!in_array((int)$products['products_id'].":".(int)$sdek, $exclude)) { if($sde) $price_string.=", "; $price_string.=$sdev.": ".$currencies->format(isset($product_prices[$sdek]) ? $product_prices[$sdek]:$products['products_price']); $sde=1; } //} if (!in_array($products['products_id'], $selected_vals)) { $select_string .= '<option value="' . $products['products_id'] . '">' . $products['products_model'] . ' ' . $products['products_name'] . ' (' . $price_string . ')</option>\n'; } else { $select_string .= '<option value="' . $products['products_id'] . '" SELECTED>' . $products['products_model'] . ' ' . $products['products_name'] . ' (' . $price_string . ')</option>\n'; } // EOF - Separate_Pricing_Per_Customer_v3.5 } $select_string .= '</select>'; return $select_string; } //draw products multiselect delete box function tep_draw_products_delete_mselect($name, $parameters = '', $selected_vals) { global $currencies, $languages_id; if ($exclude == '') { $exclude = array(); } $select_string = '<select name="' . $name . '"'; if ($parameters) $select_string .= ' ' . $parameters; $select_string .= ' multiple>'; $products_query = tep_db_query("select p.products_id, pd.products_name, s.featured_id, s.featured_date_added, s.featured_last_modified, s.expires_date, s.date_status_change, s.status from " . TABLE_PRODUCTS . " p, " . TABLE_FEATURED . " s, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = s.products_id order by pd.products_name"); while ($products = tep_db_fetch_array($products_query)) { $select_string .= '<option value="' . $products['featured_id'] . '">' . $products['products_model'] . ' ' . $products['products_name'].'</option>\n'; } $select_string .= '</select>'; return $select_string; } Step 14: go to your admin panel and add the products that you want featured. i then changed that to the following after someone else was having the same problem on the board... //draw products multiselect box function tep_draw_products_mselect($name, $parameters = '', $selected_vals) { global $currencies, $languages_id; if ($exclude == '') { $exclude = array(); } $select_string = '<select name="' . $name . '"'; if ($parameters) $select_string .= ' ' . $parameters; $select_string .= ' multiple>'; // BOF - Separate_Pricing_Per_Customer_v4.1.x $all_groups=array(); $customers_groups_query = tep_db_query("select customers_group_name, customers_group_id from " . TABLE_CUSTOMERS. " order by customers_group_id "); while ($existing_groups = tep_db_fetch_array($customers_groups_query)) { $all_groups[$existing_groups['customers_group_id']]=$existing_groups['customers_group_name']; } $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_model from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by products_model"); while ($products = tep_db_fetch_array($products_query)) { // BOF - Separate_Pricing_Per_Customer_v3.5 // Next lines were original code // if (!in_array($products['products_id'], $exclude)) { // $select_string .= '<option value="' . $products['products_id'] . '">' . $products['products_name'] . ' (' . $currencies->format($products['products_price']) . ')</option>'; // } $price_query=tep_db_query("select customers_group_price, customers_group_id from " . TABLE_PRODUCTS_GROUPS . " where products_id = " . $products['products_id']); $product_prices=array(); while($prices_array=tep_db_fetch_array($price_query)){ $product_prices[$prices_array['customers_group_id']]=$prices_array['customers_group_price']; } reset($all_groups); $price_string=""; $sde=0; while(list($sdek,$sdev)=each($all_groups)){ //if (!in_array((int)$products['products_id'].":".(int)$sdek, $exclude)) { if($sde) $price_string.=", "; $price_string.=$sdev.": ".$currencies->format(isset($product_prices[$sdek]) ? $product_prices[$sdek]:$products['products_price']); $sde=1; } //} if (!in_array($products['products_id'], $exclude)) { $select_string .= '<option value="' . $products['products_id'] . '">' . $products['products_model'] . ' ' . $products['products_name'] . ' (' . $price_string . ')</option>\n'; } else { $select_string .= '<option value="' . $products['products_id'] . '" SELECTED>' . $products['products_model'] . ' ' . $products['products_name'] . ' (' . $price_string . ')</option>\n'; } // EOF - Separate_Pricing_Per_Customer_v3.5 } $select_string .= '</select>'; return $select_string; } //draw products multiselect delete box function tep_draw_products_delete_mselect($name, $parameters = '', $selected_vals) { global $currencies, $languages_id; if ($exclude == '') { $exclude = array(); } $select_string = '<select name="' . $name . '"'; if ($parameters) $select_string .= ' ' . $parameters; $select_string .= ' multiple>'; $products_query = tep_db_query("select p.products_id, pd.products_name, s.featured_id, s.featured_date_added, s.featured_last_modified, s.expires_date, s.date_status_change, s.status from " . TABLE_PRODUCTS . " p, " . TABLE_FEATURED . " s, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = s.products_id order by pd.products_name"); while ($products = tep_db_fetch_array($products_query)) { $select_string .= '<option value="' . $products['featured_id'] . '">' . $products['products_model'] . ' ' . $products['products_name'].'</option>\n'; } $select_string .= '</select>'; return $select_string; :'( prior to that i was getting ...1054 - Unknown column 'customers_group_name' in 'field list' select customers_group_name, customers_group_id from customers order by customers_group_id [TEP STOP] Link to comment Share on other sites More sharing options...
jpweber Posted August 30, 2006 Share Posted August 30, 2006 Lin, you just showed me the code for what I thought -- Separate Pricing Per Customer -- NOT Featured Products -- right here: http://www.oscommerce.com/community/contributions,716/ Not only that, but you're mixing up versions. You need to revisit that contribution page, download the Separate Pricing Per Customer, and refollow THAT readme for THAT contribution. Jason Simple 1-2-3 Intructions on how to get, install and configure SSL The Google Sandbox explained Simple to follow instructions on how to change the look of your OSC How To Make A Horrible OSC Website my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ... Link to comment Share on other sites More sharing options...
CaptureL Posted August 30, 2006 Author Share Posted August 30, 2006 Lin, you just showed me the code for what I thought -- Separate Pricing Per Customer -- NOT Featured Products -- right here: http://www.oscommerce.com/community/contributions,716/ Not only that, but you're mixing up versions. You need to revisit that contribution page, download the Separate Pricing Per Customer, and refollow THAT readme for THAT contribution. Hi jason. I have only downloaded the contribution for Featured Products...this is the entire read me file that came with it..(sorry for long post) Featured Products v1.5.6Appended by Guardian Angel Store (http://www.GuardianAngelStore.com): 24 May 2006 Added ability to add or delete multiple products at the same time. Save time. This is kind of a crude hack, will post a cleaner version later. Thanks to the creator of the select multiple categories and featured products contributions. I kind of combined the two to make this. Featured Products v1.5.4 Appended by Monti (http://botiga.rugbycatala.org): 18 Jan 2005 Catalan translation added to this contribution. This package contain the complete contribution plus catalan translated files and sql file in catalan for catalan administration. Featured Products v1.5.3 Appended by JoSch: 25 Jul 2004 German translation added to this contribution. This package contain the complete contribution plus German translated files and sql file in German for German administration. Featured Products v1.5.2 Appended by Graith (http://www.graith.co.uk): 5 April 2004 Added back the featured_products.php page linked from the module and corrected a minor bug which resulted in a divide by zero Featured Products v1.5.1 Appended by Raffles: 02 February 2004 Spanish translation added to this contribution. This package contain the complete contribution plus spanish translated files and sql file in spanish for spanish administration. Featured Products v1.5 Appended by Jesse Labrocca Date: 20 January 2004 The reason I updated these instructions and files is because there are a few extra files that are no longer needed for this contrib. I also streamlined the admin so that you can turn on or off the featured display inside the admin as well as change how many products you would like to display. My version is about as simple as you can get to install. Enjoy. Featured Products V1.4 by Jono Behr For osCommerce V2.2 MS2 Date:16 January 2004 ------------------------------------ Featured Products InfoBox V1.3 by Aubrey Killian was orignally writen for an earlier version of osCommerce, and doesnt quite work in the current version of osCommerce. Whilst there are bits of pieces of information all over the forums and the contribution section to help users install V1.3 and get it up to date and working properly, this updated version simply takes the awesome work by Aubrey (c'mon the bokke!) and the knowledge and help from others to make one all-inclusive contribution and things a bit easier. This contribution (V1.4) includes all the files and instructions that I used in my own installation to get things up and running in V2.2 MS2. I take no credit for the original work or mods, and also dont take any responsibility if this doesnt work! --- WHAT IS IT? --- The purpose of this contribution is to replace the "New Products" Infobox that appears on the main page and top-level category pages, to show selected products in the infobox, instead of new products. The featured products can be chosen in the admin. On the main default page of oscommerce, a selection of ALL the featured products will be display, and in top-level categories, only featured products that belongs to that category. For example, "A Bug's Life" is a DVD movie in the sub-category "Cartoons", and "Cartoons" is a sub-category of "DVD Movies". If "A Bug's Life" is made a featured product, it will appear on the main oscommerce page, and also on the DVD Movies category page, but not on the Hardware page. If there are more featured products than the maximum allowed to be displayed, a random selection will be shown. It's been written in such a way that the Infobox will *not* show up if there are no featured products to display. --- HOW TO INSTALL --- Installation should take about 15 to 20 minutes, there are some copying of files, and then some editing of current files is necessary. There are a number of files to be edited, but don't be put off but this, it's mostly inserting one or two lines into the file. Nothing majorly complicated. Step 1: As always, first BACKUP FILES AND DATABASE!!! Step 2: Copy the directory structure that came with this archive, as it is into your /catalog and /admin direcories. Step 3: Add the following lines to /catalog/admin/includes/filenames.php define('FILENAME_FEATURED', 'featured.php'); define('FILENAME_FEATURED_PRODUCTS', 'featured_products.php'); Step 4: Add the following line to /catalog/admin/includes/database_tables.php define('TABLE_FEATURED', 'featured'); Step 5: Add the following line to /catalog/admin/includes/boxes/catalog.php, right before the line that contains <a href="'. tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a>'); '<a href="' . tep_href_link(FILENAME_FEATURED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_FEATURED_PRODUCTS . '</a><br>' . Step 6: Add the following line to /catalog/admin/includes/languages/english.php, right before the line that contains define('BOX_CATALOG_PRODUCTS_EXPECTED', 'Products Expected'); define('BOX_CATALOG_FEATURED_PRODUCTS', 'Featured Products'); :::::::::SPANISH TRANSLATION::::::::: Add the following line to /catalog/admin/includes/languages/espanol.php, right before the line that contains define('BOX_CATALOG_PRODUCTS_EXPECTED', 'Pr?ximamente'); define('BOX_CATALOG_FEATURED_PRODUCTS', 'Productos destacados'); ::::::::::::::::::::::::::::::::::::: :::::::::GERMAN TRANSLATION::::::::: Add the following line to /catalog/admin/includes/languages/german.php, right before the line that contains define('BOX_CATALOG_PRODUCTS_EXPECTED', 'erwartete Artikel'); define('BOX_CATALOG_FEATURED_PRODUCTS', 'Highlights'); ::::::::::::::::::::::::::::::::::::: :::::::::CATALAN TRANSLATION::::::::: Add the following line to /catalog/admin/includes/languages/catalan.php, right before the line that contains define('BOX_CATALOG_PRODUCTS_EXPECTED', 'Properament'); define('BOX_CATALOG_FEATURED_PRODUCTS', 'Productes destacats'); ::::::::::::::::::::::::::::::::::::: :::::::::FRENCH TRANSLATION::::::::: Add the following line to /catalog/admin/includes/languages/french.php, right before the line that contains define('BOX_CATALOG_PRODUCTS_EXPECTED', 'Produits à venir'); define('BOX_CATALOG_FEATURED_PRODUCTS', 'Prod. recommandés'); ::::::::::::::::::::::::::::::::::::: Step 7: Add the following lines to /catalog/includes/filenames.php define('FILENAME_FEATURED', 'featured.php'); define('FILENAME_FEATURED_PRODUCTS', 'featured_products.php'); Step 8: Add the following lines to /catalog/includes/database_tables.php define('TABLE_FEATURED', 'featured'); Step 9: In /catalog/includes/application_top.php, insert the following lines right after the line that contains "tep_expire_specials();" // auto expire featured products require(DIR_WS_FUNCTIONS . 'featured.php'); tep_expire_featured(); Step 10: In /catalog/includes/languages/english/index.php, add the following lines right after the line "define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');" define('TABLE_HEADING_FEATURED_PRODUCTS', 'Featured Products'); define('TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY', 'Featured Products in %s'); :::::::::SPANISH TRANSLATION::::::::: In /catalog/includes/languages/espanol/index.php, add the following lines right after the line "define('TABLE_HEADING_DATE_EXPECTED', 'Lanzamiento');" define('TABLE_HEADING_FEATURED_PRODUCTS', 'Productos Destacados'); define('TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY', 'Productos Destacados en %s'); ::::::::::::::::::::::::::::::::::::: :::::::::DEUTSCHE ?BERSETZUNG:::::::: In /catalog/includes/languages/german/index.php, direkt hinter der Zeile define('TABLE_HEADING_DATE_EXPECTED', 'Datum'); einf?gen. // Add on for Featured Products define('TABLE_HEADING_FEATURED_PRODUCTS', 'Neue Produkte und Highlight`s'); define('TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY', 'Neue Produkte und Hightlight`s in %s'); ::::::::::::::::::::::::::::::::::::: :::::::::CATALAN TRANSLATION::::::::: In /catalog/includes/languages/catalan/index.php, add the following lines right after the line "define('TABLE_HEADING_DATE_EXPECTED', 'Llan?ament');" define('TABLE_HEADING_FEATURED_PRODUCTS', 'Productes Destacats'); define('TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY', 'Productes Destacats en %s'); ::::::::::::::::::::::::::::::::::::: :::::::::FRENCH TRANSLATION::::::::: In /catalog/includes/languages/french/index.php, add the following lines right after the line define('TABLE_HEADING_DATE_EXPECTED', 'Date prévue'); define('TABLE_HEADING_FEATURED_PRODUCTS', 'Produits recommand?s'); define('TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY', 'Produits recommand?s dans %s'); ::::::::::::::::::::::::::::::::::::: Step 11: edit /catalog/index.php and change the two instances of FILENAME_NEW_PRODUCTS to FILENAME_FEATURED Step 12: Now you need to create the database table that will be holding the featured products. You need to run the featured_products_english.sql file's contents in your favourite sql interface (like phpmyadmin) to your database . :::::::::SPANISH TRANSLATION::::::::: You've got an alternative spanish version of the sql file called featured_products_espanol.sql ::::::::::::::::::::::::::::::::::::: :::::::::GERMAN TRANSLATION::::::::: You've got an alternative german version of the sql file called featured_products_german.sql :::::::::::::::::::::::::::::::::::: :::::::::CATALAN TRANSLATION::::::::: You've got an alternative catalan version of the sql file called featured_products_catalan.sql ::::::::::::::::::::::::::::::::::::: :::::::::FRENCH TRANSLATION::::::::: You've got an alternative french version of the sql file called featured_products_french.sql ::::::::::::::::::::::::::::::::::::: Step 13: For this step some customizing may need to be done. The following code includes the seperate pricing contribution. You may also want to add things like a different model number field, cost, or other description... edit /catalog/admin/includes/functions/html_output.php and at the very bottom right before the ?> add: //draw products multiselect box function tep_draw_products_mselect($name, $parameters = '', $selected_vals) { global $currencies, $languages_id; if ($exclude == '') { $exclude = array(); } $select_string = '<select name="' . $name . '"'; if ($parameters) $select_string .= ' ' . $parameters; $select_string .= ' multiple>'; // BOF - Separate_Pricing_Per_Customer_v3.5 $all_groups=array(); $customers_groups_query = tep_db_query("select distinct customers_group_name, customers_group_id from " . TABLE_CUSTOMERS . " order by customers_group_id "); while ($existing_groups = tep_db_fetch_array($customers_groups_query)) { $all_groups[$existing_groups['customers_group_id']]=$existing_groups['customers_group_name']; } $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_code from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by products_code"); while ($products = tep_db_fetch_array($products_query)) { // BOF - Separate_Pricing_Per_Customer_v3.5 // Next lines were original code // if (!in_array($products['products_id'], $exclude)) { // $select_string .= '<option value="' . $products['products_id'] . '">' . $products['products_name'] . ' (' . $currencies->format($products['products_price']) . ')</option>'; // } $price_query=tep_db_query("select customers_group_price, customers_group_id from " . TABLE_PRODUCTS_GROUPS . " where products_id = " . $products['products_id']); $product_prices=array(); while($prices_array=tep_db_fetch_array($price_query)){ $product_prices[$prices_array['customers_group_id']]=$prices_array['customers_group_price']; } reset($all_groups); $price_string=""; $sde=0; while(list($sdek,$sdev)=each($all_groups)){ //if (!in_array((int)$products['products_id'].":".(int)$sdek, $exclude)) { if($sde) $price_string.=", "; $price_string.=$sdev.": ".$currencies->format(isset($product_prices[$sdek]) ? $product_prices[$sdek]:$products['products_price']); $sde=1; } //} if (!in_array($products['products_id'], $selected_vals)) { $select_string .= '<option value="' . $products['products_id'] . '">' . $products['products_model'] . ' ' . $products['products_name'] . ' (' . $price_string . ')</option>\n'; } else { $select_string .= '<option value="' . $products['products_id'] . '" SELECTED>' . $products['products_model'] . ' ' . $products['products_name'] . ' (' . $price_string . ')</option>\n'; } // EOF - Separate_Pricing_Per_Customer_v3.5 } $select_string .= '</select>'; return $select_string; } //draw products multiselect delete box function tep_draw_products_delete_mselect($name, $parameters = '', $selected_vals) { global $currencies, $languages_id; if ($exclude == '') { $exclude = array(); } $select_string = '<select name="' . $name . '"'; if ($parameters) $select_string .= ' ' . $parameters; $select_string .= ' multiple>'; $products_query = tep_db_query("select p.products_id, pd.products_name, s.featured_id, s.featured_date_added, s.featured_last_modified, s.expires_date, s.date_status_change, s.status from " . TABLE_PRODUCTS . " p, " . TABLE_FEATURED . " s, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = s.products_id order by pd.products_name"); while ($products = tep_db_fetch_array($products_query)) { $select_string .= '<option value="' . $products['featured_id'] . '">' . $products['products_model'] . ' ' . $products['products_name'].'</option>\n'; } $select_string .= '</select>'; return $select_string; } Step 14: go to your admin panel and add the products that you want featured. -- HOW TO UNINSTALL --- * To disable this contribution, all you would need to do is set the value of FEATURED_PRODUCTS_DISPLAY in /catalog/includes/configure.php to false. This module will automatically display the "New Products for <month>" infobox if featured products is disabled in the configure.php * Totally removing the Featured Products Infobox means removing each of the lines that were added during the INSTALLATION part of this documentation, and then remove the files that were added. --- HOW TO GET IT GOING --- All you need to do is to add products into the featured products list from the Admin section, by going to your admin section's "catalog" box, and then clicking on "Featured Products". The Featured Products section works exactly like the Specials section, except you don't choose a price. You can choose an expiry date for the Featured Product if you so choose. There is a status on/off button too. Any expired Featured Products will automatically get changed to Off status when their expiry date is reached. That's it. I hope some of you find this useful, and if you do, let me know. Feedback, comments, constructive critisism is always welcome. If I'm missing something in the archive, please let me know. I only want to install and get running "Featured Products" NOT SPPC and have followed the instructions that came with the feat. prod contribution to the letter. I saw that someone else here had the same problems i did a few months back and he was told to relace the code i first posted with the second code i posted....i have done this also and my error is now the one i have posted about.. I am now very confused by all this but determined to get to the bottom of it :thumbsup: Link to comment Share on other sites More sharing options...
jpweber Posted August 30, 2006 Share Posted August 30, 2006 How did they fix it? Did you follow the post? Are you sure you installed the SQL file that came with it? I see it querries customers_groups here in the code, so there must have been an SQL file that came with the contribution. Somewhere, somehow, some contribution must have offered an SQL file to run through your phpmyadmin and add to your database. Do you know how to run an SQL file and add tables to your database? I may download this just to see for myself. Jason Simple 1-2-3 Intructions on how to get, install and configure SSL The Google Sandbox explained Simple to follow instructions on how to change the look of your OSC How To Make A Horrible OSC Website my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ... Link to comment Share on other sites More sharing options...
jpweber Posted August 30, 2006 Share Posted August 30, 2006 I did. I just don't understand how it can ask you to query a table without creating it. You downloaded some version where the person didn't include the SQL file. Try downloading a previous version; it's a pain in the butt, but you have no choice. At least downlod a previous version that has the SQL file in it and run the SQL file so you can get this table onto your database. Jason Simple 1-2-3 Intructions on how to get, install and configure SSL The Google Sandbox explained Simple to follow instructions on how to change the look of your OSC How To Make A Horrible OSC Website my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ... Link to comment Share on other sites More sharing options...
CaptureL Posted August 30, 2006 Author Share Posted August 30, 2006 How did they fix it? Did you follow the post? Are you sure you installed the SQL file that came with it? I see it querries customers_groups here in the code, so there must have been an SQL file that came with the contribution. Somewhere, somehow, some contribution must have offered an SQL file to run through your phpmyadmin and add to your database. Do you know how to run an SQL file and add tables to your database? I may download this just to see for myself. this is the post that i got the info from when i first encountered the problem link as you can see there was never a resolution posted. :( this is what i downloaded. link to contrib The file did come with 1 sql file for creating the "Featured" database. i ran this in phpmyadmin to create that database. This is what was in the sql file. create table featured ( featured_id int(11) not null auto_increment, products_id int(11) default '0' not null , featured_date_added datetime , featured_last_modified datetime , expires_date datetime , date_status_change datetime , status int(1) default '1' , PRIMARY KEY (featured_id) ); INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) values ('39','Featured', 'Featured Products Display', '339', '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.', '39', '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.', '39', '2', now(), now() ); This is the only sql file that came with this contribution. I know how to run a sql file but i do not know how to create one otherwise i might have had a go at creating the missing file to try that. many thanks for your help so far btw...you are a star. :thumbsup: Link to comment Share on other sites More sharing options...
jpweber Posted August 30, 2006 Share Posted August 30, 2006 Then try running the aforementioned SQL query I gave you, and run it in your phpmyadmin: DROP TABLE IF EXISTS customers_groups; CREATE TABLE customers_groups ( customers_group_id smallint UNSIGNED NOT NULL, customers_group_name varchar(32) NOT NULL default '', customers_group_show_tax enum('1','0') NOT NULL, customers_group_tax_exempt enum('0','1') NOT NULL, group_payment_allowed varchar(255) NOT NULL default '', group_shipment_allowed varchar(255) NOT NULL default '', PRIMARY KEY (customers_group_id) ); INSERT INTO customers_groups VALUES('0','Retail','1','0','',''); If this doesn't help, you can always drop the table later on. But I'd at least give it a try. This has the table rows that the contributor is calling. Try it. It's 2:47 in the morning here, so I'm running on fumes. Jason Simple 1-2-3 Intructions on how to get, install and configure SSL The Google Sandbox explained Simple to follow instructions on how to change the look of your OSC How To Make A Horrible OSC Website my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ... Link to comment Share on other sites More sharing options...
CaptureL Posted August 30, 2006 Author Share Posted August 30, 2006 Then try running the aforementioned SQL query I gave you, and run it in your phpmyadmin: DROP TABLE IF EXISTS customers_groups; CREATE TABLE customers_groups ( customers_group_id smallint UNSIGNED NOT NULL, customers_group_name varchar(32) NOT NULL default '', customers_group_show_tax enum('1','0') NOT NULL, customers_group_tax_exempt enum('0','1') NOT NULL, group_payment_allowed varchar(255) NOT NULL default '', group_shipment_allowed varchar(255) NOT NULL default '', PRIMARY KEY (customers_group_id) ); INSERT INTO customers_groups VALUES('0','Retail','1','0','',''); If this doesn't help, you can always drop the table later on. But I'd at least give it a try. This has the table rows that the contributor is calling. Try it. It's 2:47 in the morning here, so I'm running on fumes. Hi Jason hopefully you are getting much needed rest now :-" I tried what you suggested and still no go so i decided to have a tea break (9am at the time here and been up since 5am!) after refreashing my brain i did some more searching and decided to undo most of what i had done for the installation and readded my original output_html file which didn't have the referneces to the missing database. i downloaded and used the older version of the featured products contribution added by Erik Chumley and with a bit mixing and matching and shear luck i finally have it working... :D now lunch time here so i'm off for another tea break and maybe some rest myself :rolleyes: many many thanks for your help and guidance and if you are ever in Norway i'll shout ya pint thanks Lin Link to comment Share on other sites More sharing options...
jpweber Posted August 30, 2006 Share Posted August 30, 2006 Glad to hear your problems are solved, Lin. With some of these contributions, you really have to be careful, because some guys just throw things in there without really thinking and say it's a "full package". Others just say it's a missing couple files to a previous package, and you don't really realize you're not downloading and installing the full package. Others are just from people who want to make a contribution, so they call it the "next series" in that contribution, but it's full of bugs. I'm glad you finally found the right one. And if I went to Norway, I'd go to Oslo to watch a few hockey games, and yes, I'd probably have a couple "pints", as you guys in Europe call them, as well. Good luck with your project. Jason Simple 1-2-3 Intructions on how to get, install and configure SSL The Google Sandbox explained Simple to follow instructions on how to change the look of your OSC How To Make A Horrible OSC Website my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ... Link to comment Share on other sites More sharing options...
Woober Posted August 31, 2006 Share Posted August 31, 2006 I added the module, and it works great. But in admin when I try to delete a featured product I get this message: Fatal error: Call to undefined function: tep_draw_products_delete_mselect() in /home/nddesign/domains/nddesign.no/public_html/dev/beauty/admin/featured.php on line 236 I use version 1.5.6, but I added the fixes from 1.5.5 up to 1.5.6 those who were missing. Anyone who have a solution how I can get pass this error? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.