Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Aug 2005
    Posts
    169
    Plugin Contributions
    0

    red flag Stock By Attributes V4.4

    Once an item is in my cart (latest Zen version) and click on checkout, I get the following error:

    Fatal error: Cannot redeclare class order in /home/simpatix/public_html/store/includes/classes/order.php on line 20

    Can anyone help?

    Thannks a bunch!!! :)
    Last edited by asterix; 18 May 2007 at 05:59 PM. Reason: type-o

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Stock By Attributes V4.4

    Sounds like something is calling the orders class twice ...

    Do you have any add-ons or changes to your site that might account for this?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Aug 2005
    Posts
    169
    Plugin Contributions
    0

    Default Re: Stock By Attributes V4.4

    I have a captcha mod, Paul's v.1.3.7, that's it.

    How can I fix it?

    Thanks for taking the time to respond. ;)

  4. #4
    Join Date
    Aug 2005
    Posts
    169
    Plugin Contributions
    0

    red flag Re: Stock By Attributes V4.4

    I restored all the files updated by this mod and tried to check out and it worked so the problem is caused by that mod (no offense intended).

    I still get:
    Fatal error: Cannot redeclare class order in /home/simpatix/public_html/store/includes/classes/order.php on line 20

    Can anyone help??? :)

    When I import the SQL file, I get the following error too:

    ##CODE##
    Error
    SQL query:

    INSERT INTO configuration( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function )
    VALUES (

    'Show stock when low', 'STOCK_SHOW_LOW_IN_CART', 'false', 'When customer places more items in cart than are available, show the available amount on the shopping cart page:', '9', '6', NULL , now( ) , NULL , "zen_cfg_select_option(array('true', 'false'),"
    );



    MySQL said:

    #1062 - Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 2
    ##CODE##

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Stock By Attributes V4.4

    Quote Originally Posted by asterix View Post
    I restored all the files updated by this mod and tried to check out and it worked so the problem is caused by that mod (no offense intended).
    None taken, since the problems are unlikely to be with the mod, but with the way in which it's being implemented here.
    Have you by chance "backed up" your old order.php file in the classes directory, before putting the stock by attributes version in there. If so, this would explain why the class gets defined twice - you would need to store your backup somewhere else so that it doesn't get used accidentally.

    The SQL error is because you have installed stock by attributes before, so the switches are already in your database - no need to put them in again, indeed the configuration table structure won't let you.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Stock By Attributes V4.4

    you can also name the orders.php file thats been backed up to
    orders.phpOLD and it will not load accidently
    Zen cart PCI compliant Hosting

  7. #7
    Join Date
    Aug 2005
    Posts
    169
    Plugin Contributions
    0

    Default Re: Stock By Attributes V4.4

    Thank you so much for the responses. :)

    All the original files were renamed "...OLD.php" so I renamed "ordersOLD.php" "orders.phpOLD" but the problem remains.

    We're talking about "admin/orders.php", right?

    Here's the URL of the one item that has an attribute set up:
    http://www.simpaticohamptons.com/sto...b3b32427bca2a7

    What do you think?

  8. #8
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Stock By Attributes V4.4

    Quote Originally Posted by asterix View Post
    We're talking about "admin/orders.php", right?
    No. We're talking about the "includes/classes/order.php" file referenced in your fatal error message.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  9. #9
    Join Date
    Aug 2005
    Posts
    169
    Plugin Contributions
    0

    Default Re: Stock By Attributes V4.4

    I'm so sorry but I removed the old "order.php" file (renamed "order.phpOLD" after your last post) and I still get that error...

    You can try for yourself. What could it be then?

  10. #10
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Stock By Attributes V4.4

    Yes, but it's still in the classes directory and available for inclusion. I know that many senior Zen Cart users advise keeping renamed backups close to their original location. Personally, I'd always recommend against it (based on having started my career in software maintenance and having solved far, far too many problems where users have accidentally doubled up on stylesheets, classes, module, classes, etc.)

    IMO you siute should contain only files that are actually in use, anything else is a potential problem, or a confusion when you're making changes. Indeed I don't back up original files at all, as I can always go back to the original Zen Cart release package to get them if I need them.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Using Stock By Attributes, In Stock Value Is Sum Of Attributes' Stock
    By y0ul053 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 29 Aug 2013, 04:23 PM
  2. v139h Stock by Attributes modules vs OScommerce stock by attributes QTPro
    By Rosyweb in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 20 May 2012, 12:13 PM
  3. Replies: 5
    Last Post: 3 Aug 2011, 08:15 AM
  4. Combining Attributes with stock and attributes w/o stock
    By ~Meg~ in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 10 Oct 2006, 09:20 AM
  5. Combining Attributes with stock and attributes w/o stock
    By ~Meg~ in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 9 Oct 2006, 06:27 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