Guest Posted August 10, 2005 Share Posted August 10, 2005 Been trying to install the xsell contribution and when look at a product are getting the following errors:- Warning: main(includes/languages/english/xsell_products.php): failed to open stream: No such file or directory in /var/www/html/includes/modules/xsell_products.php on line 13 Warning: main(includes/languages/english/xsell_products.php): failed to open stream: No such file or directory in /var/www/html/includes/modules/xsell_products.php on line 13 Fatal error: main(): Failed opening required 'includes/languages/english/xsell_products.php' (include_path='.:/php/includes:/usr/share/php') in /var/www/html/includes/modules/xsell_products.php on line 13 I have included below contents of the xsell_products.php script and any help you can give would be most appreciated. Thanks, Dave <?php /* $Id: xsell_products.php, v1 2002/09/11 // adapted for Separate Pricing Per Customer v4 2005/02/24 osCommerce, Open Source E-Commerce Solutions <http://www.oscommerce.com> Copyright © 2002 osCommerce Released under the GNU General Public License */ require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_XSELL_PRODUCTS); // BOF Separate Pricing Per Customer if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } if ($HTTP_GET_VARS['products_id']) { if ($customer_group_id != '0') { $xsell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, IF(pg.customers_group_price IS NOT NULL, pg.customers_group_price, p.products_price) as products_price from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_status = '1' and pg.customers_group_id = '".$customer_group_id."' order by sort_order asc limit " . MAX_DISPLAY_ALSO_PURCHASED); } else { $xsell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, products_price from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_status = '1' order by sort_order asc limit " . MAX_DISPLAY_ALSO_PURCHASED); } // EOF Separate Pricing Per Customer $num_products_xsell = tep_db_num_rows($xsell_query); if ($num_products_xsell >= MIN_DISPLAY_XSELL) { ?> <!-- xsell_products //--> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => TEXT_XSELL_PRODUCTS); new contentBoxHeading($info_box_contents); $row = 0; $col = 0; $info_box_contents = array(); while ($xsell = tep_db_fetch_array($xsell_query)) { $xsell['specials_new_products_price'] = tep_get_products_special_price($xsell['products_id']); if ($xsell['specials_new_products_price']) { $xsell_price = '<s>' . $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</s><br>'; $xsell_price .= '<span class="productSpecialPrice">' . $currencies->display_price($xsell['specials_new_products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</span>'; } else { $xsell_price = $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_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=' . $xsell['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . $xsell['products_name'] .'</a><br>' . $xsell_price. '<br><a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $xsell['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) .'</a>'); $col ++; if ($col > 2) { $col = 0; $row ++; } } new contentBox($info_box_contents); ?> <!-- xsell_products_eof //--> <?php } } ?> Quote Link to comment Share on other sites More sharing options...
♥Vger Posted August 10, 2005 Share Posted August 10, 2005 Did you add the filename to includes/filenames.php? Vger Quote Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2005 Share Posted August 11, 2005 Did you add the filename to includes/filenames.php? Vger <{POST_SNAPBACK}> Yes have checked and this all looks ok to me. HELPPPPPPPPPPPPPPPPP Quote Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2005 Share Posted August 11, 2005 Yes have checked and this all looks ok to me. HELPPPPPPPPPPPPPPPPP <{POST_SNAPBACK}> Rhea, Have sorted the problem out. Amazing what a nights sleep can do whilst your brain is going over and over the coding ! Will have a look at your websiite suggest in your PM and will discuss with my business partner but at the moment its very early days for us. Once again many thanks for all your help. Regards, Dave Quote Link to comment Share on other sites More sharing options...
AllTheAbove Posted August 12, 2005 Share Posted August 12, 2005 Rhea, Have sorted the problem out. Amazing what a nights sleep can do whilst your brain is going over and over the coding ! Will have a look at your websiite suggest in your PM and will discuss with my business partner but at the moment its very early days for us. Once again many thanks for all your help. Regards, Dave <{POST_SNAPBACK}> Ok.. I need help with this one.. I see lines like this <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> However this isn't in includes, its in includes/modules. Logic tells me that is I put it as DIR_WS_MODULES it will point to catalog/modules and not catalog/include/modules. So, then I think I can just tell it DIR_WS_INCLUDES/MODULES .. Nope So, then I try DIR_WS_INCLUDES_MODULES .. That didn't work.. So then I tried include instead of require since that worked for index.php to call a module, but no luck. I need to know how to tell it that the file is in the includes/modules dir. Here is the piece of code I am working with from product_info.php <tr> <td> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); ?></td> </tr> </td> </tr> </table></form></td> <?php // ISM start require (DIR_WS_INCLUDES . 'skin_bottom.php'); // ISM end ?> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> </table> </td> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Thanks for any help Lori Quote Link to comment Share on other sites More sharing options...
AllTheAbove Posted August 13, 2005 Share Posted August 13, 2005 Can anyone help me on this, please? 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.
Note: Your post will require moderator approval before it will be visible.