Davidstokes Posted February 21, 2007 Share Posted February 21, 2007 Hi, I have a site here http://www.maka.ie/site and my shop is here http://www.maka.ie/store On the site i have some products listed on the side, But i placed them there by hand and they dont change at all. Is it possible to put some code on my site that will link to the shop and display 2 or 3 products plus there prices and a buy now button. If i refreshed the site it would change. Has anyone done this and do you think it's possible to do thanks, Link to comment Share on other sites More sharing options...
Davidstokes Posted February 22, 2007 Author Share Posted February 22, 2007 anyone????? Link to comment Share on other sites More sharing options...
Davidstokes Posted February 23, 2007 Author Share Posted February 23, 2007 ?????????????????????????? Link to comment Share on other sites More sharing options...
ErollorD Posted February 23, 2007 Share Posted February 23, 2007 I can do this... Link to comment Share on other sites More sharing options...
ErollorD Posted February 23, 2007 Share Posted February 23, 2007 something like this?? http://www.em-studio.info/shop2/random.php Link to comment Share on other sites More sharing options...
Davidstokes Posted February 26, 2007 Author Share Posted February 26, 2007 well yes but it could have to appear on the different page like the one i have displayed in the 1st post Link to comment Share on other sites More sharing options...
Guest Posted March 3, 2007 Share Posted March 3, 2007 something like this?? http://www.em-studio.info/shop2/random.php sorry the link does not work... we want to do the same.. maybe a random pull from the entire shop! can this be done? Link to comment Share on other sites More sharing options...
Davidstokes Posted March 16, 2007 Author Share Posted March 16, 2007 Ok i figured out a way to do this in my head but getting it to work is another thing, I found the code in the "whats new" area and it will work as it changes products everytime you refresh the page. here is the code <?php /* $Id: whats_new.php,v 1.31 2003/02/10 22:31:09 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url=http://www.oscommerce.com]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { ?> <!-- whats_new //--> <tr> <td> <?php $random_product['products_name'] = tep_get_products_name($random_product['products_id']); $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW); new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW)); if (tep_not_null($random_product['specials_new_products_price'])) { $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>'; $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br>' . $whats_new_price); new infoBox($info_box_contents); ?> </td> </tr> <!-- whats_new_eof //--> <?php } ?> Now how do i get it to appear on my site in the side area www.maka.ie/index.php the product there now is just static. I tried putting the code in the txt file and linking to using <?php include("products1.txt") ?> But this didnt work. Does anyone know a way i can place the code and get it working? thanks. Link to comment Share on other sites More sharing options...
bill110 Posted March 16, 2007 Share Posted March 16, 2007 catelog/includes/column_right.php add this code require(DIR_WS_BOXES . 'whats_new.php'); then in catelog/includes/languages/english.php change the part below in bold to whatever you want the box header to display // whats_new box text in includes/boxes/whats_new.php define('BOX_HEADING_WHATS_NEW', 'What\'s New?'); My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai Link to comment Share on other sites More sharing options...
Davidstokes Posted March 16, 2007 Author Share Posted March 16, 2007 I dont think that will work. I want to the product images/info to appear on the totally different page from the shop. if this is the way,... What code will i add to my site for it to work. Link to comment Share on other sites More sharing options...
Davidstokes Posted March 28, 2007 Author Share Posted March 28, 2007 Nothing is working so far. what i need it on this site www.maka.ie for random stock to appear on the right side, i have placed stock there to show what i need. But i can't figure how what code i need to have there. Does anyone know ? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.