phoenixunified Posted March 10, 2007 Share Posted March 10, 2007 I am running CRE Loaded Pro B2B and am trying to install 'Prices for logged-In Only' as it is EXACTLY what I need. I backed out Wishlist 2.2 in order to apply the changes to application_top.php. Now I am trying to make the code change in catalog/product_info.php and I am not familiar enough with PHP to code the change when sub products are installed. The original code to find was: if ($products_options['options_values_price'] != '0') { and was to be replaced with: if ($products_options['options_values_price'] != '0' && tep_session_is_registered('customer_id')) { But in CRE Loaded Pro B2B the catalog/product_info.php file looks like this: <?php /* $Id: product_info.php,v 1.1.1.1 2004/03/04 23:38:02 ccwjr 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 */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); //check if product is really a subproduct $product_sub_product_query = tep_db_query("select products_parent_id from " . TABLE_PRODUCTS . " p where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); while ($product_sub_product = tep_db_fetch_array($product_sub_product_query)){ $product_sub_check = $product_sub_product['products_parent_id']; } if ($product_sub_check > 0){ tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_sub_check)); } //check to see if products have sub_products $product_has_sub = '0'; $sub_products_sql1 = tep_db_query("select p.products_id, p.products_price, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_parent_id = " . (int)$HTTP_GET_VARS['products_id'] . " and p.products_quantity > '0' and p.products_id = pd.products_id and pd.language_id = " . (int)$languages_id); if (tep_db_num_rows($sub_products_sql1) > 0) { $product_has_sub = '1'; }else{ $product_has_sub = '0'; } $content = CONTENT_PRODUCT_INFO; $javascript = 'popup_window.js'; require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> HELP!! I have clients waiting to place new orders pending this site coming online! Anybody have any ideas or suggestions? Thanks, Eric 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.