Page 6 of 13 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 122
  1. #51
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Admin Simple Create Order Support Thread

    One last thing.. In admin/edit_orders.php find:
    <!-- Begin Order Total Block -->
    Post the code that is between
    <!-- Begin Order Total Block -->
    and

    <!-- End Order Total Block -->
    Quote Originally Posted by bluedotted View Post
    Downloaded both from here http://www.ivankristianto.com/

    Using 1.3.9h - All versions tested on

    Edit Orders 2.0.4
    simple create orders 1.00

    Yes folder is renamed in live website but tests sites are not. I assure you they have been placed in their correct locations.

    Do not remember saying tried everything just tried everything the readme.txt has in it but failed, also tried the modified files that came with the mod.

    Maybe I am missing something but I have used winmerge and all software I can think of and they all seem to be exact but the Add Product Function fails.
    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. #52
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Admin Simple Create Order Support Thread

    Just for the record I downloaded from this page 3 times to ensure I have the right files

    ivankristianto.com/web-development/ecommerce/simple-create-order-module-zen-cart/69/

  3. #53
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Admin Simple Create Order Support Thread

    Quote Originally Posted by DivaVocals View Post
    One last thing.. In admin/edit_orders.php find:
    Post the code that is between

    and
    I think this is what you are asking for?

    Code:
    	<!-- Begin Order Total Block -->
    	  <tr>
    	    <td align="right" colspan="6">
    	    	<table border="0" cellspacing="0" cellpadding="2" width="100%">
    	    	<tr>
    	    	<td align='center' valign='top'><br><a href="<?php echo $PHP_SELF . "?oID=$oID&action=add_product&step=1"; ?>"><u><b><font size='3'><?php echo TEXT_DATE_ORDER_ADDNEW; ?> </font></b></u></a></td>
    	    	<td align='right'>
    	    	<table border="0" cellspacing="0" cellpadding="2">
    <?php
    
          	// Override order.php Class's Field Limitations
    		$totals_query = $db -> Execute("select * from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$oID . "' order by sort_order");
    		$order->totals = array();
    		#while ($totals = zen_db_fetch_array($totals_query)) {
          while (!$totals_query -> EOF){
             $order->totals[] = array('title' => $totals_query->fields['title'], 'text' => $totals_query->fields['text'], 'class' => $totals_query->fields['class'], 'value' => $totals_query->fields['value'], 'orders_total_id' => $totals_query->fields['orders_total_id']);
             $totals_query -> MoveNext();
             }
    
    	$TotalsArray = array();
    	for ($i=0; $i<sizeof($order->totals); $i++) {
    		$TotalsArray[] = array("Name" => $order->totals[$i]['title'], "Price" => number_format($order->totals[$i]['value'], 2, '.', ''), "Class" => $order->totals[$i]['class'], "TotalID" => $order->totals[$i]['orders_total_id']);
    		$TotalsArray[] = array("Name" => "          ", "Price" => "", "Class" => "ot_custom", "TotalID" => "0");
    	}
    
    	array_pop($TotalsArray);
    	foreach($TotalsArray as $TotalIndex => $TotalDetails)
    	{
    		$TotalStyle = "smallText";
    		if(($TotalDetails["Class"] == "ot_subtotal") || ($TotalDetails["Class"] == "ot_total") )
    		{
    			echo	'	      <tr>' . "\n" .
    				'		<td class="main" align="right"><b>' . $TotalDetails["Name"] . '</b></td>' .
    				'		<td class="main"><b>' . $TotalDetails["Price"] .
    						"<input name='update_totals[$TotalIndex][title]' type='hidden' value='" . trim($TotalDetails["Name"]) . "' size='" . strlen($TotalDetails["Name"]) . "' >" .
    						"<input name='update_totals[$TotalIndex][value]' type='hidden' value='" . $TotalDetails["Price"] . "' size='6' >" .
    						"<input name='update_totals[$TotalIndex][class]' type='hidden' value='" . $TotalDetails["Class"] . "'>\n" .
    						"<input type='hidden' name='update_totals[$TotalIndex][total_id]' value='" . $TotalDetails["TotalID"] . "'>" . '</b></td>' .
    				'	      </tr>' . "\n";
    		}
    		elseif($TotalDetails["Class"] == "ot_tax")
    		{
    			echo	'	      <tr>' . "\n" .
    				'		<td align="right" class="' . $TotalStyle . '">' . "<input name='update_totals[$TotalIndex][title]' size='" . strlen(trim($TotalDetails["Name"])) . "' value='" . trim($TotalDetails["Name"]) . "'>" . '</td>' . "\n" .
    				'		<td class="main"><b>' . $TotalDetails["Price"] .
    						"<input name='update_totals[$TotalIndex][value]' type='hidden' value='" . $TotalDetails["Price"] . "' size='6' >" .
    						"<input name='update_totals[$TotalIndex][class]' type='hidden' value='" . $TotalDetails["Class"] . "'>\n" .
    						"<input type='hidden' name='update_totals[$TotalIndex][total_id]' value='" . $TotalDetails["TotalID"] . "'>" . '</b></td>' .
    				'	      </tr>' . "\n";
    		}
    		elseif($TotalDetails["Class"] == "ot_group_pricing")
    		{
    			echo	'	      <tr>' . "\n" .
    				'		<td align="right" class="' . $TotalStyle . '">' . "<input name='update_totals[$TotalIndex][title]' size='" . strlen(trim($TotalDetails["Name"])) . "' value='" . trim($TotalDetails["Name"]) . "'>" . '</td>' . "\n" .
    				'		<td class="main"><b>' . $TotalDetails["Price"]*-1 .
    						"<input name='update_totals[$TotalIndex][value]' type='hidden' value='" . $TotalDetails["Price"]*-1 . "' size='6' >" .
    						"<input name='update_totals[$TotalIndex][class]' type='hidden' value='" . $TotalDetails["Class"] . "'>\n" .
    						"<input type='hidden' name='update_totals[$TotalIndex][total_id]' value='" . $TotalDetails["TotalID"] . "'>" . '</b></td>' .
    				'	      </tr>' . "\n";
    		}
    		else
    		{
    			echo	'	      <tr>' . "\n" .
    				'		<td align="right" class="' . $TotalStyle . '">' . "<input name='update_totals[$TotalIndex][title]' size='" . strlen(trim($TotalDetails["Name"])) . "' value='" . trim($TotalDetails["Name"]) . "'>" . '</td>' . "\n" .
    				'		<td align="right" class="' . $TotalStyle . '">' . "<input name='update_totals[$TotalIndex][value]' size='6' value='" . $TotalDetails["Price"] . "'>" .
    						"<input type='hidden' name='update_totals[$TotalIndex][class]' value='" . $TotalDetails["Class"] . "'>" .
    						"<input type='hidden' name='update_totals[$TotalIndex][total_id]' value='" . $TotalDetails["TotalID"] . "'>" .
    						'</td>' . "\n" .
    				'	      </tr>' . "\n";
    		}
    	}
    	echo	'	      <tr>' . "\n" .
    				'		<td align="right" >Resend Invoice to Customers (Note: Please update order before resend invoice)</td>' . "\n" .
    				'		<td align="right">' . '<a href="' . zen_href_link("edit_orders.php", zen_get_all_get_params(array('resend')) . 'resend=1') . '">' . zen_image_button('button_send_mail.gif', IMAGE_SEND_EMAIL) . '</a>' .
    						'</td>' . "\n" .
    				'	      </tr>' . "\n";
    ?>
    	    	</table>
    	    	</td>
    	    	</tr>
    	    	</table>
    	    </td>
    	  </tr>
    	<!-- End Order Total Block -->

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

    Default Re: Admin Simple Create Order Support Thread

    Just double checking that you had the right Create Orders files

    Quote Originally Posted by bluedotted View Post
    Just for the record I downloaded from this page 3 times to ensure I have the right files

    ivankristianto.com/web-development/ecommerce/simple-create-order-module-zen-cart/69/
    I can tell by looking at this code sample that you DO NOT have Edit Orders v2.04 installed. The link to get this version of Edit Orders is posted on page 4 of this thread.

    Download v2.04 of Edit Orders and REPLACE the Edit Orders files you are using.. NO Winmerging.. Simply UPGRADE Edit Orders. The blank page issue you are describing when adding product is corrected in v2.04 of Edit Orders. You also MUST create that function file I posted the code for earlier.. Do this and you should find that this will work..

    Quote Originally Posted by bluedotted View Post
    I think this is what you are asking for?

    Code:
        <!-- Begin Order Total Block -->
          <tr>
            <td align="right" colspan="6">
                <table border="0" cellspacing="0" cellpadding="2" width="100%">
                <tr>
                <td align='center' valign='top'><br><a href="<?php echo $PHP_SELF . "?oID=$oID&action=add_product&step=1"; ?>"><u><b><font size='3'><?php echo TEXT_DATE_ORDER_ADDNEW; ?> </font></b></u></a></td>
                <td align='right'>
                <table border="0" cellspacing="0" cellpadding="2">
    <?php
    
              // Override order.php Class's Field Limitations
            $totals_query = $db -> Execute("select * from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$oID . "' order by sort_order");
            $order->totals = array();
            #while ($totals = zen_db_fetch_array($totals_query)) {
          while (!$totals_query -> EOF){
             $order->totals[] = array('title' => $totals_query->fields['title'], 'text' => $totals_query->fields['text'], 'class' => $totals_query->fields['class'], 'value' => $totals_query->fields['value'], 'orders_total_id' => $totals_query->fields['orders_total_id']);
             $totals_query -> MoveNext();
             }
    
        $TotalsArray = array();
        for ($i=0; $i<sizeof($order->totals); $i++) {
            $TotalsArray[] = array("Name" => $order->totals[$i]['title'], "Price" => number_format($order->totals[$i]['value'], 2, '.', ''), "Class" => $order->totals[$i]['class'], "TotalID" => $order->totals[$i]['orders_total_id']);
            $TotalsArray[] = array("Name" => "          ", "Price" => "", "Class" => "ot_custom", "TotalID" => "0");
        }
    
        array_pop($TotalsArray);
        foreach($TotalsArray as $TotalIndex => $TotalDetails)
        {
            $TotalStyle = "smallText";
            if(($TotalDetails["Class"] == "ot_subtotal") || ($TotalDetails["Class"] == "ot_total") )
            {
                echo    '          <tr>' . "\n" .
                    '        <td class="main" align="right"><b>' . $TotalDetails["Name"] . '</b></td>' .
                    '        <td class="main"><b>' . $TotalDetails["Price"] .
                            "<input name='update_totals[$TotalIndex][title]' type='hidden' value='" . trim($TotalDetails["Name"]) . "' size='" . strlen($TotalDetails["Name"]) . "' >" .
                            "<input name='update_totals[$TotalIndex][value]' type='hidden' value='" . $TotalDetails["Price"] . "' size='6' >" .
                            "<input name='update_totals[$TotalIndex][class]' type='hidden' value='" . $TotalDetails["Class"] . "'>\n" .
                            "<input type='hidden' name='update_totals[$TotalIndex][total_id]' value='" . $TotalDetails["TotalID"] . "'>" . '</b></td>' .
                    '          </tr>' . "\n";
            }
            elseif($TotalDetails["Class"] == "ot_tax")
            {
                echo    '          <tr>' . "\n" .
                    '        <td align="right" class="' . $TotalStyle . '">' . "<input name='update_totals[$TotalIndex][title]' size='" . strlen(trim($TotalDetails["Name"])) . "' value='" . trim($TotalDetails["Name"]) . "'>" . '</td>' . "\n" .
                    '        <td class="main"><b>' . $TotalDetails["Price"] .
                            "<input name='update_totals[$TotalIndex][value]' type='hidden' value='" . $TotalDetails["Price"] . "' size='6' >" .
                            "<input name='update_totals[$TotalIndex][class]' type='hidden' value='" . $TotalDetails["Class"] . "'>\n" .
                            "<input type='hidden' name='update_totals[$TotalIndex][total_id]' value='" . $TotalDetails["TotalID"] . "'>" . '</b></td>' .
                    '          </tr>' . "\n";
            }
            elseif($TotalDetails["Class"] == "ot_group_pricing")
            {
                echo    '          <tr>' . "\n" .
                    '        <td align="right" class="' . $TotalStyle . '">' . "<input name='update_totals[$TotalIndex][title]' size='" . strlen(trim($TotalDetails["Name"])) . "' value='" . trim($TotalDetails["Name"]) . "'>" . '</td>' . "\n" .
                    '        <td class="main"><b>' . $TotalDetails["Price"]*-1 .
                            "<input name='update_totals[$TotalIndex][value]' type='hidden' value='" . $TotalDetails["Price"]*-1 . "' size='6' >" .
                            "<input name='update_totals[$TotalIndex][class]' type='hidden' value='" . $TotalDetails["Class"] . "'>\n" .
                            "<input type='hidden' name='update_totals[$TotalIndex][total_id]' value='" . $TotalDetails["TotalID"] . "'>" . '</b></td>' .
                    '          </tr>' . "\n";
            }
            else
            {
                echo    '          <tr>' . "\n" .
                    '        <td align="right" class="' . $TotalStyle . '">' . "<input name='update_totals[$TotalIndex][title]' size='" . strlen(trim($TotalDetails["Name"])) . "' value='" . trim($TotalDetails["Name"]) . "'>" . '</td>' . "\n" .
                    '        <td align="right" class="' . $TotalStyle . '">' . "<input name='update_totals[$TotalIndex][value]' size='6' value='" . $TotalDetails["Price"] . "'>" .
                            "<input type='hidden' name='update_totals[$TotalIndex][class]' value='" . $TotalDetails["Class"] . "'>" .
                            "<input type='hidden' name='update_totals[$TotalIndex][total_id]' value='" . $TotalDetails["TotalID"] . "'>" .
                            '</td>' . "\n" .
                    '          </tr>' . "\n";
            }
        }
        echo    '          <tr>' . "\n" .
                    '        <td align="right" >Resend Invoice to Customers (Note: Please update order before resend invoice)</td>' . "\n" .
                    '        <td align="right">' . '<a href="' . zen_href_link("edit_orders.php", zen_get_all_get_params(array('resend')) . 'resend=1') . '">' . zen_image_button('button_send_mail.gif', IMAGE_SEND_EMAIL) . '</a>' .
                            '</td>' . "\n" .
                    '          </tr>' . "\n";
    ?>
                </table>
                </td>
                </tr>
                </table>
            </td>
          </tr>
        <!-- End Order Total Block -->
    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.

  5. #55
    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.

  6. #56
    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.

  7. #57
    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.

  8. #58
    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

  9. #59
    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),

  10. #60
    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.

 

 
Page 6 of 13 FirstFirst ... 45678 ... LastLast

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