Kemik Posted April 11, 2004 Posted April 11, 2004 After installing the gift voucher mod and finding out it didnt work I decided to use my bakcuped files to restore to normal. For some reason by application_top.php wont work, does anyone have an editted copy/orignal please? Thanks Quote
Kemik Posted April 11, 2004 Author Posted April 11, 2004 Heres a copy of what comes up on the homepage: Fatal error: Cannot redeclare class shoppingcart in /home/kobux73/public_html/game/includes/boxes/shopping_cart.php on line 13 Quote
♥yesudo Posted April 11, 2004 Posted April 11, 2004 easiest way - download a copy of osc and use the copy in there. Quote Your online success is Paramount.
Guest Posted April 11, 2004 Posted April 11, 2004 looks like you have some spaces after the last ?> in one of the files youve been editing installing the contrib. Scan thru them and remove all blank space at the end of the files. Cya Stot Quote
Chris Dunning Posted April 11, 2004 Posted April 11, 2004 "cannot redeclare class" is probably not a blank space problem - blank spaces usually cause "headers already sent out..." errors. For some reason the class "shopping_cart" has been called twice. I would go through application_top and look for the extra instance of shopping_cart. Quote Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.
Kemik Posted April 14, 2004 Author Posted April 14, 2004 In /catalog/includes/appliction_top.php I see theres two instances of shopping_cart asked for: "require(DIR_WS_CLASSES . 'shopping_cart.php')" "{ $goto = FILENAME_SHOPPING_CART; $parameters = array('action', 'cPath', 'products_id', 'pid'); } else { $goto = basename($PHP_SELF); if ($HTTP_GET_VARS['action'] == 'buy_now') { $parameters = array('action', 'pid', 'products_id'); } else { $parameters = array('action', 'pid'); } } switch ($HTTP_GET_VARS['action']) { // customer wants to update the product quantity in their shopping cart" Whereas in /catalog/admin/includes/application_top.php There is only one: "require(DIR_WS_CLASSES . 'shopping_cart.php')" Are these two files meant to be the same? Quote
Kemik Posted April 15, 2004 Author Posted April 15, 2004 I'm not very good at php adn I was woundering if anyone could help me with the shopping_cart.php or application_top.php file so i coulf get my shopping cart back on the elft of the screen. See above for the problem. Quote
Chris Dunning Posted April 15, 2004 Posted April 15, 2004 includes/application_top.php and admin/includes/application_top.php are two entirely different files. One includes the functions necessary for the cart, the other includes the functions necessary for the admin. Many are the same, but not all. Don't get them mixed up. If all you need is a fresh copy of application_top, go download it from the downloads section of this site. The whole package only takes a few minutes to get - once you have it, keep it on hand so you can quickly upload any other files you might need. Quote Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.
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.