www.in.no Posted February 20, 2010 Share Posted February 20, 2010 First of all 1.6.4 dont have sql as it is only updates, bugfix. Are you using sql file from 1.6.3? Make sure there are no groupe id at no 18 and change if it is taken. # Find and replace '18' to the next `configuration_group_id` available # in table `configuration_group` I would also use the english sql file and translate manualy as there is a diffrent in the sql fields in the package. What way are you inserting the sql. phpmyadmin ? Quote Link to comment Share on other sites More sharing options...
lgayle Posted February 22, 2010 Share Posted February 22, 2010 Can someone please help me with this error 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX_DISPLAY_FEATURED_PRODUCTS' at line 3 SELECT p.products_id, p.products_image, p.products_tax_class_id, IF (s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, p.products_price, pd.products_name FROM products p LEFT JOIN specials s ON p.products_id = s.products_id LEFT JOIN products_description pd ON p.products_id = pd.products_id AND pd.language_id = '1' LEFT JOIN featured f ON p.products_id = f.products_id WHERE p.products_status = '1' AND f.status = '1' order by rand(1658269412) DESC limit MAX_DISPLAY_FEATURED_PRODUCTS [TEP STOP] Thank you Michelle Quote Link to comment Share on other sites More sharing options...
www.in.no Posted February 22, 2010 Share Posted February 22, 2010 MAX_DISPLAY_FEATURED_PRODUCTS means that you have done somthing wrong in the installation instruction. Have you run the sql file into your db. MAX_DISPLAY_FEATURED_PRODUCTS is not defined as it should as this value is to be set from mysql db. Check the install instruction again, and se if you have missed somthing. Also use the english sql file as the other language is not up to date. Translate if you need. Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted February 22, 2010 Share Posted February 22, 2010 First of all 1.6.4 dont have sql as it is only updates, bugfix. Are you using sql file from 1.6.3? Make sure there are no groupe id at no 18 and change if it is taken. # Find and replace '18' to the next `configuration_group_id` available # in table `configuration_group` I would also use the english sql file and translate manualy as there is a diffrent in the sql fields in the package. What way are you inserting the sql. phpmyadmin ? Hello, Yes, I'm using both import .sql file into phpMyAdmin and run sql query in to hphMyAdmin. This shows as result: INSERT INTO `osc_configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES (null, 'New Reviews', 'MAX_DISPLAY_NEW_FEATURED', '15', 'Maximum number of new featured to display', 6, 0, NULL, '2009-12-26 08:14:01', NULL, NULL), (null, 'Featured Level', 'SERVICE_FEATURED_ENABLE_FEATURED', '1', 'Customer level required to write a featured.', 6, 0, NULL, '2009-12-26 08:14:01', NULL, 'osc_cfg_set_boolean_value(array(''0'', ''1'', ''2''))'), (null, 'Moderate featured', 'SERVICE_FEATURED_ENABLE_MODERATION', '1', 'Should featured be approved by store admin.', 6, 0, NULL, '2009-12-26 08:14:01', NULL, 'osc_cfg_set_boolean_value(array(''-1'', ''0'', ''1''))') CREATE TABLE `featured` ( `featured_id` int(11) NOT NULL auto_increment, `products_id` int(11) NOT NULL default '0', `featured_date_added` d[...] MySQL say: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE `featured` ( `featured_id` int(11) NOT NULL auto_increment, `' at line 9 18 in the `configuration_group_id` is not taken. But it in index it said: "Index: Key: PRIMARY Type: PRIMARY Cardinality: 18 Field: configuration_group_id" Any idea? Quote Link to comment Share on other sites More sharing options...
www.in.no Posted February 22, 2010 Share Posted February 22, 2010 I am not that into mysql, but i can vagely remember that i had some problems with the "not null" part sometimes. Try this code, just cleaned up. # -------------------------------------------------------- # $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'),"); Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted February 28, 2010 Share Posted February 28, 2010 (edited) First of all 1.6.4 dont have sql as it is only updates, bugfix. Are you using sql file from 1.6.3? Make sure there are no groupe id at no 18 and change if it is taken. # Find and replace '18' to the next `configuration_group_id` available # in table `configuration_group` I would also use the english sql file and translate manualy as there is a diffrent in the sql fields in the package. What way are you inserting the sql. phpmyadmin ? Yes, it works now! :-) Thanks! Edited February 28, 2010 by WorkingHard Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted February 28, 2010 Share Posted February 28, 2010 Hello, I have installed this add-on, or more correct just data base part. But I'm confused by this: "4. in the catalog/admin/ go to templetes->templates modules->content here install the Featured product by clicking on the install button on the right side of the page. 5. After then click on the templates->templates modules Layoout->content here click on the insert button then select the featured product within the modules dropdown. select the pages like products/* within the pages dropdown box. select after in the group drop down box. also sort orderlike 400. now click on the save button." What the heck does that means?? I cant find that? !? Please help. Quote Link to comment Share on other sites More sharing options...
www.in.no Posted February 28, 2010 Share Posted February 28, 2010 Do you have template system installed, like STS. Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted March 1, 2010 Share Posted March 1, 2010 Do you have template system installed, like STS. Hello, Yes I'm using STS 4.5.3. Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted March 1, 2010 Share Posted March 1, 2010 Furthermore there are 3 different instructions but not exactly description of which to use for STS template: 1) In readme file it said: -------- 1. Copy all the files with its related folder. 2. run the sql file in the phpmyadmin. 3. Add this code in catalog/includes/database_tables.php define('TABLE_FEATURED', 'featured'); 4. in the catalog/admin/ go to templetes->templates modules->content here install the Featured product by clicking on the install button on the right side of the page. 5. After then click on the templates->templates modules Layoout->content here click on the insert button then select the featured product within the modules dropdown. select the pages like products/* within the pages dropdown box. select after in the group drop down box. also sort orderlike 400. now click on the save button. ------- NOTE: There is no 'right side of page' etc...? Can this be used for STS OSC installations? 2) In 'Install Text' file (that comes with Featured Products v1.6.3 release) there are 2 totally different installation instructions. My question is: Which one to use for STS installations? All 20 steps OR just 15-20 steps? I will really appreciate any help here. Thanks. Quote Link to comment Share on other sites More sharing options...
www.in.no Posted March 1, 2010 Share Posted March 1, 2010 I am not using STS so i cant be sure. I think you have to do all 20 steps, but only step 15 is the extra changes that are needed for STS. You can also try to read the instruction for 161 or earlyer packages with STS to se if it make any more sence. Quote Link to comment Share on other sites More sharing options...
www.in.no Posted March 1, 2010 Share Posted March 1, 2010 I am not using STS so i cant be sure. I think you have to do all 20 steps, but only step 15 is the extra changes that are needed for STS. You can also try to read the instruction for 161 or earlyer packages with STS to se if it make any more sence. Quote Link to comment Share on other sites More sharing options...
WorkingHard Posted March 2, 2010 Share Posted March 2, 2010 I am not using STS so i cant be sure. I think you have to do all 20 steps, but only step 15 is the extra changes that are needed for STS. You can also try to read the instruction for 161 or earlyer packages with STS to se if it make any more sence. Yes I did so and it is working now! Thanks! I have however still one minor 'problem'. In normal OSC (with STS switched off) Featured project box shows as a box on left side and on the index page - just as it should. Switching ON the STS template result in that the left side Featured Project disappear - only the one on index page is left. Can someone recommend what need to be done to fix that missing box? Quote Link to comment Share on other sites More sharing options...
www.in.no Posted March 2, 2010 Share Posted March 2, 2010 I remember there was a code in the install text you had to put in where you want the box to show. You must add this code to the colum_left file someway or somwhere in the STS code/template. Quote Link to comment Share on other sites More sharing options...
nguyen.chiencong Posted March 3, 2010 Share Posted March 3, 2010 Hi guys, can u help me on this problem: I installed featured products, everything seems to be fine when i try to click on a category of products. the page is totally messed up with the following message Call to undefined function tep_array_values_to_string() /home/......../public_html/includes/modules/featured.php on line 52 Many thanks in advance for your answers. Cong Quote Link to comment Share on other sites More sharing options...
germ Posted March 4, 2010 Share Posted March 4, 2010 You didn't add the code for it to /includes/functions/general.php // Featured Products Mod Begin function tep_array_values_to_string($array, $separator = ',') { $get_string = ''; if (sizeof($array) > 0) { while (list($key, $value) = each($array)) { $get_string .= $value . $separator; } $remove_chars = strlen($separator); $get_string = substr($get_string, 0, -$remove_chars); } return $get_string; } It's in the install files. nguyen.chiencong 1 Quote 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...
nguyen.chiencong Posted March 4, 2010 Share Posted March 4, 2010 thank you very much even though i managed to solve the problem. this forum is great. So many talented developers helping the beginners You didn't add the code for it to /includes/functions/general.php // Featured Products Mod Begin function tep_array_values_to_string($array, $separator = ',') { $get_string = ''; if (sizeof($array) > 0) { while (list($key, $value) = each($array)) { $get_string .= $value . $separator; } $remove_chars = strlen($separator); $get_string = substr($get_string, 0, -$remove_chars); } return $get_string; } It's in the install files. Quote Link to comment Share on other sites More sharing options...
adamsleath Posted March 4, 2010 Share Posted March 4, 2010 (edited) i have an easy question, if someone deigns to answer :huh: which file defines the title text for the featured products box? :D also; is there a coding to display "Featured Products for [current month]"? Edited March 4, 2010 by adamsleath Quote Link to comment Share on other sites More sharing options...
www.in.no Posted March 4, 2010 Share Posted March 4, 2010 Normaly you only have 2 options for language. And normaly you will understand from the install instruction as they are eighter added manualy or there is a file copyed to the language folder. one is in includes/languaga/feature.php (addon name) or in the include/language/language.php file (english.php) Quote Link to comment Share on other sites More sharing options...
Shogun Posted March 25, 2010 Share Posted March 25, 2010 Hi, Im currently using Featured products and need to decrease the space between the products. In what file and were can this be adjusted? As it is now there is just too much whitespace between the products. Richard Quote Link to comment Share on other sites More sharing options...
joegreen Posted March 25, 2010 Share Posted March 25, 2010 Hi ive installed this but in my admin/configuration, i can't find "Featured" , i try to add items in "Featured Products" but my featured module still empty. I've been trying to reinstall but nothing's change. Can you help me ? thanks Quote Link to comment Share on other sites More sharing options...
[email protected] Posted March 26, 2010 Share Posted March 26, 2010 Hi ive installed this but in my admin/configuration, i can't find "Featured" , i try to add items in "Featured Products" but my featured module still empty. I've been trying to reinstall but nothing's change. Can you help me ? thanks Hello, I have just installed Featured Products v 1.6.5 on a store running STSv4.6 and am having a couple of issues but I think I can at least answer your question. If you installed things correctly in the Admin/Configuration list you will see "Featured", it is at the bottom of my list. You have to turn it "On" and "Off" here. You will then see under Admin/Catalog a "Featured Products". You add your products here. Hope that helped. Good Luck RJ Quote Link to comment Share on other sites More sharing options...
joegreen Posted March 26, 2010 Share Posted March 26, 2010 Thanks RJ But i've check my modified files 2 times, its ok, i suppose that trouble lies in my SQL, when i try to import "featured_products_english.sql " ihave error my SQL:#1050 - Table 'featured' already exists Quote Link to comment Share on other sites More sharing options...
[email protected] Posted March 26, 2010 Share Posted March 26, 2010 Thanks RJ But i've check my modified files 2 times, its ok, i suppose that trouble lies in my SQL, when i try to import "featured_products_english.sql " ihave error my SQL:#1050 - Table 'featured' already exists Joe, I am not an expert, but I do remember bumping into the same thing, I ended up deleting the "Featured" table and then ran a another sql to rebuild it. Once I did that I had more success. RJ Quote Link to comment Share on other sites More sharing options...
joegreen Posted March 26, 2010 Share Posted March 26, 2010 Joe, I am not an expert, but I do remember bumping into the same thing, I ended up deleting the "Featured" table and then ran a another sql to rebuild it. Once I did that I had more success. RJ Its really help me, featured module finally work. I'm very thankful for help. But one thing that can't understand- why in my featured module only five items, i change Maximum Display of Featured on 9 and add in Featured Products proper amounts of products but still image only 5) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.