Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jun 2008
    Posts
    19
    Plugin Contributions
    0

    Default FlatClone problems

    Hi all. I've followed the directions from the flatclone readme (I thought I got everything). However, after I upload the flat.php files (renamed as flat2.php), and reload my shipping module, I receive this error:

    Fatal error: Cannot redeclare class flat in /cart/includes/modules/shipping/flat2.php on line 23

    I tried changing "class flat2 {", but that didn't work either.

    This is incredibly frustrating. I don't understand why the shipping module would NOT have different shipping methods available by default!
    Has anyone else had the error above? I would really appreciate getting this working.

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

    Default Re: FlatClone problems

    Somewhere you have two files that state the class as flat2 ...

    Usually this happens when a back up file is left on the server or when you have accidentally copied the code file into the language file ...

    Do a search in the Tools ... Developers Tool Kit ... for:
    flat2

    Where are these files and do you have two files in the:
    /includes/modules/shipping
    -- or --
    /includes/languages/english/modules/shipping

    that have flat2 in them?
    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
    Jun 2008
    Posts
    19
    Plugin Contributions
    0

    Default Re: FlatClone problems

    Here's what I've got. No idea what this means.
    <hr>


    /home/content/s/a/r/sarahver/html/cart/includes/languages/english/modules/shipping/flat2.php

    Line #19 : // $Id: flat2.php 1969 2005-09-13 06:57:21Z drbyte $

    Line #22 : define('MODULE_SHIPPING_FLAT2DAY_TEXT_TITLE', 'Flat2');

    Line #23 : define('MODULE_SHIPPING_FLAT2DAY_TEXT_DESCRIPTION', 'Flat2');

    Line #24 : define('MODULE_SHIPPING_FLAT2DAY_TEXT_WAY', '2');



    /home/content/s/a/r/sarahver/html/cart/includes/modules/shipping/flat2.php

    Line #19 : // $Id: flat2.php 1969 2005-09-13 06:57:21Z drbyte $

    Line #30 : $this->title = MODULE_SHIPPING_FLAT2DAY_TEXT_TITLE;

    Line #31 : $this->description = MODULE_SHIPPING_FLAT2DAY_TEXT_DESCRIPTION;

    Line #32 : $this->sort_order = MODULE_SHIPPING_FLAT2DAY_SORT_ORDER;

    Line #34 : $this->tax_class = MODULE_SHIPPING_FLAT2DAY_TAX_CLASS;

    Line #35 : $this->tax_basis = MODULE_SHIPPING_FLAT2DAY_TAX_BASIS;

    Line #39 : $this->enabled = ((MODULE_SHIPPING_FLAT2DAY_STATUS == 'True') ? true : false);

    Line #42 : if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT2DAY_ZONE > 0) ) {

    Line #44 : $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FLAT2DAY_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");

    Line #67 : 'module' => MODULE_SHIPPING_FLAT2DAY_TEXT_TITLE,

    Line #69 : 'title' => MODULE_SHIPPING_FLAT2DAY_TEXT_WAY,

    Line #70 : 'cost' => MODULE_SHIPPING_FLAT2DAY_COST)));

    Line #83 : $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_FLAT2DAY_STATUS'");

    Line #91 : $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Flat Shipping', 'MODULE_SHIPPING_FLAT2DAY_STATUS', 'True', 'Do you want to offer flat rate shipping?', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");

    Line #92 : $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Shipping Cost', 'MODULE_SHIPPING_FLAT2DAY_COST', '5.00', 'The shipping cost for all orders using this shipping method.', '6', '0', now())");

    Line #93 : $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_FLAT2DAY_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())");

    Line #94 : $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Tax Basis', 'MODULE_SHIPPING_FLAT2DAY_TAX_BASIS', 'Shipping', 'On what basis is Shipping Tax calculated. Options are<br />Shipping - Based on customers Shipping Address<br />Billing Based on customers Billing address<br />Store - Based on Store address if Billing/Shipping Zone equals Store zone', '6', '0', 'zen_cfg_select_option(array(\'Shipping\', \'Billing\', \'Store\'), ', now())");

    Line #95 : $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_FLAT2DAY_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");

    Line #96 : $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_FLAT2DAY_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");

    Line #105 : return array('MODULE_SHIPPING_FLAT2DAY_STATUS', 'MODULE_SHIPPING_FLAT2DAY_COST', 'MODULE_SHIPPING_FLAT2DAY_TAX_CLASS', 'MODULE_SHIPPING_FLAT2DAY_TAX_BASIS', 'MODULE_SHIPPING_FLAT2DAY_ZONE', 'MODULE_SHIPPING_FLAT2DAY_SORT_ORDER');

  4. #4
    Join Date
    Jun 2008
    Posts
    19
    Plugin Contributions
    0

    Default Re: FlatClone problems

    As far as I can tell, I uploaded the correct flatclone files into the correct directories.

    I even attempted to copy the "flat.php" file (the original, from the cart itself) and modify that the same way I modified the flatclone.php file - and it arrives at the same error.

  5. #5
    Join Date
    Jun 2008
    Posts
    19
    Plugin Contributions
    0

    Default Re: FlatClone problems

    I keep replying and my posts are disappearing... wtf?

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

    Default Re: FlatClone problems

    You are new ...

    You are moderated ...

    You are now approved ...

    Could you do a search on:
    class flat2

    And see what all comes up?
    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!

  7. #7
    Join Date
    Jun 2008
    Posts
    19
    Plugin Contributions
    0

    Default Re: FlatClone problems

    They're posted above... go hog wild...
    Didn't realize it was being approved. It just looks like the forums are timing out, which is really strange...

  8. #8
    Join Date
    Jun 2008
    Posts
    19
    Plugin Contributions
    0

    Default Re: FlatClone problems

    I get the feeling my issue is arising from a miscommunication in the help file.

    There appear to be three major things to replace:
    1. The filename itself (flatClone.php -> flatYourName.php)
    2. the id tag in (one file? or both files?) renamed to... what?
    3. _FLAT_ (24 instances) renamed to ... what?

    more clarification - the help file doesn't distinguish if the FILENAME and the _FLAT_ should both be the same thing?
    ie: if I make the file name be "flat2.php" should I also replace _FLAT_ with _FLAT2_? or _flat2_?

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

    Default Re: FlatClone problems

    The problem is ... in the flat.php around line 23 is:
    PHP Code:
      class flat {
        var 
    $code$title$description$icon$enabled
    In what you posted I should be seeing at least:
    class flat2 {
    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!

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

    Default Re: FlatClone problems

    Change all instances of:
    flat

    into the new name of the file to be:
    flat2

    NOTE: if you are calling the file flatfred.php then you would replace all occurances of flat with flatfred and FLAT with FLATFRED ...

    NOTE: these are case sensative ...
    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!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v153 customer login problems... problems w new class.zcPassword
    By carlwhat in forum Upgrading to 1.5.x
    Replies: 5
    Last Post: 1 Aug 2014, 01:42 AM
  2. Layout problems/font size problems
    By shoniqua in forum Basic Configuration
    Replies: 4
    Last Post: 8 Jan 2009, 09:44 PM
  3. htaccess problems, server problems, my zen world is falling apart (streamline.net)
    By fr3spirit in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 31 Aug 2008, 04:05 AM
  4. FlatClone problem...selected option changes at checkout.
    By twister in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 1 Jun 2008, 05:07 AM
  5. Email header problems - and update problems
    By kinget in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 7 Oct 2006, 09:10 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