Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32
  1. #11
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: [not a bug] Shopping Cart Error when enabling inline shipping estimator

    Quote Originally Posted by BlessIsaacola View Post
    Also, here is another change that was made in that file. I don't know if you see any problem with this code:
    PHP Code:
    <div id="cshopping" class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPINGBUTTON_CONTINUE_SHOPPING_ALT) . '</a>'?></div>
    We added a div id="cshopping" to correct alignment problem. I don't know if this will be responsible for loading something it's not suppose to.

    Thanks!
    No, it's unrelated.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #12
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Shopping Cart Error when enabling inline shipping estimator?

    The file compare did not solve the problem for me because I cannot figure out which file or mod is causing "Cannot redeclare class order in /includes/classes/order.php on line 20" Although this is happening on the shopping cart page it almost like there is a file or mod creating this problem before I even get to the shopping cart page.

    I can also confirm that this problem happens even when I am using the standard (unmodified) tpl_shopping_cart_default.php. Out of the 100s of hits to the shopping cart page today, there are only 3 users that trigger this error.

    The thing that is bugging me the most about this is if I do not enable shipping estimate to display inline, this problem goes away. I can help but think what am I triggering by turning inline shipping estimate on?

    Here is line 20-22:
    PHP Code:
    class order extends base {
      var 
    $info$totals$products$customer$delivery$content_type$email_low_stock$products_ordered_attributes,
      
    $products_ordered$products_ordered_email$attachArray
    Can someone please explain the code above to me. I don't get why line 20 is an issue.

    Any other suggestions on how to solve this problem?

    Thanks!

  3. #13
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Shopping Cart Error when enabling inline shipping estimator?

    Quote Originally Posted by BlessIsaacola View Post
    Here is line 20-22:
    PHP Code:
    class order extends base {
      var 
    $info$totals$products$customer$delivery$content_type$email_low_stock$products_ordered_attributes,
      
    $products_ordered$products_ordered_email$attachArray
    Can someone please explain the code above to me. I don't get why line 20 is an issue.
    Line 20 is the issue because it's a duplicate statement according to PHP.

    If the order.php file (or one containing that same statement in it) has already been loaded previously, PHP sees this as an attempt to "redeclare" the class ... which is not permitted.

    That's why I've been saying that you've likely got extra backup files kicking around. Either that or you've altered some code that loads the order.php class file and caused it to happen a second time.


    Apologies about mentioning the shopping_cart class in previous posts ... somehow I had read that it was the shopping-cart class that was redeclared, not the order class. Nevertheless, the root cause remains as described.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #14
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Shopping Cart Error when enabling inline shipping estimator?

    Thanks DrByte for the thorough explanation. I will keep back tracking to see if I can find where I may have messed things up. The mods that we use that may be suspect are ty package tracker, google checkout and Zen TagCloud. I will check those mods and see if anything is obvious.

    Although turning off inline shipping estimate display solves this problem, I want to get to the bottom of this so we can offer inline display.

    Thanks again.

  5. #15
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Shopping Cart Error when enabling inline shipping estimator?

    Well, because this problem is not solved and I would really like to use inline shipping estimator, I am wondering if someone can help me get to the bottom of this.

    What other files or functions could possibly load this class that is causing this error? PHP Fatal error: Cannot redeclare class order in /includes/classes/order.php on line 20

    This what I see when using developers tool to search the files:

    /CUSTOMadminFOLDER/includes/classes/order.php
    Line #9 : class order {

    includes/classes/order.php
    Line #19 : class order extends base { This is saying line 19 even though the actual line is 20...I wonder why

    includes/classes/order_total.php
    Line #20 : class order_total extends base {

    Should all the above files have that?

  6. #16
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Shopping Cart Error when enabling inline shipping estimator?

    I should also add that turning on the debugging tool did not generate any error log about this.

  7. #17
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,930
    Plugin Contributions
    4

    Default Re: Shopping Cart Error when enabling inline shipping estimator?

    You could try adding this line to the beginning of order.php (before the class definition)

    var_dump(debug_backtrace());


    at the very least this should tell you th name of the file that is trying to include the order class.

    NB : best not done on a live site :)

  8. #18
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Shopping Cart Error when enabling inline shipping estimator?

    Quote Originally Posted by wilt View Post
    You could try adding this line to the beginning of order.php (before the class definition)

    var_dump(debug_backtrace());


    at the very least this should tell you th name of the file that is trying to include the order class.

    NB : best not done on a live site :)
    What's the implication of testing this in production since that's where the problem occurs. Because it's a random problem I am not able to duplicate the problem at will. If I can do this production, there is a better chance the problem will get trigger sooner than later.

  9. #19
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Shopping Cart Error when enabling inline shipping estimator?

    Adding the debug code he suggested will put debug code on the screen every time an order object is instantiated in the code ... all your customers will see the debug output. That's why you don't want it on a production server.

    You could alternatively compare your site vs a fresh default fileset, and get rid of duplicate files, extra files, backup files, etc that you've left on the server. Custom code that's reloading things could also be a problem. It's bad practice to leave backup files on the server if they are left with a .php extension, since in many places they could be auto-loaded.
    But, I'm repeating myself again now.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #20
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: Shopping Cart Error when enabling inline shipping estimator?

    Thanks for the clarification. I did the file compare thing which basically just confirmed that my 1.3.8a files are the same as the one downloaded. I am lost so for now I will turn off inline shipping estimator. I wish I understand the logic behind how the shipping estimator works when it's enable for inline display versus displaying the shipping estimator button.

    It's so confusing that this problem ONLY happens when I enable the shipping to show in the showing cart versus displaying the button to estimate shipping. What file is called when shipping estimator button is enabled versus when it's set to displayed on the shopping cart page. What's even more baffling is the fact that it doesn't happen all the time and I cannot come up with the combination or events to trigger the error.

    What's the code suppose to do?
    PHP Code:
    class order_total extends base 
    perhaps and understand of the above code will help me pinpoint what maybe in conflict with it.

    Could supertracker be responsible? user tracking? I am just trying to find a place to troubleshoot other than uninstall everything and start over.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v150 Shopping Cart / Shipping Estimator
    By SweetEmotions in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 27 Jun 2012, 03:49 AM
  2. Shipping Estimator with Shopping Cart Contents
    By tmdelia in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 22 Jun 2010, 07:52 PM
  3. Shopping cart / Shipping estimator error
    By mr_black in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 16 Jan 2010, 10:48 AM
  4. Displaying shipping estimator inline in shopping cart?
    By onestopgraphicshop in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 27 Mar 2008, 04:45 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