Results 1 to 10 of 122

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Tips/Tricks for getting this to work with Zen Cart 1.3.9

    I hope this will help folks with troubleshooting..

    Issue - When adding products you are redirected to the admin home page
    Solution - UPDATE Edit Orders to v2.04 (the link to get this version is on page 4 of this support thread) This issue was SPECIFICALLY FIXED in this version.

    Issue - I get a blank page after clicking on the "Create Order" button
    Solution - There is a missing function file in the Create Order fileset. You need to create a function file for Create Orders as per the instructions on page 5 of this support thread.

    Other tips:

    • Replace the Add Customers from Admin with the latest version available in the Zen Cart downloads section (currently this is v1.07)
    • Download the latest version of Create Orders from Ivan's blog: ivankristianto.com/web-development/ecommerce/simple-create-order-module-zen-cart/69/
    • Update admin/orders.php as per the instructions in the Edit Orders readme for adding the proper "Edit" buttons. (the instructions in Ivan's readme has met with mixed results..)
    • DELETE the following files from Ivan's install package: * admin/includes/classes/order.php
      * admin/includes/classes/shipping_admin.php
      * admin/includes/classes/shipping_cart_admin.php
      (the purpose of these files is to support the shipping rates and order confirmation e-mails -- this code doesn't work particularly well and IMHO isn't entirely necessary to get the overall general benefit of Create Orders)
    • Make the following changes to admin/includes/functions/general.php as per the instructions in the Create Orders readme:

    Find:
    Code:
       function zen_get_countries($default = '') {
        global $db;
        $countries_array = array();
        if ($default) {
          $countries_array[] = array('id' => '',
                                     'text' => $default);
        }
        $countries = $db->Execute("select countries_id, countries_name
                                   from " . TABLE_COUNTRIES . "
                                   order by countries_name");
    
        while (!$countries->EOF) {
          $countries_array[] = array('id' => $countries->fields['countries_id'],
                                     'text' => $countries->fields['countries_name']);
          $countries->MoveNext();
        }
    
        return $countries_array;
      }
    replace with:
    Code:
    function zen_get_countries($countries_id = '', $with_iso_codes = false) {
        global $db;
        $countries_array = array();
        if (zen_not_null($countries_id)) {
          if ($with_iso_codes == true) {
            $countries = "select countries_name, countries_iso_code_2, countries_iso_code_3 
                          from " . TABLE_COUNTRIES . " 
                          where countries_id = '" . (int)$countries_id . "' 
                          order by countries_name";
    
            $countries_values = $db->Execute($countries);
    
            $countries_array = array('countries_name' => $countries_values->fields['countries_name'],
                                     'countries_iso_code_2' => $countries_values->fields['countries_iso_code_2'],
                                     'countries_iso_code_3' => $countries_values->fields['countries_iso_code_3']);
          } else {
            $countries = "select countries_name 
                          from " . TABLE_COUNTRIES . " 
                          where countries_id = '" . (int)$countries_id . "'";
    
            $countries_values = $db->Execute($countries);
    
            $countries_array = array('countries_name' => $countries_values->fields['countries_name']);
          }
        } else {
          $countries = "select countries_id, countries_name 
                        from " . TABLE_COUNTRIES . " 
                        order by countries_name";
    
          $countries_values = $db->Execute($countries);
    
          while (!$countries_values->EOF) {
            /*$countries_array[] = array('countries_id' => $countries_values->fields['countries_id'],
                                       'countries_name' => $countries_values->fields['countries_name']);*/
            $countries_array[] = array('id' => $countries_values->fields['countries_id'],
                                     'text' => $countries_values->fields['countries_name']);
            $countries_values->MoveNext();
          }
        }
    
        return $countries_array;
      }
    When I have time I will bundle up my install files and submit to the downloads.. (don't PM and ask me to send them out now.. I don't have ANYTHING ready to send ANYONE..)
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #2
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Admin Simple Create Order Support Thread

    This just gets more weird by the minute

    Okay got it to work on the test site and transferred the same exact files over to the live site.

    Click on Create Order and goes to a 500 Internal Error page when I refresh this page I get

    Code:
    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
    in:
    [SELECT c.`customers_firstname` , c.`customers_lastname` , c.`customers_email_address` , c.`customers_telephone`, ab.`entry_company` , ab.`entry_street_address` , ab.`entry_suburb` , ab.`entry_postcode` , ab.`entry_city` , ab.`entry_state` , ab.`entry_country_id` , ab.`entry_zone_id` FROM zen_customers c JOIN zen_address_book ab ON ( c.`customers_default_address_id` = ab.`address_book_id` ) WHERE c.`customers_id` = ]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    So is this file or DB based it same exact files that is on the test site as well.

  3. #3
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Admin Simple Create Order Support Thread

    Dunno.. Based on the error I would say that this is a DB error if it is indeed working on your test site.. However I'd look first at what is different between your test store and your live store.. If there are other variances, any one of them could be causing the errors you are getting..

    Quote Originally Posted by bluedotted View Post
    This just gets more weird by the minute

    Okay got it to work on the test site and transferred the same exact files over to the live site.

    Click on Create Order and goes to a 500 Internal Error page when I refresh this page I get

    Code:
    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
    in:
    [SELECT c.`customers_firstname` , c.`customers_lastname` , c.`customers_email_address` , c.`customers_telephone`, ab.`entry_company` , ab.`entry_street_address` , ab.`entry_suburb` , ab.`entry_postcode` , ab.`entry_city` , ab.`entry_state` , ab.`entry_country_id` , ab.`entry_zone_id` FROM zen_customers c JOIN zen_address_book ab ON ( c.`customers_default_address_id` = ab.`address_book_id` ) WHERE c.`customers_id` = ]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    So is this file or DB based it same exact files that is on the test site as well.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  4. #4
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Admin Simple Create Order Support Thread

    According to the debugger this shows in it

    [27-Nov-2010 20:50:23] PHP Fatal error: Call to undefined function zen_get_currency_value() in /home/xxxxxxx/public_html/xxxxxx/create_order.php on line 84

  5. #5
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Admin Simple Create Order Support Thread

    Seems commenting this out around line 72 did the trick, finally

    Edit code below

    Code:
    'currency_value' => zen_get_currency_value(DEFAULT_CURRENCY),
    to

    Code:
    //'currency_value' => zen_get_currency_value(DEFAULT_CURRENCY),

  6. #6
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Admin Simple Create Order Support Thread

    Now to fix the Default free shipper that automatically entered and this should be good to go.

  7. #7
    Join Date
    Aug 2006
    Location
    portlandish, oregon
    Posts
    799
    Plugin Contributions
    0

    Default Re: Admin Simple Create Order Support Thread

    I finally traced down a MAJOR problem with Zone Definitions to the Simple Create Order Mod. When replacing the block of code in /functions/general.php, the dropdown menus no longer show country/state options in Locations/Taxes -> Zones Defitions. So I cannot create zones, or use shipping modules with defined zones, as it does not work.\

    Any solution for this?

  8. #8
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Admin Simple Create Order Support Thread

    This is actually the WRONG way to fix this error.. The reason for the error is that create_orders.php is making a call to a function that does not exist.. (Hence why it states " Call to undefined function")

    You NEED to create the function file I posted instructions for last night so that this function is correctly defined, and UNCOMMENT this line.

    While it LOOKS like it's working with this line commented out, create_orders.php is actually not creating your orders correctly and you will see that the product line totals will not display or calculate correctly. The ORDER totals will appear fine, but your product line totals will not.. This function will make sure the currency symbol is inserted into the database for the order so that the product totals appear correctly on your order..

    Quote Originally Posted by bluedotted View Post
    According to the debugger this shows in it

    [27-Nov-2010 20:50:23] PHP Fatal error: Call to undefined function zen_get_currency_value() in /home/xxxxxxx/public_html/xxxxxx/create_order.php on line 84
    Quote Originally Posted by bluedotted View Post
    Seems commenting this out around line 72 did the trick, finally

    Edit code below

    Code:
    'currency_value' => zen_get_currency_value(DEFAULT_CURRENCY),
    to

    Code:
    //'currency_value' => zen_get_currency_value(DEFAULT_CURRENCY),
    Last edited by DivaVocals; 28 Nov 2010 at 06:23 AM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  9. #9
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Admin Simple Create Order Support Thread

    The shipping table disappeared too just seems the mod needs some major work all we really wanted was the create order part without the edit orders and create customer which are usuless to us as the Add Customer module from the downloads still works without flaws, super orders takes care of the editing

    So basically the Create Order only function is what we are looking for it works with what we have installed of this mod with Super Orders so I KNOW that is not an issue it picks up the order just like if it was from the customer side of the store

    I am willing to donate for the mod but until it works properly guess that will be put on hold for now

    I cannot waste to much time on something we can manually create from the customer side of the store by using the alternative method Login As A Customer mod which works without flaws.

    When the Shipping Table from the Create Order page was removed this kind of got boring if you know what I mean. Thanks for your help though guess I will wait until you release yours if ever.

    Unless I get bored and go at it again which I probably will

  10. #10
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Admin Simple Create Order Support Thread

    Quote Originally Posted by DivaVocals View Post
    You NEED to create the function file I posted instructions for last night so that this function is correctly defined, and UNCOMMENT this line.
    I tried this before commenting that line out it made no difference I tried every thing this thread said including from that blog all the same results from a fresh store and a modified store. All ended up in the same result. Fixed one thing and another thing was removed lol

 

 

Similar Threads

  1. v150 Admin New Order [Support Thread]
    By lhungil in forum Addon Admin Tools
    Replies: 121
    Last Post: 5 Feb 2021, 07:51 PM
  2. Admin Simple Create Order
    By stesouthby in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 Mar 2011, 02:35 PM
  3. Admin Simple Create Order
    By dmm2020 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 13 Nov 2010, 04:26 PM
  4. Re: Simple SEO URL [support thread]
    By creamcrackers in forum General Questions
    Replies: 2
    Last Post: 16 Aug 2009, 03:02 PM
  5. [Support Thread] Simple Video Manager
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 1 Nov 2008, 02:44 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