Zen Cart Logo
Forums / General Questions / URGENT: Error Cannot redeclare class ot_quantity_discount

URGENT: Error Cannot redeclare class ot_quantity_discount

Views: 563

Results 1 to 4 of 4
13 Jul 2011, 1:34 PM
#1
plymgary1 avatar

plymgary1

Zen Follower

Join Date:
Feb 2009
Posts:
121
Plugin Contributions:
0

URGENT: Error Cannot redeclare class ot_quantity_discount

Help!

I've just had this error message appear:

Fatal error: Cannot redeclare class ot_quantity_discount in /home2/myusername/public_html/includes/modules/order_total/ot_quantity_discount.php on line 12

It has meant the right hand side of my site has disappeared (where the shopping cart is!).

Does anyone know what I can do to fix it? I've just uploaded new versions of the files again and the problem is still there.

Any help appreciated.

Gary

13 Jul 2011, 1:49 PM
#2
plymgary1 avatar

plymgary1

Zen Follower

Join Date:
Feb 2009
Posts:
121
Plugin Contributions:
0

Re: URGENT: Error Cannot redeclare class ot_quantity_discount

Silly me. I'd copied the same info to another file which is what was causing the 'class' clash. :blush:

13 Jul 2011, 1:55 PM
#3
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,608
Plugin Contributions:
0

Re: URGENT: Error Cannot redeclare class ot_quantity_discount

Been there and done that - Thanks for letting us know the solution to the error. You may have helped someone else with the same problem.

14 Jul 2011, 12:52 AM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,695
Plugin Contributions:
56

Re: URGENT: Error Cannot redeclare class ot_quantity_discount

If you want to backup a specific copy of (say) ot_quantity_discount.php remember to make the extension something other than .php.

Good:
ot_quantity_discount.php.1
ot_quantity_discount.php.071311
ot_quantity_discount.php.old

BAD:
ot_quantity_discount_old.php
ot_quantity_discount_071311.php
etc.

Do not use the ".php" extension on backup files.