Libellula Posted April 29, 2013 Share Posted April 29, 2013 Site: wickedgrinfashions.com Since a motherboard went out on our server, I am working on this. It is an OS Commerce site. I need to edit all of the titles that have underscores in them, but starting with NOW_IN_CART, I cannot for the life of me find where to edit it. I have all the files locally, but there are hundreds of files and many are "shopping_cart.php" (my first stab at finding it). I would like to just replace these titles without the underscores. I have found multiple files with NOW_IN_CART in them, but changing them ceases it to work, which leads me to believe its pulling from somewhere else? I'm lost. Below is where I thought I changed it... <?php if ($cart->count_contents() > 0){?> <?php echo NOW_IN_CART;?> <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART)?>"><strong><?php echo $cart->count_contents()?></strong><?php echo HEADER_SHOPPING_CART_BOX_CART_EMPTY?></a><?php }else{?> <?php echo NOW_IN_CART;?> <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART)?>"><strong>0</strong><?php echo HEADER_SHOPPING_CART_BOX_CART_EMPTY?></a> <?php }?> Quote Link to comment https://forums.phpfreaks.com/topic/277413-php-code-change-location/ Share on other sites More sharing options...
mac_gyver Posted April 29, 2013 Share Posted April 29, 2013 it would help if you provided the name of this os commerce script in case someone familiar with it knows the answer. there is either a configuration file (config.php or similar) that contain define() statements or the values are stored in a 'config' database table and the defined constants are being dynamically created. Quote Link to comment https://forums.phpfreaks.com/topic/277413-php-code-change-location/#findComment-1427119 Share on other sites More sharing options...
Libellula Posted April 29, 2013 Author Share Posted April 29, 2013 Thank you for the reply. I am not sure the name as I was not originally who loaded it and edited it. I wish I knew more about it, sorry. I will look for a config file. Would you be able to give me an example of what the code would possibly look like? I really appriciate the help! Quote Link to comment https://forums.phpfreaks.com/topic/277413-php-code-change-location/#findComment-1427122 Share on other sites More sharing options...
mac_gyver Posted April 29, 2013 Share Posted April 29, 2013 define("NOW_IN_CART","what ever it is currently displayed as"); Quote Link to comment https://forums.phpfreaks.com/topic/277413-php-code-change-location/#findComment-1427123 Share on other sites More sharing options...
Libellula Posted April 29, 2013 Author Share Posted April 29, 2013 This is what the configure.php looks like <?php define('HTTP_SERVER', 'http://wickedgrinfashions.com'); define('HTTPS_SERVER', 'http://wickedgrinfashions.com'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/home/wicked/public_html/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'wicked2'); define('DB_SERVER_PASSWORD', 'fred123'); define('DB_DATABASE', 'wicked2'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/277413-php-code-change-location/#findComment-1427135 Share on other sites More sharing options...
Libellula Posted April 29, 2013 Author Share Posted April 29, 2013 Okay, it looks like they are dynamically set up. Where would I find that information? What might it look like? FYI we have this site hosted on our own server. I did not set any of this up, so I am kind of going in blind here. Any assistance is really appriciated. Quote Link to comment https://forums.phpfreaks.com/topic/277413-php-code-change-location/#findComment-1427161 Share on other sites More sharing options...
mac_gyver Posted April 29, 2013 Share Posted April 29, 2013 if this is a third-party script, there should be comments in at least the main index.php file that identifies it. the specific NOW_IN_CART value is more like a language/template setting and would likely be defined in a file in the includes/languages/ folder. what exactly are you trying to accomplish? if it's a setting like a site/store name, there's probably some global setting to do it and you shouldn't need you to find and edit files to change it. there's likely some sort of administrative page to do it on. Quote Link to comment https://forums.phpfreaks.com/topic/277413-php-code-change-location/#findComment-1427168 Share on other sites More sharing options...
Libellula Posted April 29, 2013 Author Share Posted April 29, 2013 (edited) Here is the index.php... <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $categories_products = tep_db_fetch_array($categories_products_query); if ($categories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); $tab_sel = tep_href_link(FILENAME_DEFAULT); ?> <?php require(DIR_WS_INCLUDES . 'template_top.php'); ?> <?php if ($category_depth == 'nested') { $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'"); $category = tep_db_fetch_array($category_query); if (TITLE_PIC){ if ($category['categories_image'] !=''){ $pis = ''. tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT).''; } } ?> <?php echo tep_draw_content_top();?> <?php echo tep_draw_title_top();?> <h1><div class="title_pic"><?php echo $pis ?></div><?php echo $category['categories_name']; ?></h1> <?php echo tep_draw_title_bottom();?> <div class="contentContainer page_un"> <?php if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category $category_links = array_reverse($cPath_array); for($i=0, $n=sizeof($category_links); $i<$n; $i++) { $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $categories = tep_db_fetch_array($categories_query); if ($categories['total'] < 1) { $categories_row = $categories['total']; // do nothing, go through the loop } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); break; // we've found the deepest category the customer is in } } } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); } $number_of_categories = tep_db_num_rows($categories_query); $rows = 0; $col = 0; $row = 0; // $col_items = (MAX_DISPLAY_CATEGORIES_PER_ROW - 1); $prods_content = ' <div class="padding">'. "\n"; $prods_content .= ' <ul class="sub_categories">'. "\n"; while ($categories = tep_db_fetch_array($categories_query)) { $rows++; $cPath_new = tep_get_path($categories['categories_id']); $p_name = '<span><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a></span>'; $p_pic = '<a class="prods_pic_bg" href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '" style="width:'.(SUBCATEGORY_IMAGE_WIDTH + PIC_MARG).'px;height:'.(SUBCATEGORY_IMAGE_HEIGHT + PIC_MARG).'px;">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], (SUBCATEGORY_IMAGE_WIDTH), (SUBCATEGORY_IMAGE_HEIGHT), ' style="width:'.(SUBCATEGORY_IMAGE_WIDTH + PIC_MARG).'px;height:'.(SUBCATEGORY_IMAGE_HEIGHT + PIC_MARG).'px;margin:'.PIC_MARG2.'px 0px 0px '.PIC_MARG2.'px;"') . ''; $prods_content .= ' <li class="prods_content" style="width:'.(SUBCATEGORY_IMAGE_WIDTH + PIC_MARG).'px;">'. "\n". ' <div class="pic_padd wrapper_pic_div" style="width:'.(SUBCATEGORY_IMAGE_WIDTH + PIC_MARG).'px;height:'.(SUBCATEGORY_IMAGE_HEIGHT + PIC_MARG).'px;">'.$p_pic.''.tep_draw_prod_pic3_top().''.tep_draw_prod_pic3_bottom().'</a></div>'. "\n". ' <div class="box-padd"><div class="name name_padd">'.$p_name.'</div></div>'. "\n". ' </li>'. "\n"; } $prods_content .= ' </ul>'. "\n"; $prods_content .= '</div>'; // needed for the new products module shown below $new_products_category_id = $current_category_id; ?> <div class="contentPadd"> <?php echo $prods_content; ?> </div> <?php include(DIR_WS_MODULES . 'new_products.php'); ?> </div><?php echo tep_draw_content_bottom();?> <?php } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) { // create column list $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE, 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } $select_column_list = ''; for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name, '; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; } } // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } } if ( (!isset($HTTP_GET_VARS['sort'])) || (!preg_match('/^[1-8][ad]$/', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; } } } else { $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); $sort_order = substr($HTTP_GET_VARS['sort'], 1); switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= " order by pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } $catname = HEADING_TITLE; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $image = tep_db_query("select manufacturers_image, manufacturers_name as catname from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $image = tep_db_fetch_array($image); $catname = $image['catname']; } elseif ($current_category_id) { $image = tep_db_query("select c.categories_image, cd.categories_name as catname from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $image = tep_db_fetch_array($image); $catname = $image['catname']; } $image2 = ''; $extraset = ''; if (TITLE_PIC){ // Get the right image for the top-right if (isset($HTTP_GET_VARS['manufacturers_id'])) { $image2 = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $image2 = tep_db_fetch_array($image2); $image2 = $image2['manufacturers_image']; } elseif ($current_category_id) { $image2 = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $image2 = tep_db_fetch_array($image2); $image2 = $image2['categories_image']; } } ?> <?php echo tep_draw_content_top();?> <?php echo tep_draw_title_top();?> <h1><?php if ($image2 !=''){?><div class="title_pic"><?php echo tep_image(DIR_WS_IMAGES . $image2, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></div><?php } ?><?php echo $catname; ?></h1> <?php echo tep_draw_title_bottom();?> <?php // optional Product List Filter if (PRODUCT_LIST_FILTER > 0) { if (isset($HTTP_GET_VARS['manufacturers_id'])) { $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name"; } $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo tep_draw_form('filter', FILENAME_DEFAULT, 'get') . '<p class="show">' . TEXT_SHOW . ' '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']); while ($filterlist = tep_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()" class="select"'); echo tep_hide_session_id() . '</p></form>' . "\n"; // echo '<div class="prods_hseparator">'.tep_draw_separator('spacer.gif', '1', '1').'</div>'; } } include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?> <?php echo tep_draw_content_bottom();?> <?php } else { // default page $first_page = true; ?> <?php echo tep_draw_content_top();?> <div class="none"> <?php echo tep_draw_title_top();?> <h1><?php echo HEADING_TITLE; ?></h1> <?php echo tep_draw_title_bottom();?><br /> </div > <div class="contentContainer page_un"> <div class="contentText none"> <?php echo tep_customer_greeting(); ?> </div> <?php if (tep_not_null(TEXT_MAIN)) { ?> <div class="contentText"> <?php echo TEXT_MAIN; ?> </div> <?php } ?> <?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?> </div> <?php echo tep_draw_content_bottom();?> <?php } require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> I have searched the includes/languages directory and it seems like I am find everything EXCEPT the ones I need. I am wondering if they are located somewhere else together, which is why they were never originally fixed like the others? On the main page there are those headings such as NOW_IN_CART and TEXT_INPUT_SEARCH; they obviously look like coding and that is what I want to change. I would like them to match the rest of the headings without CAPS and without underscores. For example Now in Cart and Search Here, instead. Hopefully that makes sense? Everything else I am doing to it, I've figured out - just not this. :-/ Edit: The admin side has NO options to change these. It's a very limiting system, but we're stuck with it until our server is rebuilt. I'm checking with os commerce forums, but you guys respond MUCH faster. Edited April 29, 2013 by Libellula Quote Link to comment https://forums.phpfreaks.com/topic/277413-php-code-change-location/#findComment-1427169 Share on other sites More sharing options...
mac_gyver Posted April 29, 2013 Share Posted April 29, 2013 so it appears that these text strings have been this way for a while and you want to fix them? it looks like a version upgrade or a template/theme didn't completely install (or mixed version of files were used.) you cannot find where they are defined at because they aren't. they are either leftover from an old version of oscommerce or from a template/theme that was installed. they are used in the content but where they are defined at doesn't exist. the easiest fix would be to just define them yourself, rather than to find where all of them are used at (it's in different files depending on where on the page they are at) and change the name to what they should be (assuming they are still being used in the current version.) i would put them into catalog\includes\languages\english.php. in fact, define('HEADER_TITLE_CART_CONTENTS', 'Cart Contents'); that is in catalog\includes\languages\english.php is what NOW_IN_CART looks like it should be. Quote Link to comment https://forums.phpfreaks.com/topic/277413-php-code-change-location/#findComment-1427186 Share on other sites More sharing options...
Libellula Posted April 30, 2013 Author Share Posted April 30, 2013 See, I knew I was not crazy! Haha... I will follow your suggestion. Thank you SO MUCH for your help with this! Quote Link to comment https://forums.phpfreaks.com/topic/277413-php-code-change-location/#findComment-1427272 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.