Results 1 to 6 of 6

Order Editor

This is a discussion on Order Editor within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hi there, When creating orders in the order editor the address format on the invoice and packaging slip is wrong. ...

      
  1. #1
    Lurker
    Join Date
    May 2010
    Posts
    4
    Rep Power
    0


    Default Order Editor

    Hi there,

    When creating orders in the order editor the address format on the invoice and packaging slip is wrong.
    I want to use address format "5" which should give below output

    {First Name} {Lastname}
    {StreetAddress}
    {Postal Code} {City}
    {Country}

    When creating an order in the order editor is generates the following output

    {First Name} {Lastname}
    {StreetAddress}
    {City} {Postal Code}
    {Country}

    Note that the postcal code and city are reversed.

    When a users creates an account on the front-end everything works as it should.

    Any thoughts on were I can change this so it shows correctly?

    Any help is much appreciated.

    Remko

  2. #2
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,427
    Rep Power
    47


    Smile Re: Order Editor

    The layout of the addres in Order Editor is not powered by the same code as the catalog side.

    Look in catalog/admin/edit_orders.php

    For the sections starting:

    <!-- customer_info bof //-->

    <tr id="shippingAddressEntry">

    <tr id="billingAddressEntry">

    You will find a load of <tr><td>'s doing the layout of the addresses for order editor.

    Be careful when editting there are some conditionals in there.

    Hope this help,

    Regards,
    pgmarshall
    _______________________________

  3. #3
    Lurker
    Join Date
    May 2010
    Posts
    4
    Rep Power
    0


    Default Re: Order Editor

    Thanks for your suggestion!

    I see what you are getting at and found the code you mentioned.
    Unfortunately I have not got it working yet. I can read a bit of PHP code but I am not a programmer.
    I think I must swap around some code here
    Code:
                      <tr class="dataTableRow">
                        <td class="dataTableContent" valign="middle" align="right" nowrap><?php echo ENTRY_CITY_STATE; ?></td>
                        <td colspan="2" valign="top" class="dataTableContent" nowrap><input name="update_delivery_city" size="15" value="<?php echo stripslashes($order->delivery['city']); ?>" <?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?>onChange="updateOrdersField('delivery_city', encodeURIComponent(this.value))"<?php } ?>>,</td>
                        <td valign="top" class="dataTableContent"><span id="deliveryStateMenu">
              <?php if (ORDER_EDITOR_USE_AJAX == 'true') { 
            echo tep_draw_pull_down_menu('update_delivery_zone_id', tep_get_country_zones($order->delivery['country_id']), $order->delivery['zone_id'], 'style="width: 200px;" onChange="updateShippingZone('delivery_state', this.options[this.selectedIndex].text);"'); 
              } else {
              echo tep_draw_pull_down_menu('update_delivery_zone_id', tep_get_country_zones($order->delivery['country_id']), $order->delivery['zone_id'], 'style="width: 200px;"'); 
              } ?>
              </span><span id="deliveryStateInput"><input name="update_delivery_state" size="15" value="<?php echo stripslashes($order->delivery['state']); ?>" <?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?>onChange="updateShippingZone('delivery_state', encodeURIComponent(this.value))"<?php } ?>></span></td>
                      </tr>
                      <tr class="dataTableRow"> 
                        <td class="dataTableContent" valign="middle" align="right"><?php echo ENTRY_POST_CODE; ?></td>
                        <td class="dataTableContent" valign="top"><input name="update_delivery_postcode" size="5" value="<?php echo $order->delivery['postcode']; ?>" <?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?>onChange="updateShippingZone('delivery_postcode', encodeURIComponent(this.value))"<?php } ?>></td>
                        <td class="dataTableContent" valign="middle" align="right"><?php echo ENTRY_COUNTRY; ?></td>
                        <td class="dataTableContent" valign="top">
              <?php if (ORDER_EDITOR_USE_AJAX == 'true') {
              echo tep_draw_pull_down_menu('update_delivery_country_id', tep_get_countries(), $order->delivery['country_id'], 'style="width: 200px;" onchange="update_zone('update_delivery_country_id', 'update_delivery_zone_id', 'deliveryStateInput', 'deliveryStateMenu'); updateShippingZone('delivery_country', this.options[this.selectedIndex].text);"'); 
              } else {
              echo tep_draw_pull_down_menu('update_delivery_country_id', tep_get_countries(), $order->delivery['country_id'], 'style="width: 200px;" onchange="update_zone('update_delivery_country_id', 'update_delivery_zone_id', 'deliveryStateInput', 'deliveryStateMenu');"'); 
              }
    I have tried to move this code up just above the "city" code but that didn't work.
    Code:
                      <tr class="dataTableRow"> 
                        <td class="dataTableContent" valign="middle" align="right"><?php echo ENTRY_POST_CODE; ?></td>
                        <td class="dataTableContent" valign="top"><input name="update_delivery_postcode" size="5" value="<?php echo $order->delivery['postcode']; ?>" <?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?>onChange="updateShippingZone('delivery_postcode', encodeURIComponent(this.value))"<?php } ?>></td>
                        <td class="dataTableContent" valign="middle" align="right"><?php echo ENTRY_COUNTRY; ?></td>
                        <td class="dataTableContent" valign="top">
    I will play around some more but help would be great. I am learning with trail & error here.

  4. #4
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,427
    Rep Power
    47


    Default Re: Order Editor

    There are three bit you need to edit.

    Although, since it is in the admin panel - I am not sure why you need to bother?

    If you really need to do it then you need t switch the code between the <tr class="dataTableRow">s with the bit you want around ... should be fairly straight forward.

    Just make sure you get the whole row and don't break any of the conditional AJAX if statements.

    Regards,
    pgmarshall
    _______________________________

  5. #5
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    637
    Blog Entries
    1
    Rep Power
    27


    Default Re: Order Editor

    I've always had this problem with the format id changing from the backend too. The only thing i found close to doing was manually setting the format id to 0 from the database for each order (sucks!), in order to get a more consistent feel to invoices. but I'll keep eye on this post to see if miracles happen

  6. #6
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,427
    Rep Power
    47


    Default Re: Order Editor

    Okay - I should read the posts more carefully. You want to get the invoice/packing slip output in the correct order rather than switch it's display order in the admin panel?

    Is the data posted in the correct fields? Have a quick look in your phpMyAdmin and make sure that the Post Code is in the Post Code field etc. for an order created by you in Order Editor ...

    If it is in the correct fields then let me know and I will take another look at the code to see if we can fix this.

    Regards,
    pgmarshall
    _______________________________

Similar Threads

  1. Order Editor
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-16-2009, 10:50 AM
  2. Order Editor / Unique Order Number / Manual Order Maker Combo
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 11-16-2008, 04:01 PM
  3. Order Editor / Unique Order Number / Manual Order Maker Combo
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 11-16-2008, 09:13 AM
  4. osCMax Development Update : Order Editor, Manual Order Maker
    By michael_s in forum Announcement Discussions
    Replies: 8
    Last Post: 09-15-2008, 04:46 AM
  5. Order Editor
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 05-11-2007, 09:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •