clooney Posted June 28, 2006 Posted June 28, 2006 the first problem im having can be seen HERE. at the bottom of the screen theres an error message. this is where it leads to. i dont know where the problem is. <?php /* $Id: also_purchased_products.php,v 1.21 2003/02/12 23:55:58 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if (isset($HTTP_GET_VARS['products_id'])) { $orders_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED); $num_products_ordered = tep_db_num_rows($orders_query); if ($num_products_ordered >= MIN_DISPLAY_ALSO_PURCHASED) { ?> <!-- also_purchased_products //--> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => TEXT_ALSO_PURCHASED_PRODUCTS); new contentBoxHeading($info_box_contents); $row = 0; $col = 0; $info_box_contents = array(); while ($orders = tep_db_fetch_array($orders_query)) { $orders['products_name'] = tep_get_products_name($orders['products_id']); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . $orders['products_name'] . '</a>'); $col ++; if ($col > 2) { $col = 0; $row ++; } } new contentBox($info_box_contents); ?> also if anyone can check the website and help me with any other problems. like the borders that only shows up everywhere in internet explorer and other stuff, that would be nice. thanks
mark27uk3 Posted June 28, 2006 Posted June 28, 2006 You are missing a closing } by the looks of it. Lifes a bitch, then you marry one, then you die!
mwstinson Posted June 28, 2006 Posted June 28, 2006 the first problem im having can be seen HERE. at the bottom of the screen theres an error message. this is where it leads to. i dont know where the problem is. also if anyone can check the website and help me with any other problems. like the borders that only shows up everywhere in internet explorer and other stuff, that would be nice. thanks add this to the end of the file after the last ?> <!-- also_purchased_products_eof //--> <?php } } ?> I thought this stuff was gonna be easy!! BACK IT UP BEFORE YOU JACK IT UP!!!!
clooney Posted June 29, 2006 Author Posted June 29, 2006 add this to the end of the file after the last ?> <!-- also_purchased_products_eof //--> <?php } } ?> yeah, it dosnt do anything. i figured that was the problem so i took it out to begin with. if you put it back in nothing really happnes. this is what the error says Fatal error: Cannot instantiate non-existent class: contentbox in /home/babybati/public_html/includes/modules/also_purchased_products.php on line 41
crash3903 Posted June 29, 2006 Posted June 29, 2006 you have a stray < somewhere double check the edits and see if you can find the problem - if not then post the code here Regards Mark A Reynolds
Silverado05 Posted June 29, 2006 Posted June 29, 2006 Can you post the lastest file. The error is stating on line 46 but the file you have posted only has 41 lines. Also what mod is this and have you double checked to make sure their isn't a bug fix on it for this problem? Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.
clooney Posted June 29, 2006 Author Posted June 29, 2006 Can you post the lastest file. The error is stating on line 46 but the file you have posted only has 41 lines. Also what mod is this and have you double checked to make sure their isn't a bug fix on it for this problem? yeah i havnt check the contrabutions because this started happening not to long ago, im not sure if there is a download, i figured something was wrong with the code. usually when you have something in there the whole page wont show up, thats why im confused. i cant seem to find anything obviously out of place. <?php /* $Id: also_purchased_products.php,v 1.21 2003/02/12 23:55:58 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if (isset($HTTP_GET_VARS['products_id'])) { $orders_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED); $num_products_ordered = tep_db_num_rows($orders_query); if ($num_products_ordered >= MIN_DISPLAY_ALSO_PURCHASED) { ?> <!-- also_purchased_products //--> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => TEXT_ALSO_PURCHASED_PRODUCTS); new contentBoxHeading($info_box_contents); $row = 0; $col = 0; $info_box_contents = array(); while ($orders = tep_db_fetch_array($orders_query)) { $orders['products_name'] = tep_get_products_name($orders['products_id']); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . $orders['products_name'] . '</a>'); $col ++; if ($col > 2) { $col = 0; $row ++; } } new contentBox($info_box_contents); ?> <?php <!-- also_purchased_products_eof //--> } } ?> thats the latest code i have. ill check the contrabutions pages.
clooney Posted June 29, 2006 Author Posted June 29, 2006 i seemed to have fixed it. weird. i got rid of a couple things along with some spaces. thanks for the help
Recommended Posts
Archived
This topic is now archived and is closed to further replies.