carloshax Posted September 1, 2003 Share Posted September 1, 2003 i am having a problem with this contribution, im running ocs2.2-ms2-cvs but cannot find where to put these: * Add the following lines into /admin/includes/application_top.php, each line at the appropriate place in the file, TABLE_* going with the other TABLE_* define lines, etc. define('FILENAME_FEATURED', 'featured.php'); define('TABLE_FEATURED', 'featured'); i just put the above at the bottom of the file anyway. And the one below that i just put at the bottom of the file, dont know if that is right: * Add the following line into /catalog/includes/application_top.php, define('FILENAME_FEATURED', 'featured.php'); define('FILENAME_FEATURED_PRODUCTS', 'featured_products.php'); // This is the featured products page define('TABLE_FEATURED', 'featured'); to note i get this error instead of main page: 1146 - Table 'carl_trade.TABLE_FEATURED' doesn't exist select featured_id from TABLE_FEATURED where status = '1' and now() >= expires_date and expires_date > 0 [TEP STOP] the sql doc was added to database ok, maybe the above code problem is causing that. Please can someone help Thx Ps has application_top in MS2 changed alot since MS1 Quote Link to comment Share on other sites More sharing options...
carloshax Posted September 1, 2003 Share Posted September 1, 2003 now fixed If anybody else has a problem with this insert the code again in catalog/includes/application_top.php define('FILENAME_FEATURED', 'featured.php'); define('TABLE_FEATURED', 'featured'); For some reason this has to be in both admin and catalog Quote Link to comment Share on other sites More sharing options...
mav Posted September 8, 2003 Share Posted September 8, 2003 to note i get this error instead of main page: 1146 - Table 'carl_trade.TABLE_FEATURED' doesn't exist select featured_id from TABLE_FEATURED where status = '1' and now() >= expires_date and expires_date > 0 [TEP STOP] TABLE_FEATURED isn't defined in the file /includes/database_tables.php. To fix it add this... define('TABLE_FEATURED', 'featured'); After... define('TABLE_CUSTOMERS_INFO', 'customers_info'); Around line 25. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 12, 2003 Share Posted September 12, 2003 * Add the following lines into /admin/includes/application_top.php, each line at the appropriate place in the file, TABLE_* going with the other TABLE_* define lines, etc. define('FILENAME_FEATURED', 'featured.php'); define('TABLE_FEATURED', 'featured'); Where does this go? I lost all my hair trying to find where to put this....can someone give me an approximate line number or some code to look for so i can insert this? Thanks :shock: ant Quote Link to comment Share on other sites More sharing options...
Guest Posted September 12, 2003 Share Posted September 12, 2003 * Add the following line into /catalog/includes/application_top.php, define('FILENAME_FEATURED', 'featured.php'); define('FILENAME_FEATURED_PRODUCTS', 'featured_products.php'); // This is the featured products page define('TABLE_FEATURED', 'featured'); Same thing with this one...can anyone help me find where to put this... I am using MS2. Quote Link to comment Share on other sites More sharing options...
♥olby Posted September 13, 2003 Share Posted September 13, 2003 Hi ant. In MS2 they have moved to: database_tables.php & filenames.php Quote Best Regards olby Link to comment Share on other sites More sharing options...
carloshax Posted September 13, 2003 Share Posted September 13, 2003 This contribution is a god send, by using this contribution and mixing with a few others i have been able to make my main page look like this: www.themodhouse.co.uk/store contributions used for the featured products box: Featured products products_on_order their is another one but i cant think of it atm so i will have to let you know later. Respect goes to all the people who use their spare time creating contributions to help us ALL out. Thx Carl Quote Link to comment Share on other sites More sharing options...
Guest Posted September 13, 2003 Share Posted September 13, 2003 thanks olby that worked perfect! Quote Link to comment Share on other sites More sharing options...
pixiepie Posted October 3, 2003 Share Posted October 3, 2003 I downloaded the Featured_products1.3 extra file, and instead of seeing: "Displaying 1 to 6 (of 11 featured products) Result Pages: 1 2 [Next >>] " I am seeing the following text instead on my "featured_products.php" page: TEXT_DISPLAY_NUMBER_OF_FEATURED_PRODUCTS here is the problem code: <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $featured_products_split->display_count(TEXT_DISPLAY_NUMBER_OF_FEATURED_PRODUCTS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $featured_products_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> Can someone tell me what minor change I need to make to get this to work? I have the solution to this problem... If someone has installed the featured products to their MS2, and try to show all the featured products catalog/featured_products.php It will not work. The solution above would gives only the full list of the featured products without pages To have the display as below, you need a new file which I have managed to do (not perfect but it works) Displaying 1 to 6 (of 11 featured products) Result Pages: 1 2 [Next >>] I will upload in the next few days if needed by others.. I LOVE this contribution, but I gotta say that the install files for this contribution leave a WHOLE lot to be desired.. There are HUGE holes in the install doc.. Thank god for this forum to get things on track.. :) Quote Link to comment Share on other sites More sharing options...
hplink Posted October 4, 2003 Share Posted October 4, 2003 I have a problemm when the table feature empty,there is a insert key when I add one profuctm the insert key disappeared why Quote Link to comment Share on other sites More sharing options...
Pharkie Posted October 17, 2003 Share Posted October 17, 2003 Seems quite a few people are having a problem with this mod! I know people hate long posts with files, but I don't have time to edit it to the highlights. So here it is - I reckon it will help someone somewhere. This is the original README, with my added comments on how it's incorrect. To get the right files to use, you must download the ORIGINAL featured_products, from the bottom of its Contributions page, then go through the ones above replacing files until you have the final version. Then follow these instructions paying attention to my notes and it MIGHT work :) Any problems you can try emailing me on [email protected] --------------------------- Featured Products Infobox V1.3 by Aubrey Kilian <[email protected]> for osCommerce V2.2 CVS (http://www.oscommerce.com) Date: 15/11/2002 Released under the GNU General Public License --- 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 (by the admin) products in the infobox, instead of new products. It's been written in such a way that the Infobox will *not* show up if there are no featured products to display. 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. Adam: My OSC is installed in a directory called 'shop' not 'catalog', so bear that in mind. Archive comes with admin at same level as shop when on a Raq it must be /shop/admin/ since /admin is already allocated. So if where i use /shop/admin/, you should probably use /admin/ List of files changed (so you know what to upload once you're done): (When the original install says the name before the arrow, it MEANS the name after.) /shop/default.php -> /shop/index.php /shop/includes/application_top.php /shop/includes/languages/english/default.php -> /shop/includes/languages/english/index.php /shop/admin/includes/application_top.php /catalog/includes/configure.php -> /shop/admin/includes/configure.php /shop/admin/includes/languages/english.php /shop/admin/includes/boxes/catalog.php /shop/includes/database_tables.php /shop/admin/includes/database_tables.php --- 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. * Copy the directory structure that came with this archive, as it is into your /catalog and /admin direcories. * Add the following line to /admin/includes/languages/english.php : define('BOX_CATALOG_FEATURED', 'Featured Products'); * Add the following lines into /admin/includes/application_top.php, (Locations changed) each line at the appropriate place in the file, TABLE_* going with the other TABLE_* define lines, etc. define('FILENAME_FEATURED', 'featured.php'); -> Do this in /shop/admin/includes/filenames.php instead define('TABLE_FEATURED', 'featured'); -> Do this in /shop/admin/includes/database_tables.php instead * Add the following line into /admin/includes/boxes/catalog.php, right before the line that contains "FILENAME_PRODUCTS_EXPECTED" (line 29 in the latest cvs version) '<a href="' . tep_href_link(FILENAME_FEATURED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_FEATURED . '</a><br>' . * Add the following line into /catalog/includes/application_top.php (Locations changed) define('FILENAME_FEATURED', 'featured.php'); -> Do this in /shop/includes/filenames.php instead define('FILENAME_FEATURED_PRODUCTS', 'featured_products.php'); -> Do this in /shop/includes/filenames.php instead define('TABLE_FEATURED', 'featured'); -> Do this in /shop/includes/database_tables.php instead * 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(); * In /catalog/includes/languages/english/default.php, add the following line right after the line "define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');" (roughly line 17) : define('TABLE_HEADING_FEATURED_PRODUCTS', 'Featured Products'); and add the following line right before the very last curly bracket, after the line "define('HEADING_TITLE', 'Categories');" define('TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY', 'Featured Products in %s'); * Add the following line to the end of /catalog/includes/configure.php right before the last ?>, and set the value to what you want the maximum featured products that should be displayed to be. define('MAX_DISPLAY_FEATURED_PRODUCTS', '6'); define('MAX_DISPLAY_FEATURED_PRODUCTS_LISTING', '10'); define('FEATURED_PRODUCTS_DISPLAY', false); Adam: No idea where these are supposed to go, since the specified file doesn't exist? I whacked it at the top of /shop/index.php which works for that page, so i need to find somewhere central to put it now. * Now edit /catalog/default.php and change the two instances of FILENAME_NEW_PRODUCTS to FILENAME_FEATURED * Now you need to create the database table that will be holding the featured products. You need to run the featured_products.sql file's contents in your favourite sql interface to your database, either command-line mysql, or phpmyadmin, or whatever. Command line syntax for linux would be something like : > mysql -u USERNAME -p DBNAME < featured_products.sql Then type your password. Use something like phpMyAdmin or something, much easier. That's it. So far, the Featured Products has just been installed, but not activated yet. It's been written that you can, at will, switch between the Featured Products box, and the What's New box. To change it to show the Featured Products, just changed the FEATURED_PRODUCTS_DISPLAY define line in the /catalog/includes/configure.php file to true. Then just go and add your products that you want to be featured, in the admin panel. -- 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. --- NEW V1.3 FEATURES --- Updated to fix several bugs reported via e-mail by the following people, thanks guys : Rich Lawrence <[email protected]> M. Petrovic <[email protected]> Emiliano Casta?o <[email protected]> See ChangeLog file for list of bugs fixed. WARNING: Upgrading from V1.x to V1.3 is not just an overwrite of the current files to the later files. There are some file edits that need to be done too... So work through the "HOW TO INSTALL" section again and make sure you have all the file edits done. --- Aubrey Kilian [email protected] Quote Link to comment Share on other sites More sharing options...
korsh Posted October 19, 2003 Share Posted October 19, 2003 Hello, I have just installed Featured_Products Infobox v1.3 on oscommerce-2.2ms2. I also added the change from featured_products.1.3_extra_file. I created the database table. It all looked fine so I added a featured product set to expire in two days. That showed up as expected replacing the "New Products" infobox. When I went back to add some more products in Admin there was nothing but the Title and Table headers showing on the featured products page. The buttons for editing were no longer visible nor was the product I had entered previously. The featured product still displays on the main oscommerce page. Can anyone throw any light on this situation? I have been through it twice with the same result. korsh Quote Link to comment Share on other sites More sharing options...
korsh Posted October 19, 2003 Share Posted October 19, 2003 To add to my previous post I also found that when I clicked on the featured product Infobox header the featured product page came up with the following error Featured Products 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 'select p.products_id, pd.products_name, p.products_image, p.pro select count(select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = \'1\' left join specials s on p.products_id = s.products_id left join featured f on p.products_id = f.products_id where p.products_status = \'1\' and f.status = \'1\' order by p.products_date_added DESC, pd.products_name) as total I have no idea what that means. korsh Quote Link to comment Share on other sites More sharing options...
Pharkie Posted October 20, 2003 Share Posted October 20, 2003 I had that. It's because your define('MAX_DISPLAY_FEATURED_PRODUCTS', '6'); define('MAX_DISPLAY_FEATURED_PRODUCTS_LISTING', '10'); define('FEATURED_PRODUCTS_DISPLAY', 'true'); bit isn't in - and my reason for that was that, as I suggested above, the file the Install instructions tell you to put it in doesn't exist! So I've put those lines at the bottom of application_top.php and that seems to have fixed it. I had another problem then that echo $featured_products_split->display_count(TEXT_DISPLAY_NUMBER_OF_FEATURED_PRODUCTS); gave some random text as if the variable hadn't been filled in / defined. So I just took that out of catalog/featured_products.php for now since I couldn't see how to fix that easily. Hope this helps.. Adam Quote Link to comment Share on other sites More sharing options...
korsh Posted October 22, 2003 Share Posted October 22, 2003 Hello Adam, I rechecked all the file changes and they are all there in their right places and all the required files are present. I was able to put the files into catalog/includes/configure.php define('MAX_DISPLAY_FEATURED_PRODUCTS', '6'); define('MAX_DISPLAY_FEATURED_PRODUCTS_LISTING', '10'); define('FEATURED_PRODUCTS_DISPLAY', 'true'); But I still have the same problem I can add one item only. After I have inserted that item when I click again on the featured products link, the page only has the headers, the product already entered and the insert button are now missing. So effectively I can only add one product at a time until the expiry brings the button back again! Tell me what file was the code you mentioned in? echo $featured_products_split->display_count(TEXT_DISPLAY_NUMBER_OF_FEATURED_PRODUCTS); That may have some influence on why I can only have one product displayed. James Quote Link to comment Share on other sites More sharing options...
djs Posted November 8, 2003 Share Posted November 8, 2003 But I still have the same problem I can add one item only. Have you found an answer to this yet? I'm having the same problem, with only having one product at a featured product, then I can't add anymore. Dan Quote Dan Stevens Link to comment Share on other sites More sharing options...
djs Posted November 8, 2003 Share Posted November 8, 2003 I figured it out, I had to remove the tep_ as mentioned a few posts back. Dan Quote Dan Stevens Link to comment Share on other sites More sharing options...
ari Posted November 11, 2003 Share Posted November 11, 2003 Hi there pixiepie or anyone out there - can you please point me to the solution to the echo $featured_products_split->display_count(TEXT_DISPLAY_NUMBER_OF_FEATURED_PRODUCTS); problem? Ari Quote Link to comment Share on other sites More sharing options...
stevenvan Posted November 13, 2003 Share Posted November 13, 2003 (edited) Hi there, GREAT Contribution!! This is what i'am looking for!Hi there, Edited November 13, 2003 by stevenvan Quote Link to comment Share on other sites More sharing options...
Pharkie Posted November 18, 2003 Share Posted November 18, 2003 OK - I was wrong about /catalog/includes/configure.php - I've found it now, dunno where I was looking before! So ignore what I said about that. As for the echo $featured_products_split->display_count(TEXT_DISPLAY_NUMBER_OF_FEATURED_PRODUCTS); stuff, it's in the main file for this mod, catalog/featured_products.php I commented it out without any problems This mod doesn't seem to use the standard way of doing a product_listing either (includes/modules/product_listing.php) which is bad. If you changed that file, like I did, you have an inconsistent product listing between Featured Products and the rest of your store. Quote Link to comment Share on other sites More sharing options...
Pharkie Posted November 18, 2003 Share Posted November 18, 2003 pixiepie or anyone out there - can you please point me to the solution to the echo $featured_products_split->display_count(TEXT_DISPLAY_NUMBER_OF_FEATURED_PRODUCTS); problem? What problem are you having? Everything seems to be OK for people now? Are you getting an error message? Have you sorted out the TEP_ issue that djs refers to? Adam Quote Link to comment Share on other sites More sharing options...
Guest Posted November 21, 2003 Share Posted November 21, 2003 I am wanting to change the text color of the "Featured Products" Header to the featured products box - - where can i chage the style that is associated with the header http://www.sonicterror.net/index_cool_store.php -- look here. right now it's blue and really hard to read on the grey..i would like to make it white. Quote Link to comment Share on other sites More sharing options...
Pharkie Posted November 22, 2003 Share Posted November 22, 2003 Can't see your page: Warning: mysql_connect(): Host '64.72.132.17' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts' in /home/sonicterror/www/catalog/includes/functions/database.php on line 19 Unable to connect to database server! Looks like your host can't handle too much mySQL stuff ! To change the header colour, i'd look in /catalog/includes/boxes/feature_products.php Quote Link to comment Share on other sites More sharing options...
Earthkeeper Posted December 4, 2003 Share Posted December 4, 2003 Hi there pixiepie or anyone out there - can you please point me to the solution to the echo $featured_products_split->display_count(TEXT_DISPLAY_NUMBER_OF_FEATURED_PRODUCTS); problem? Ari Ari, to fix that, you need to add a line to catalog/includes/languages/english.php (or whatever language file you're using) Add this line anywhere you want: define('TEXT_DISPLAY_NUMBER_OF_FEATURED_PRODUCTS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> featured products)'); Quote Link to comment Share on other sites More sharing options...
rubygirl Posted January 11, 2004 Share Posted January 11, 2004 How do you stop the featured products from displaying random? I want to display the products in a particular order only and not have the random - am running MS2 2.2 thanks! 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.