Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    bug Shipping Estimator Sidebox PHP Fatal error: Cannot redeclare class order on 1.5.1

    HI,

    I am using ZC 1.5.1 with Super Order 4.0.7, Edit Order 4.1.4

    With Modeule Shipping Estimator Sidebox 2.1

    On my record, only above module will changed the /includes/classes/order.php

    PHP Fatal error: Cannot redeclare class order in /home/mysite/public_html/shop/includes/classes/order.php on line 1062

    I am open the above /includes/classes/order.php to see on line 1062 what is it, it is just a end }, nothing anymore ..

    So Shipping Estimator Sidebox 2.1 version what is wrong on it?

    Actually, it work on http://www.mysite.com/shop/index.php...=shopping_cart

    I see the sidebox there, but I am see above error log at /shop/log

    So I am post there, how to fix this?

    Thank you.

  2. #2
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    Default Re: Shipping Estimator Sidebox PHP Fatal error: Cannot redeclare class order on 1.5.1

    Hi All,

    OR how to write some PHP coding that can help me to check which class is load to make above error?
    Or some coding that can list all the class name using?

    I have Google this the above error know it is since the class load twice or something like that.

    Thank you.

  3. #3
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    Default Re: Shipping Estimator Sidebox PHP Fatal error: Cannot redeclare class order on 1.5.1

    Hi All,

    I fix this today.

    Zen Cart have a OverRide System.

    This Module will place one of new file to /includes/modules/sideboxes/shipping_estimator.php
    where the original Zen Cart 1.5.1 have a same named files under
    /includes/modules/shipping_estimator.php

    So you must change this file
    /includes/modules/shipping_estimator.php

    On Line 84
    From
    require(DIR_WS_CLASSES . 'order.php');
    Change To
    require_once(DIR_WS_CLASSES . 'order.php');

    On Line 132
    From
    require(DIR_WS_CLASSES . 'shipping.php');
    Change To
    require_once(DIR_WS_CLASSES . 'shipping.php');

    This will fix the above PHP Fatal error: Cannot redeclare class



    Additional inform there
    http://www.zen-cart.com/showthread.p...re-class-order
    Last edited by explorer1979; 10 Apr 2014 at 08:31 AM.

 

 

Similar Threads

  1. PHP Fatal error: Cannot redeclare class upload
    By cshart in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 7 Dec 2011, 06:33 AM
  2. PHP Fatal error: Cannot redeclare class cache
    By snk429 in forum General Questions
    Replies: 15
    Last Post: 16 Feb 2011, 10:08 PM
  3. PHP Fatal error: Cannot redeclare class order
    By sketchhgal in forum General Questions
    Replies: 7
    Last Post: 25 Jun 2010, 09:32 AM
  4. Replies: 17
    Last Post: 31 Mar 2010, 09:47 AM
  5. Fatal error: Cannot redeclare class order
    By Oseymour in forum General Questions
    Replies: 7
    Last Post: 30 Jun 2009, 03:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg