christianbright Posted January 14, 2010 Share Posted January 14, 2010 So I have no use for specials at all. I will never have any products on special and did not want them being displayed. I had successfully removed everything or so I thought. Until today I opened my site and see an error on the index as follows: 1146 - Table 'goldmo5_osc1.TABLE_SPECIALS' doesn't exist select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from products p left join TABLE_SPECIALS s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit 9 [TEP STOP] So I went through LITERALLY every file once more and removed all traces of the special. I also went into the database itself and removed the lines of code that use it. I double checked database_tables.php as well. This error still appears, even though there's nothing that I can find in any files now. What could be the issue? Does osC absolutely require specials to be there in order to work? My product categories have disappeared only on the index page, the other pages it shows just fine. Please help me out here as I've done my head in... Link to comment Share on other sites More sharing options...
christianbright Posted January 14, 2010 Author Share Posted January 14, 2010 I had a look at the error log and this is the latest thing that appears: [13-Jan-2010 23:33:21] PHP Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/goldmo5/public_html/includes/boxes/categories.php:13) in /home/goldmo5/public_html/includes/boxes/categories.php on line 70 I have a copy of the site (original unmodified) on my desktop and used dreamweaver to go to line 70 matched it with the current code, it's exactly the same. So I haven't a clue where to go next... Link to comment Share on other sites More sharing options...
jdvb Posted January 15, 2010 Share Posted January 15, 2010 1146 - Table 'goldmo5_osc1.TABLE_SPECIALS' doesn't existIt's obvious that it is removed from the database tables php, else it would have shown "specials" instead of TABLE_SPECIALS. now browse through all other PHP files and search for TABLE_SPECIALS. All files where that line of code is found, need to be edited. Check the folowing files: advanced_search_result.php index.php specials.php classes\shopping_cart.php functions\general.php includes\database_tables.php boxes\specials.php classes\shopping_cart.php modules\new_products.php Link to comment Share on other sites More sharing options...
christianbright Posted January 16, 2010 Author Share Posted January 16, 2010 It's obvious that it is removed from the database tables php, else it would have shown "specials" instead of TABLE_SPECIALS. now browse through all other PHP files and search for TABLE_SPECIALS. All files where that line of code is found, need to be edited. Check the folowing files: advanced_search_result.php index.php specials.php classes\shopping_cart.php functions\general.php includes\database_tables.php boxes\specials.php classes\shopping_cart.php modules\new_products.php Alright I'll get to it, but this is something for certain can be removed entirely? I haven't been able to find threads from anyone who's done it for some reason. Link to comment Share on other sites More sharing options...
♥kymation Posted January 16, 2010 Share Posted January 16, 2010 Probably because all of this is unnecessary. If you want to disable specials, just remove this line from catalog/includes/column_right.php: include(DIR_WS_BOXES . 'specials.php'); What you are doing will make it harder to add any addons to your site, and harder to maintain for the life of the site. It's a lot of work for no apparent gain. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
christianbright Posted January 16, 2010 Author Share Posted January 16, 2010 I reinstalled osC vanilla and checked for that bit of code but its not in column_right.php. My site is http://goldmonger.net if that helps. I can't seem to find it.. Link to comment Share on other sites More sharing options...
♥kymation Posted January 16, 2010 Share Posted January 16, 2010 Lines 35-39 of that file should look like this: if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } If you don't have that, are you using an older version of osCommerce, or a template? Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
christianbright Posted January 16, 2010 Author Share Posted January 16, 2010 I have osC 2.2 MS2 and no template files. Just osC files and a stylesheet. This is what I have in column_right in it's entirety: <?php /* $Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_categories_box(); } else { include(DIR_WS_BOXES . 'categories.php'); } ?> Link to comment Share on other sites More sharing options...
♥kymation Posted January 16, 2010 Share Posted January 16, 2010 That's not stock MS2. In MS2, as in the current version (RC2a), the link to the categories box that you show is in column_left.php. Given that things have been moved around in your code, check for the specials code in catalog/includes/column_left.php. If it's not in either the left or right column, then specials are already disabled in your code and you have nothing further to do. Is there some reason you are using an obsolete version of osCommerce? You'll have a lot of work to do to get that to work properly and securely. If it's already heavily modified, then you'll need to apply all of the patches. If not, I suggest you start with a copy of RC2a. It will make your life a lot easier. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
christianbright Posted January 16, 2010 Author Share Posted January 16, 2010 Well I got a pack of premade osC template designs, and this happened to be the version it was. But I have read the "how to secure your site" thread and others. I patched security holes, installed a few security contributions and secured the admin folder. I'm using USU5 as well so I was under the impression my copy had been brought up to date, so to speak . Am I wrong in that thinking? I'm very inexperienced with osC to be completely fair... Link to comment Share on other sites More sharing options...
♥kymation Posted January 16, 2010 Share Posted January 16, 2010 That explains the weird code. Most templates are based on obsolete versions of osCommerce. Add the custom template code to that and you have a real mess. If you want to save this thing, you'll need to apply the patches to bring it up to RC2a. There's an Addon that has all of the patch code. It's going to be a lot of work to apply to your modified code. Your security patches may have already included some of that, but those usually assume that you are starting with a current copy of the code, so you are probably missing most of the patches. It might be easier to start with a clean copy of RC2a and modify that to look like your template. That's what I would do, but it's up to you. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
christianbright Posted January 16, 2010 Author Share Posted January 16, 2010 Could I download RC2a and then use the code in my current stylesheet to do that? Because of my novice experience it sounds like even though it will take time that just applying the updates will be a safer bet. Unless it's fairly simple to apply this design to a fresh RC2a copy... Link to comment Share on other sites More sharing options...
♥kymation Posted January 16, 2010 Share Posted January 16, 2010 It's not going to be simple either way. The stylesheet is only part of what you need to change; there are obviously changes to the core code as well. Many of those changes may be standard addons that are relatively easy to install. There may also be some custom coding needed. It's hard to tell from just a quick look at your site, so I could be wrong either way. Applying the updates to your existing code may be problematic if your template has moved some of the core code to different locations. I don't guarantee that this has happened, but it's common. You then need to find where the code was moved before you can update it. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
ozEworks Posted January 16, 2010 Share Posted January 16, 2010 Not sure where you are up to but if you don't want to use specials all you do it remove it from the site in terms of display. You don't bother removing ti from Admin and you certainly don't remove the table from the database. Why because lots of program refer to specials to see if a product IS on special in order to display its price. The table is always needed. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.