Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Hi

Could do with some help! Originaly was going to update the existing addon but that went a bit awoll!

So have started from scratch and made progress but a bit confused, Got it more or less working! order history is being updated as you can see from the print out ( this is just so I know the database is beeing updated) however I'm not able to get the main page or the  status history page to update at same time to reflect the changes.

 

 

image.thumb.png.1fe7365a8f5130335bfeb0d6f483278a.png

 

Link to comment
Share on other sites

 This line of code just not working, its the update status button, just not  working! other buttons work fine.

tep_draw_input_field('submit',BUS_SUBMIT,'class="cbutton"','','submit') ;

 

<?php echo    tep_draw_input_field('select_all',BUS_SELECT_ALL,'class="cbutton" onclick="checkAll(); return false;"','','submit') . ****this works***
              tep_draw_input_field('select_none',BUS_SELECT_NONE,'class="cbutton" onclick="uncheckAll(); return false;"','','submit') . ****this works***
              tep_draw_input_field('submit',BUS_SUBMIT,'class="cbutton"','','submit') ; **** this does nothing****
              echo tep_black_line() ;
?> 

 

image.thumb.png.d3714718ab40ccba54aeac8a77c89a86.png

 

Link to comment
Share on other sites

6 hours ago, Dan Cole said:

Have you set up the form...ie using tep_draw_form?

Dan

Hi Dan,

 Did not think i would need to do that as that already exits in order.php.

<div id="section_status_history_content">

    <?php echo tep_draw_form('status', 'orders.php', tep_get_all_get_params(array('action')) . 'action=update_order'); ?>

I am wondering if the problem is in not calling the account_ history_info.php corectly?

$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $this_orderID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link('account_history_info.php',CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $this_orderID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);  //--old code--//

and is this correct for new code?

<?php echo tep_draw_form('status', 'orders.php', '', 'get');

I know it works in 2.2a so all I have done is update code toBS so it diaplays corectly and calls up all the .php files corectly.

The other key thing is that in original addon it requests that first code chanege is placed here,

FILE: admin/orders.php
=========================================
  FIND: [around line 27]

   $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

This  no longer exits in the new code! but I assume its simply placing it in the right part of the while statment. I have placed it here,

Released under the GNU General Public License
*/

  require('includes/application_top.php');

  $OSCOM_Hooks->register('orders');

  require('includes/classes/currencies.php');
  $currencies = new currencies();

  $orders_statuses = array();
  $orders_status_array = array();
  $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$languages_id . "'");
  while ($orders_status = tep_db_fetch_array($orders_status_query)) {
    $orders_statuses[] = array('id' => $orders_status['orders_status_id'],
                               'text' => $orders_status['orders_status_name']);
    $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];
  }

  $action = (isset($_GET['action']) ? $_GET['action'] : '');
 
  // Start Batch Update Status v1.2 (with Comment buttons & e-mail notification)
 if (BUS_ENABLE_DELETE == 1){ // add Delete to select box
  $orders_statuses = array_merge($orders_statuses,array(
                                 array('id' => 'X', 'text' => BUS_DELETE_TEXT)
                                    )
        

 

 

Link to comment
Share on other sites

Maybe you want to back up....put the working version back in place and then make minor changes to the look and feel to suit what you want.  If the submit button is not working it sounds to me that you have the form messed up.  I do know that the original contribution works since I'm using it so it must be something you changed along the way.   Backing up should get you back on the right track again.

Dan

Link to comment
Share on other sites

1 hour ago, Dan Cole said:

Maybe you want to back up....put the working version back in place and then make minor changes to the look and feel to suit what you want.  If the submit button is not working it sounds to me that you have the form messed up.  I do know that the original contribution works since I'm using it so it must be something you changed along the way.   Backing up should get you back on the right track again.

Dan

Yes will try again setep by step.

 

Link to comment
Share on other sites

This addon has been updated to work with osCommerce  v2.3.4.1BS. Have submitted it so should be available soon. Have tested in with Edge and PHP7.1 works fine. However as always Backup before installing.

oscom-batch-update-status-osCommerce  v2.3.4.1BS

Thanks for all your help in getting this done.

Z

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...