rabbitseffort Posted August 23, 2006 Share Posted August 23, 2006 you will admin it thru the specials admin part, quoting roy above: "The install file tells you that you can change "Selection of Products on Special".--" and if you want your entire catalog to loop then follow his other instruction here: But if you want, you can modify the sql line: $random_products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' order by rand() limit " . MAX_RANDOM_SELECT_SPECIALS); if you lop off everything after rand() so that it looks like rand()" );, that will select everything." If the info box is empty be sure you uploaded the javascript files in the package--that is most likely the cause Quote "I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings." ---Margaret Mead--- "The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer. --Ken Kesey" Link to comment Share on other sites More sharing options...
Antonimo Posted August 29, 2006 Share Posted August 29, 2006 If the info box is empty be sure you uploaded the javascript files in the package--that is most likely the cause Thanks for your answer - i think I had a conflict with some other js, but it works now. Quote Link to comment Share on other sites More sharing options...
desidil4ever Posted October 30, 2006 Share Posted October 30, 2006 pretty nice contribution...works great:) 1 thing I did like to find out is if we can add a loop so it doesnt stop after a certain number....lets say if I use Specials as per original contribution or without...setting a infinite loop will be a great idea. any suggestions??? Quote Simple Add-ons Please add simple plain tips here for others. Link to comment Share on other sites More sharing options...
beachkitty85 Posted April 25, 2007 Share Posted April 25, 2007 I use this contribution as a module instead of a box. I display it at the top of each category to rotate through various products. You can see an example here. I changed the random_products.php file a little bit so that it displays only products from the current category and it's subcategories. Download Version 1.2 I hope someone finds this useful! Quote Link to comment Share on other sites More sharing options...
Guest Posted April 26, 2007 Share Posted April 26, 2007 I use this contribution as a module instead of a box. I display it at the top of each category to rotate through various products. You can see an example here. I changed the random_products.php file a little bit so that it displays only products from the current category and it's subcategories. Download Version 1.2 I hope someone finds this useful! I had a quick look at it and could not find install instructions for your version, so I uploaded the random_products.php file and it was empty. The previous version worked as a box. How do we get yours working? I like the idea and would really like to have both the box and module version working independently. Quote Link to comment Share on other sites More sharing options...
beachkitty85 Posted April 26, 2007 Share Posted April 26, 2007 (edited) I had a quick look at it and could not find install instructions for your version, so I uploaded the random_products.php file and it was empty. The previous version worked as a box. How do we get yours working? I like the idea and would really like to have both the box and module version working independently. Since my module is really entirely different than the original contribution, I've uploaded it as a new contribution. You can download it here. I have updated the install files and everything should be easy and ready to go. Enjoy! Edited April 26, 2007 by beachkitty85 Quote Link to comment Share on other sites More sharing options...
Guest Posted April 27, 2007 Share Posted April 27, 2007 Since my module is really entirely different than the original contribution, I've uploaded it as a new contribution. You can download it here. I have updated the install files and everything should be easy and ready to go. Enjoy! Thanks Christina, I will give it a go. It is fatastic that you are sharing this with us. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 27, 2007 Share Posted April 27, 2007 Since my module is really entirely different than the original contribution, I've uploaded it as a new contribution. You can download it here. I have updated the install files and everything should be easy and ready to go. Enjoy! Hi Christina I am having problems getting the products to display. I fixed the src="jscripts/ location error, but the problem seems to be in <?php if (isset($current_category_id) && ($current_category_id > 0)) { $random_products_query = tep_db_query("select distinct p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by rand() limit " . MAX_RANDOM_SELECT_SPECIALS); } else { $random_products_query = tep_db_query("select distinct p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by rand() limit " . MAX_RANDOM_SELECT_SPECIALS); } Quote Link to comment Share on other sites More sharing options...
beachkitty85 Posted April 27, 2007 Share Posted April 27, 2007 Hi Christina I am having problems getting the products to display. I fixed the src="jscripts/ location error, but the problem seems to be in <?php if (isset($current_category_id) && ($current_category_id > 0)) { $random_products_query = tep_db_query("select distinct p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by rand() limit " . MAX_RANDOM_SELECT_SPECIALS); } else { $random_products_query = tep_db_query("select distinct p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by rand() limit " . MAX_RANDOM_SELECT_SPECIALS); } I'm gonna be totally honest with you - I know absolutely nothing about PHP or JavaScript. I just peiced this together from a few things and it seemed to work great for me. I hope someone is able to help you. Sorry! Quote Link to comment Share on other sites More sharing options...
Guest Posted April 27, 2007 Share Posted April 27, 2007 I'm gonna be totally honest with you - I know absolutely nothing about PHP or JavaScript. I just peiced this together from a few things and it seemed to work great for me. I hope someone is able to help you. Sorry! No need to be sorry. You did a great job. I will try it in an unmodified store tomorrow. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 28, 2007 Share Posted April 28, 2007 I'm gonna be totally honest with you - I know absolutely nothing about PHP or JavaScript. I just peiced this together from a few things and it seemed to work great for me. I hope someone is able to help you. Sorry! Hi Christina You did the same as me with your latest version (Category Slideshow v1.0_1_2.zip) You need to either change the js directory to jscripts or in category_slideshow.php change the jscrits directory to js. I tried on a fresh osc and could not get it to work. It turns out the problem is in category_slideshow.php where it says $random_products_script .= "'" . LARGE_IMAGE_WIDTH . "',"; $random_products_script .= "'" . LARGE_IMAGE_HEIGHT . "',"; I changed the large to small and it worked, so maybe there is another contrib or something that needs to be done also. I also found that it interferes with the several random products v1.1 contrib which I really like. So I guess it is a choice of one or the other. Anyway, good job Christina. Quote Link to comment Share on other sites More sharing options...
beachkitty85 Posted April 28, 2007 Share Posted April 28, 2007 Hi Christina You did the same as me with your latest version (Category Slideshow v1.0_1_2.zip) You need to either change the js directory to jscripts or in category_slideshow.php change the jscrits directory to js. I tried on a fresh osc and could not get it to work. It turns out the problem is in category_slideshow.php where it says $random_products_script .= "'" . LARGE_IMAGE_WIDTH . "',"; $random_products_script .= "'" . LARGE_IMAGE_HEIGHT . "',"; I changed the large to small and it worked, so maybe there is another contrib or something that needs to be done also. I also found that it interferes with the several random products v1.1 contrib which I really like. So I guess it is a choice of one or the other. Anyway, good job Christina. I just uploaded ANOTHER package, lol. I fixed the issues you brought up, so it should work now. :blush: Quote Link to comment Share on other sites More sharing options...
Guest Posted April 28, 2007 Share Posted April 28, 2007 I just uploaded ANOTHER package, lol. I fixed the issues you brought up, so it should work now. :blush: Sorry, I knew of one other error in category_slide_show.php. Line 67 $info_box_contents[] = array('text' => BOX_HEADING_RANDOM_PRODUCTS); should be $info_box_contents[] = array('text' => BOX_HEADING_CATEGORY_SLIDESHOW); The thing with the $random_products_script .= "'" . LARGE_IMAGE_WIDTH . "',"; $random_products_script .= "'" . LARGE_IMAGE_HEIGHT . "',"; is that "something" needs to be specified as LARGE_IMAGE and I was wondering what contrib you used to get the LARGE_IMAGE to work. I use a fairly old contrib that I am planning to change. It is called Big Image and it inserted an sql query called products_bimage The problem with specifying SMALL_IMAGE is that only a thumbnail appears. Quote Link to comment Share on other sites More sharing options...
beachkitty85 Posted April 28, 2007 Share Posted April 28, 2007 Sorry, I knew of one other error in category_slide_show.php. Line 67 $info_box_contents[] = array('text' => BOX_HEADING_RANDOM_PRODUCTS); should be $info_box_contents[] = array('text' => BOX_HEADING_CATEGORY_SLIDESHOW); The thing with the $random_products_script .= "'" . LARGE_IMAGE_WIDTH . "',"; $random_products_script .= "'" . LARGE_IMAGE_HEIGHT . "',"; is that "something" needs to be specified as LARGE_IMAGE and I was wondering what contrib you used to get the LARGE_IMAGE to work. I use a fairly old contrib that I am planning to change. It is called Big Image and it inserted an sql query called products_bimage The problem with specifying SMALL_IMAGE is that only a thumbnail appears. I use UltraPics for my images and it's awesome. You can have a popup image, primary image, about 6 large images and 6 small images. That could be a little off because its all from memory. So is that the last error that you know of? I'm getting ready to go out of town, so I'll post the final package (well, hopefully it's the final one) when I get back on Monday. Thanks for the heads up! Quote Link to comment Share on other sites More sharing options...
Guest Posted April 28, 2007 Share Posted April 28, 2007 I use UltraPics for my images and it's awesome. You can have a popup image, primary image, about 6 large images and 6 small images. That could be a little off because its all from memory. So is that the last error that you know of? I'm getting ready to go out of town, so I'll post the final package (well, hopefully it's the final one) when I get back on Monday. Thanks for the heads up! OK, will check ultrapics. Leave file at large image and perhaps suggest that ultrapics be installed? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 28, 2007 Share Posted April 28, 2007 OK, will check ultrapics. Leave file at large image and perhaps suggest that ultrapics be installed? I meant to add that I do not know of any more errors. Quote Link to comment Share on other sites More sharing options...
platte Posted May 1, 2007 Share Posted May 1, 2007 Hello, I also installed this nice contri.But I have a question. My product pics will shown up with the product text underneath it. But the product text is to big.Is it possible to make it smaller and make it the same as the product _info in the other boxes. Regards Nico Quote Link to comment Share on other sites More sharing options...
FridayNight Posted May 13, 2007 Share Posted May 13, 2007 Very nice and easy contribution! :thumbsup: QUESTION: Is it possible to show just the latest Products usually seen on the front page??? Quote Link to comment Share on other sites More sharing options...
FridayNight Posted May 14, 2007 Share Posted May 14, 2007 got it... if you want to show your latest products just replace on top of "random_products.php" the following lines: if (isset($current_category_id) && ($current_category_id > 0)) { $random_products_query = tep_db_query("select distinct p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by rand() limit " . MAX_RANDOM_SELECT_SPECIALS); } else { $random_products_query = tep_db_query("select distinct p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by rand() limit " . MAX_RANDOM_SELECT_SPECIALS); } with $random_products_query = tep_db_query("select distinct p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by products_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS); Quote Link to comment Share on other sites More sharing options...
Mike_07 Posted July 25, 2007 Share Posted July 25, 2007 Hello People, I have a problem with this contribution, please help me out: Problem: Random box is empty, no products are showing, even if i put the products on special prices. If i put special prices another box will appear on the index, but no products are filling up the random box. What did i do: 1. Put the require code in colum left under the information box. 2. Put the define in english.php 3. Uploaded the js file with the 3 files with a FTP program to catalog. This close! Please help Thanks Quote Link to comment Share on other sites More sharing options...
paul1tour Posted January 4, 2008 Share Posted January 4, 2008 Hello, I've installed it. It workds perfectly with firefox but not with IE7. I can see only the prices but no images inside the box on IE7. Could you help Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted July 1, 2008 Share Posted July 1, 2008 The scriptaculous.js that this contribution uses conflicts with moo tools, light box, shadow box etc. Has anyone got a work around for it? 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.