Fredi Posted February 26, 2020 Share Posted February 26, 2020 Thank You Zanid! Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
♥JcMagpie Posted February 26, 2020 Share Posted February 26, 2020 (edited) 18 minutes ago, Fredi said: while (list(, $value) = each($this->modules)) { Try replacing the each with foreach This must be somting to do with your php version as I did not get this error on php 7.3 are you running somthing higher? Edited February 26, 2020 by JcMagpie Fredi 1 Quote  Link to comment Share on other sites More sharing options...
♥ecartz Posted February 26, 2020 Share Posted February 26, 2020 foreach($this->modules as $value) { $class = pathinfo($value, PATHINFO_FILENAME); $GLOBALS[$class] = new $class(); } } } Fredi 1 Quote Always back up before making changes. Link to comment Share on other sites More sharing options...
Fredi Posted February 26, 2020 Share Posted February 26, 2020 Parse error: syntax error, unexpected '{' in /home/---/public_html/admin/order_editor/order_total.php on line 29 Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
Fredi Posted February 26, 2020 Share Posted February 26, 2020 If insert onli line  foreach($this->modules as $value) {Parse error: syntax error, unexpected '{' in /home/---/public_html/admin/order_editor/order_total.php on line 29 Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
hungryfrank Posted February 26, 2020 Share Posted February 26, 2020 why don't you start from order_editor then manipulate it to start without a customer. it is very easy. look for edit section and instead of error that there is no order to create an order. insert An order . and redirect back with an order #. then put a customer search and a create account poppet to create new customer Fredi 1 Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout  login pop up modal Link to comment Share on other sites More sharing options...
BrockleyJohn Posted February 27, 2020 Share Posted February 27, 2020 @Fredi you don't need to fix the order_total errors directly, you need to comment out the requires in edit_orders.php and edit_orders_ajax.php: edit_orders line 595, edit_orders_ajax 298 //this is where we call the order total modules // require( 'order_editor/order_total.php'); $order_total_modules = new order_total(); and to show what is happening you can delete the file admin/order_editor/order_total.php - you are actually using the class file for order_total from the catalog side of your shop (new Phoenix class autoloader) Fredi 1 Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
♥JcMagpie Posted February 27, 2020 Share Posted February 27, 2020 @Fredi I have found that many of the notices and warnings are being caused by code relating to no Ajax code. in edit_orders.php look for this code it's in more than one place. <div class="update5" align="center"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?></div> The "temp_image_submit " function is missing, so just replace with normal button and you will see quite a few notices and warnings will disappear. Fredi 1 Quote  Link to comment Share on other sites More sharing options...
hungryfrank Posted February 27, 2020 Share Posted February 27, 2020  Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout  login pop up modal Link to comment Share on other sites More sharing options...
Fredi Posted February 27, 2020 Share Posted February 27, 2020 8 hours ago, JcMagpie said: @Fredi I have found that many of the notices and warnings are being caused by code relating to no Ajax code. in edit_orders.php look for this code it's in more than one place. <div class="update5" align="center"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?></div> The "temp_image_submit " function is missing, so just replace with normal button and you will see quite a few notices and warnings will disappear. I no have thise problem. In directori admin/includes/lenguages/____/images/buttons/ I have byttons images Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
Fredi Posted February 27, 2020 Share Posted February 27, 2020 18 hours ago, hungryfrank said: why don't you start from order_editor then manipulate it to start without a customer. it is very easy. look for edit section and instead of error that there is no order to create an order. insert An order . and redirect back with an order #. then put a customer search and a create account poppet to create new customer The design is modern. Have you adapted the module for bootstrap, or is this another version of the Admin? Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
hungryfrank Posted February 27, 2020 Share Posted February 27, 2020 (edited) its Phoenix with a left column that is a contribution.  I am working on it. I haven't done the edit_orders_ajax.php yet Edited February 27, 2020 by hungryfrank Fredi 1 Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout  login pop up modal Link to comment Share on other sites More sharing options...
Fredi Posted February 27, 2020 Share Posted February 27, 2020 There is a good idea and wish: Add (update and adapt) GoogleMaps to the Order Editor. This will be convenient for the store and for couriers who deliver products. https://apps.oscommerce.com/dRodV&google-maps-delivery-link-1-0 This requires changing the code, but is it possible to do this without changing the code with a hook? Google Maps delivery link 1.0 What it does: A button will be added below the Delivery Address in Admin - Orders It allows with one click to open Google Maps in a new browser tab and pass the delivery address into a search query. Like this you'll save some copy paste to check if the address is accurate. Compatibility: all OsCommerce 2.3 versions. Can be adapted changing the button code to image button for 2.2 versions. In: admin/orders.php With PayPal App: Find about line 226: <legend style="margin-left: -20px; font-weight: bold;"><?php echo ENTRY_SHIPPING_ADDRESS; ?></legend> <p><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></p> </fieldset> Replace by: <legend style="margin-left: -20px; font-weight: bold;"><?php echo ENTRY_SHIPPING_ADDRESS; ?></legend> <p><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></p> <?php // google maps button begin $replace_array = array('%\,%', '%Nº%','%C\/%','%c\/%', '%nº%', '%planta%', '%piso%', '%dcha.%', '%izqa%', '%Dcha%', '%Izda%', '%Izq%','%izq%', '%º%', '%ª%'); $google_address = preg_replace($replace_array, '', $order->delivery['street_address']) . ', ' . $order->delivery['city'] . ', ' . $order->delivery['postcode'] . ', ' . $order->delivery['state'] . ', ' . $order->delivery['country']; echo '<a target="_blank" href="https://www.google.es/maps/place/' . $google_address . '">' . tep_draw_button('Google Maps', 'search') . '</a>'; // google maps button end ?> </fieldset> No PayPal App: Find about line 136: <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></td> </tr> </table></td> Replace by: <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <td class="main"></td> <?php // google maps button begin $replace_array = array('%\,%', '%Nº%','%C\/%','%c\/%', '%nº%', '%planta%', '%piso%', '%dcha.%', '%izqa%', '%Dcha%', '%Izda%', '%Izq%','%izq%', '%º%', '%ª%'); $google_address = preg_replace($replace_array, '', $order->delivery['street_address']) . ', ' . $order->delivery['city'] . ', ' . $order->delivery['postcode'] . ', ' . $order->delivery['state'] . ', ' . $order->delivery['country']; echo '<td class="main"><a target="_blank" href="https://www.google.es/maps/place/' . $google_address . '">' . tep_draw_button('Google Maps', 'search') . '</a></td>'; // google maps button end ?> </tr> </table></td> NOTE: the $replace _array includes typical spanish street address cleanup. It removes stairs, floor and door numbering and other unnecessary details which prevent Google Maps to find the address. You can add more strings which should be stripped off for your needs. That's it.  Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
hungryfrank Posted February 27, 2020 Share Posted February 27, 2020 order editor has some kind of google map facility. it might work with your add-on.   Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout  login pop up modal Link to comment Share on other sites More sharing options...
hungryfrank Posted February 28, 2020 Share Posted February 28, 2020 what y 17 hours ago, Fredi said: There is a good idea and wish: Add (update and adapt) GoogleMaps to the Order Editor. This will be convenient for the store and for couriers who deliver products. https://apps.oscommerce.com/dRodV&google-maps-delivery-link-1-0 This requires changing the code, but is it possible to do this without changing the code with a hook? Google Maps delivery link 1.0 What it does: A button will be added below the Delivery Address in Admin - Orders It allows with one click to open Google Maps in a new browser tab and pass the delivery address into a search query. Like this you'll save some copy paste to check if the address is accurate. Compatibility: all OsCommerce 2.3 versions. Can be adapted changing the button code to image button for 2.2 versions. In: admin/orders.php With PayPal App: Find about line 226: <legend style="margin-left: -20px; font-weight: bold;"><?php echo ENTRY_SHIPPING_ADDRESS; ?></legend> <p><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></p> </fieldset> Replace by: <legend style="margin-left: -20px; font-weight: bold;"><?php echo ENTRY_SHIPPING_ADDRESS; ?></legend> <p><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></p> <?php // google maps button begin $replace_array = array('%\,%', '%Nº%','%C\/%','%c\/%', '%nº%', '%planta%', '%piso%', '%dcha.%', '%izqa%', '%Dcha%', '%Izda%', '%Izq%','%izq%', '%º%', '%ª%'); $google_address = preg_replace($replace_array, '', $order->delivery['street_address']) . ', ' . $order->delivery['city'] . ', ' . $order->delivery['postcode'] . ', ' . $order->delivery['state'] . ', ' . $order->delivery['country']; echo '<a target="_blank" href="https://www.google.es/maps/place/' . $google_address . '">' . tep_draw_button('Google Maps', 'search') . '</a>'; // google maps button end ?> </fieldset> No PayPal App: Find about line 136: <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></td> </tr> </table></td> Replace by: <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <td class="main"></td> <?php // google maps button begin $replace_array = array('%\,%', '%Nº%','%C\/%','%c\/%', '%nº%', '%planta%', '%piso%', '%dcha.%', '%izqa%', '%Dcha%', '%Izda%', '%Izq%','%izq%', '%º%', '%ª%'); $google_address = preg_replace($replace_array, '', $order->delivery['street_address']) . ', ' . $order->delivery['city'] . ', ' . $order->delivery['postcode'] . ', ' . $order->delivery['state'] . ', ' . $order->delivery['country']; echo '<td class="main"><a target="_blank" href="https://www.google.es/maps/place/' . $google_address . '">' . tep_draw_button('Google Maps', 'search') . '</a></td>'; // google maps button end ?> </tr> </table></td> NOTE: the $replace _array includes typical spanish street address cleanup. It removes stairs, floor and door numbering and other unnecessary details which prevent Google Maps to find the address. You can add more strings which should be stripped off for your needs. That's it. around line 1190 <?php if (FILENAME_GOOGLE_MAP   !== 'FILENAME_GOOGLE_MAP'   ) { ?>                             <li><?php echo '<a href="' . tep_href_link(FILENAME_GOOGLE_MAP,     'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_google_directions.gif', IMAGE_GOOGLE_DIRECTIONS) . '</a>'; ?></li>           <?php } ?>     Quote you can cut up to 4 pages of your checkout by using my three add_ons login create account in one page Express checkout  login pop up modal Link to comment Share on other sites More sharing options...
Fredi Posted February 28, 2020 Share Posted February 28, 2020 It works! After the line 140 in file admin/orders.php add: Line 140:        <p><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></p> ADD. <?php // google maps button begin $replace_array = array('%\,%', '%Nº%','%C\/%','%c\/%', '%nº%', '%planta%', '%piso%', '%dcha.%', '%izqa%', '%Dcha%', '%Izda%', '%Izq%','%izq%', '%º%', '%ª%'); $google_address = preg_replace($replace_array, '', $order->delivery['street_address']) . ', ' . $order->delivery['city'] . ', ' . $order->delivery['postcode'] . ', ' . $order->delivery['state'] . ', ' . $order->delivery['country']; echo '<a target="_blank" href="https://www.google.es/maps/place/' . $google_address . '">' . tep_draw_button('Google Maps', 'search') . '</a>'; // google maps button end ?> </fieldset> Only this code. Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
Fredi Posted February 28, 2020 Share Posted February 28, 2020 On 2/27/2020 at 10:51 AM, JcMagpie said: @Fredi I have found that many of the notices and warnings are being caused by code relating to no Ajax code. in edit_orders.php look for this code it's in more than one place. <div class="update5" align="center"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?></div> The "temp_image_submit " function is missing, so just replace with normal button and you will see quite a few notices and warnings will disappear. Yes, Zahid. Such an error occurs in many files of old modules. I am currently adapting Article Manager for Phoenix version 1.0.5.1 In this module you need to make many replacements tep_image_....  to  tep_draw_button. In module Article Manager have meny other problems... Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
♥raiwa Posted February 28, 2020 Share Posted February 28, 2020 49 minutes ago, Fredi said: In this module you need to make many replacements tep_image_....  to  tep_draw_button. Even better, use tep_draw_bootstrap_button Fredi 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets  Link to comment Share on other sites More sharing options...
TomB01 Posted March 4, 2020 Share Posted March 4, 2020 I have what I hope is a simple and quick question. I installed the latest order editor at the time and have since stopped at Phoenix 1.0.5.0 on my active store. The Order Editor from BrockleyJohn was v1.2.8. Anyway, is there a way for Orders to display without going to edit mode directly? I click on Edit from the Orders list in Admin, but then it goes directly into the Order Editor, instead of the Details view. Once in the Order Editor, I have a "Details" button that I can click to get out of the Order Editor and update the status. Is there a way I can fix it so that it goes to the Details view from the Admin Orders list? When it goes directly to the Order Editor, it runs through my shipping modules and is wasting a lot of time. It's not too often that I have to edit an order, thankfully. So, being able to click directly to the Details view would be very helpful. Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted March 5, 2020 Share Posted March 5, 2020 8 hours ago, TomB01 said: I have what I hope is a simple and quick question. I installed the latest order editor at the time and have since stopped at Phoenix 1.0.5.0 on my active store. The Order Editor from BrockleyJohn was v1.2.8. Anyway, is there a way for Orders to display without going to edit mode directly? I click on Edit from the Orders list in Admin, but then it goes directly into the Order Editor, instead of the Details view. Once in the Order Editor, I have a "Details" button that I can click to get out of the Order Editor and update the status. Is there a way I can fix it so that it goes to the Details view from the Admin Orders list? When it goes directly to the Order Editor, it runs through my shipping modules and is wasting a lot of time. It's not too often that I have to edit an order, thankfully. So, being able to click directly to the Details view would be very helpful. If I remember right there's a setting that controls whether it goes direct to the editor or to the original orders page Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
TomB01 Posted March 5, 2020 Share Posted March 5, 2020 @BrockleyJohn, A setting somewhere in the code perhaps?  I didn't see anything in the Admin Configuration->OrderEditor. (Doesn't mean I didn't miss it, though.) Quote Link to comment Share on other sites More sharing options...
TomB01 Posted March 6, 2020 Share Posted March 6, 2020 In your documentation, "Order Editor Readme.pdf," it states the following: Quote This version of the addon uses the standard hooks in admin > orders to add an edit button to the view of an order. With an additional hook it will change the Edit button on the orders list view to go straight to the order editor (clicking the icon on the left still goes to the usual order view). To add the extra hook, go to the bottom of admin / orders.php and add the line before the last curly brace as shown: <?php echo $OSCOM_Hooks->call('orders', 'orderList'); // ADD THIS } require('includes/template_bottom.php'); require('includes/application_bottom.php'); However, I've checked my "orders.php" file and it does NOT have this line at the bottom. I was careful not to include that line, because I did NOT want to go directly into the Edit mode from the Orders List view. What I am seeking is at the Orders List view, either the EDIT button should go to the Phoenix "Details" selection or there should be an additional button, DETAILS, at the Orders List view. Help? Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted March 6, 2020 Share Posted March 6, 2020 (edited) 10 minutes ago, TomB01 said: In your documentation, "Order Editor Readme.pdf," it states the following: However, I've checked my "orders.php" file and it does NOT have this line at the bottom. I was careful not to include that line, because I did NOT want to go directly into the Edit mode from the Orders List view. What I am seeking is at the Orders List view, either the EDIT button should go to the Phoenix "Details" selection or there should be an additional button, DETAILS, at the Orders List view. Help? The instructions predate some of the hooks changes in admin so it's possible this one is no longer needed as all orders hooked may now load automatically. The setting is highlighted here:  Edited March 6, 2020 by BrockleyJohn forgot to crop image radhavallabh 1 Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
TomB01 Posted March 6, 2020 Share Posted March 6, 2020 3 minutes ago, BrockleyJohn said: The instructions predate some of the hooks changes in admin so it's possible this one is no longer needed as all orders hooked may now load automatically. The setting is highlighted here: Â I guess I should've been more specific earlier, but that setting does not exist in my Configuration->Order Editor. Quote Link to comment Share on other sites More sharing options...
TomB01 Posted March 6, 2020 Share Posted March 6, 2020 In following the install instructions, this "Copy the files to your store –" left things up to researching the results of the downloaded zip file. The v1.2.8 for CE Phoenix resulted in this collection, once un-zipped: The "catalog modified optional CE Phoenix 1.0.4.0 version" folder contained only a text file titled, "there are none.txt." In my judgment, that left only installing the files from the "catalog new files" folder. This is with Phoenix 1.0.5.0 and never having installed a version of Order Editor before (except on my 2.3.4 old store). Was there something else that should've created those extra settings in the configuration table of the database? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.