defcon Posted March 10, 2004 Share Posted March 10, 2004 where is the code that generates the "whats new" block and if i put it in a php nuke block would it work the same? ie. pull random product image and price? Link to comment Share on other sites More sharing options...
defcon Posted March 10, 2004 Author Share Posted March 10, 2004 /includes/boxes/whats_new.php is where it is. does anyone know how to change this code so it will present the random product in my phpnuke block? <!-- whats_new //--> <tr> <td> <?php 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)) { $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('align' => 'left', 'text' => BOX_HEADING_WHATS_NEW ); new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL')); if ($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'], 'NONSSL') . '">' . $random_product['products_name'] . '</a><br>' . $whats_new_price ); new infoBox($info_box_contents); } ?> </td> </tr> <!-- whats_new_eof //--> Link to comment Share on other sites More sharing options...
defcon Posted March 10, 2004 Author Share Posted March 10, 2004 Someone must know how to do this?... i seen it before on serveral website please help Link to comment Share on other sites More sharing options...
defcon Posted March 10, 2004 Author Share Posted March 10, 2004 Please Note: i do not want intergrated version of OS2nuke, i have OScommerce site on a seperate sub domain for security reasons. All i want is to display the item from the Whats New block in OScommerce in a Block in PHPnuke (as that is my front end) please help Link to comment Share on other sites More sharing options...
cburd Posted March 15, 2004 Share Posted March 15, 2004 All you have to do is implement the infobox for whats new in your code. Make sure you have the call to application_top.php and all the other files. And definitly make sure that you have the directory paths correct. If you need help email me. Link to comment Share on other sites More sharing options...
cbr Posted January 20, 2006 Share Posted January 20, 2006 I am trying to accomplish the same thing. I don't want the two integrated but would like to offer a whats new block in my phpnuke page. Any help would be excellent! - CBR Link to comment Share on other sites More sharing options...
cbr Posted February 3, 2006 Share Posted February 3, 2006 I am trying to accomplish the same thing. I don't want the two integrated but would like to offer a whats new block in my phpnuke page. Any help would be excellent! - CBR No ideas here huh? Link to comment Share on other sites More sharing options...
Guest Posted July 11, 2007 Share Posted July 11, 2007 No ideas here huh? The first thing that someone trying to help you is going to ask is : is oscommerce running on the same database as phpnuke, if they are, then the code will be copy paste into a block created from the admin of your nuke site if they are not, then you will have to copy and paste this as well as the connection to the database(provided of course that your sql engine supports multiple database access - most do) you will find the connection to the database in one of the include files for php nuke. my bet is /includes/sql_layer.php though you will have to make sure that none of the variables defined by your osc site are the same as the variables defined by your nuke site, or things may start to get messy. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.