Trusten Posted February 4, 2003 Posted February 4, 2003 http://www.oscommerce.com/community/contributions,941 Someone asked how i did it. It wasn't that hard. Basically all it does is show a random product each time the customer visits. This product will have a short protion of its description there. With a 'read more' link. It's really basic and cut and paste. Paste the file into catalog/includes/boxes then link it in your default page. Either where it says: <td class="main"><br><?php echo TEXT_MAIN; ?></td> replace with: <td class="main"><?php include(DIR_WS_BOXES . 'display_product.php'); ?></td> or at the greeting, it's up to you. anyways, hope it helps someone. let me know if you find any errors. I tested it first though. Quote
Deskdirect Posted February 4, 2003 Posted February 4, 2003 Awesome! How would I resize the image - in my test they are quite distorted. Quote
Trusten Posted February 4, 2003 Author Posted February 4, 2003 $new_products['products_image'], 'Newest Anime', 210, 138) . that line. that 210, 138 is the pic size. you can take that part out and leave it $new_products['products_image'], 'Newest Anime') . or you can find out the height and width of your average pics and use that instead. good luck. Quote
Deskdirect Posted February 4, 2003 Posted February 4, 2003 Thanks that worked just fine. Keep up the great work! Quote
Guest Posted February 5, 2003 Posted February 5, 2003 Thanks a ton!! :D *runs off to do a happy dance* Quote
Deskdirect Posted March 8, 2003 Posted March 8, 2003 I meant to give this suggestion for the resizing some time ago and forgot. This is what I changed the line to that you suggested above ----> $new_products['products_image'], 'Newest Anime', SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . It keeps all the images looking great! Annette Quote
Guest Posted March 12, 2003 Posted March 12, 2003 Great mod, although I would like to remove the border from the image, how can this be done? Jeff Quote
jgkiefer Posted March 24, 2003 Posted March 24, 2003 $new_products['products_image'], 'Newest Anime', 210, 138) . that line. that 210, 138 is the pic size. you can take that part out and leave it $new_products['products_image'], 'Newest Anime') . or you can find out the height and width of your average pics and use that instead.good luck. How can I use the big product picture instead of the thumbnail? Quote
tetrad Posted July 14, 2006 Posted July 14, 2006 I hate to dig up a dead horse, but does anyone know how to limit the category that this contribution would pull from? I would like it to only pull random products from two categories but I'm not sure how to modify the initial query to this. Any help would be great! Quote
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.
Note: Your post will require moderator approval before it will be visible.