Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEW! Complete Order Editing Tool!


jhilgeman

Recommended Posts

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 by JcMagpie

 

Link to comment
Share on other sites

Parse error: syntax error, unexpected '{' in /home/---/public_html/admin/order_editor/order_total.php on line 29

Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Link to comment
Share on other sites

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

Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Link to comment
Share on other sites

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 customer00000000.thumb.gif.8fc6e47d370c52bca312e0733501cbfd.gif000003.thumb.gif.298c0432fd3218fb514bab5199827365.gif

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

@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)

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

@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.

 

Link to comment
Share on other sites

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

Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Link to comment
Share on other sites

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 customer00000000.thumb.gif.8fc6e47d370c52bca312e0733501cbfd.gif000003.thumb.gif.298c0432fd3218fb514bab5199827365.gif

The design is modern.
Have you adapted the module for bootstrap, or is this another version of the Admin?

Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Link to comment
Share on other sites

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 by hungryfrank

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

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.

 

Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Link to comment
Share on other sites

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 } ?>    

 

 

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

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.

Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Link to comment
Share on other sites

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

Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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

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?

Link to comment
Share on other sites

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:

 

2020-03-06.jpg

Edited by BrockleyJohn
forgot to crop image

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

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:

 

2020-03-06.jpg

I guess I should've been more specific earlier, but that setting does not exist in my Configuration->Order Editor.

image.png.2affcc4a5537f2cfbb1e0e1e08d3fec2.png

Link to comment
Share on other sites

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:

image.png.ff6e56836a2a1faf1ffb338fdfa1d6ef.png

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...